Physics-informed training of a surrogate model involving finite element analysis

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!

1 Like

You can even mix the two, which can be good or bad depending on the circumstance.

I don’t know what the best tutorial would be but if you’re interested in using JuliaSimSurrogates this tutorial pretty much hits the nail on the head.

Generating a surrogate of a nonlinear PDE model for the purpose of accelerating future parameter estimation tasks.

If you use NonlinearSolve.jl for the solving, it’ll specialize on sparsity and handle the rrule, so there’s nothing to worry about there.

1 Like

Thanks for the detailed answer! I’ll try on a simple dummy case first to see if everything interfaces properly.

I’m not using NonlinearSolve.jl, I have to use a custom solver to maximize performance (and because updating the state of these beams in a Newton-Raphson scheme is a bit finicky and requires a lot of custom steps). But I’m a bit familiar with how NonlinearSolve.jl handles the custom rrule so I should be able to adapt it to my case. Not sure about the sparsity though but I’ll have a look.

I’ll eventually report here if something is not interfacing properly.

@touste this is an interesting problem actually. Did you have any luck since September?

Hi, sorry for the late reply. Not much progress unfortunately but I’m still thinking about it!