Problem
I was working with a user on initializing an svMultiPhysics fluid simulation state from a 0D simulation; projecting the 0D pressure and velocity to the 3D mesh VTU file and using that in the Initial_pressures_file_path and Initial_velocities_file_path solver XML parameters.
Starting a svMultiPhysics fluid simulation using 0D simulation has almost no effect on results. However, a simulation can be fully initialized and continued no problem from a stFile_last.bin file.
Looking at init_from_bin I see that stFile_last.bin file sets state data for time step unknowns in the 0D domain,velocity, pressure, and acceleration
bin_file.read((char*)cplBC.xo.data(), cplBC.xo.msize());
bin_file.read((char*)Yo.data(), Yo.msize());
bin_file.read((char*)Ao.data(), Ao.msize());
cplBC.xo is used to initialize RCR BC integration. Not using this data is the primary reason the simulation state is not fully initialized.
Solution
One solution is to initialize the RCR BCs using the script written by @taeoukkim to compute a phase-aware initial capacitor pressure for RCR boundary conditions; this will soon be added to https://github.com/SimVascular/svMultiPhysics/tree/main/utilities.
Another solution would be to have the 0D and 1D solvers write RCR state data that can be read in by svMultiPhysics to initialize RCR BCs.
Additional context
Note that the svSolver CFD solver can read in just pressure and velocity data to fully initialize its state.
Code of Conduct
Problem
I was working with a user on initializing an svMultiPhysics fluid simulation state from a 0D simulation; projecting the 0D pressure and velocity to the 3D mesh VTU file and using that in the
Initial_pressures_file_pathandInitial_velocities_file_pathsolver XML parameters.Starting a svMultiPhysics fluid simulation using 0D simulation has almost no effect on results. However, a simulation can be fully initialized and continued no problem from a
stFile_last.binfile.Looking at init_from_bin I see that
stFile_last.binfile sets state data fortime step unknowns in the 0D domain,velocity, pressure, and accelerationcplBC.xois used to initialize RCR BC integration. Not using this data is the primary reason the simulation state is not fully initialized.Solution
One solution is to initialize the RCR BCs using the script written by @taeoukkim to compute a phase-aware initial capacitor pressure for RCR boundary conditions; this will soon be added to https://github.com/SimVascular/svMultiPhysics/tree/main/utilities.
Another solution would be to have the 0D and 1D solvers write RCR state data that can be read in by svMultiPhysics to initialize RCR BCs.
Additional context
Note that the svSolver CFD solver can read in just pressure and velocity data to fully initialize its state.
Code of Conduct