Hi all,

I’m looking at ways to accelerate mechanical simulations for endovascular applications. We published a paper recently where we present EndoBeams.jl, a finite element framework for beam elements in contact with a vessel in Julia.

We are now working on accelerating these simulations, given a parametrization of the vessel and of a stent. We are using Surrogates.jl to sample and simulate many deployment cases and build a surrogate model. The output we are interested in is the vector of nodal positions of a deployed stent. We have had some success using Gaussian Processes, but the number of training cases required is huge (we have ~12 parameters, and one simulation takes ~1h).

As a consequence, I would like to explore training a neural network as a surrogate, and adding to the loss function terms that penalize out-of-balance mechanical equilibrium, i.e. the residual of the FE simulation in the final configuration. I suspect this is similar to what PINNs are doing, except in the context of a surrogate model here. I expect that by enforcing the physical laws of the system, it will regularize the training, increasing the accuracy of the surrogate model even with a low number of training cases.

If you’ve followed me so far, I have a few questions. Bear in mind that I’m a mechanical engineer and lack a bit of knowledge in machine learning, but I’m willing to try and learn!

- Does that sound like a valid approach?
- Is there an example somewhere of a similar approach that could get me started?
- I suspect that if add terms to my loss function, I will need to provide gradients for the training. I should be able to make my FE simulation differentiable using the adjoint method for example. Should I use a
`rrule`

to provide the gradients to Flux? Or can I use something like ImplicitDifferentiation.jl?

Sorry if this is more a scientific problem than a question about the Julia language itself, I hope this is appropriate here.

Any help will be appreciated!