Page 1 of 1

FSI on svFSIplus immediately received NaN

Posted: Tue Aug 27, 2024 11:40 am
by krashn
Hi SV developers,

I'm trying to run a FSI simulation on this model through my school's cluster on Linux: https://drive.google.com/drive/folders/ ... sp=sharing

After 2 steps, I received NaN values, and the job terminated with this error message:
---------------------------------------------------------------------
Eq N-i T dB Ri/R1 Ri/R0 R/Ri lsIt dB %t
---------------------------------------------------------------------
FS 1-1 9.867e+01 [0 1.000e+00 1.000e+00 1.160e-02] !5100 0 98!
MS 1-1 1.035e+02 [0 1.000e+00 1.000e+00 2.312e-04] !999 0 96!
FS 1-2 2.747e+02 [-2147483648 nan nan nan] !5100 -2147483648 99!
MS 1-2 2.796e+02 [-2147483648 nan nan nan] !999 -2147483648 96!
terminate called after throwing an instance of 'std::runtime_error'
what(): ERROR: NaN detected in RCR integration

I have previously tried to run the same simulation on svFSI (the Fortran solver) and it was able to run and stabilize. When I translated the input file into that in C++, the simulation returned the NaN values immediately after simulation starts. To verify that my RCR conditions are correct, I tried to run the rigid wall simulation on the C++ solver, and they were able to give me stabilized pressure and other hemodynamics data.

For more information on my FSI inputs, in that folder called "init", the file result_3000.vtu is the result from the last time step of the rigid wall simulation, and the file result_500.vtu is the last time step of the deformable wall simulation.

I'd appreciate your time and suggestion!

Re: FSI on svFSIplus immediately received NaN

Posted: Tue Sep 03, 2024 2:41 pm
by davep
Hello,

Looking at the simulation history

Code: Select all

---------------------------------------------------------------------
Eq N-i T dB Ri/R1 Ri/R0 R/Ri lsIt dB %t
---------------------------------------------------------------------
FS 1-1 9.867e+01 [0 1.000e+00 1.000e+00 1.160e-02] !5100 0 98!
MS 1-1 1.035e+02 [0 1.000e+00 1.000e+00 2.312e-04] !999 0 96!
FS 1-2 2.747e+02 [-2147483648 nan nan nan] !5100 -2147483648 99!
MS 1-2 2.796e+02 [-2147483648 nan nan nan] !999 -2147483648 96!
I see that the linear solve is not converging ( !5100 0 98! ).

I did some tests using your simulation files and see that commenting out

Code: Select all

  <!-- Prestress_file_path> init/result_500.vtu </Prestress_file_path -->
  <!-- Initial_displacements_file_path> init/result_500.vtu </Initial_displacements_file_path -->
creates a stable fluid simulation. So there is a problem processing this initial data. I'll investigate, maybe a bug in svFSIplus.

The mesh equation was still not converging so I changed the <Add_equation type="mesh" > Poisson ratio to 0.3 (the mesh simulation assumes a simple linear elastic model I think)

Code: Select all

<Add_equation type="mesh" >
   <Coupled> true </Coupled>
   <Min_iterations> 1 </Min_iterations>
   <Max_iterations> 5 </Max_iterations>
   <Tolerance> 1e-4 </Tolerance>
   <Poisson_ratio> 0.3 </Poisson_ratio>
...
creates a stable simulation at least for the few time steps I ran your job.

Cheers,
Dave