Hello,
The simulation stops in Simvascular using a specified number of timesteps. I'm doing steady simulations and want to stop the simulation based on a specified residual, i.e. stop calculation at residual less than 1e-6. How can we do this using Python or batch script?
Thanks,
Jimmy
Stop simulation based on residual using python/batch script
- Jimmy Azarnoosh
- Posts: 25
- Joined: Mon Oct 05, 2020 5:43 pm
- David Parker
- Posts: 1719
- Joined: Tue Aug 23, 2005 2:43 pm
Re: Stop simulation based on residual using python/batch script
Hi Jimmy,
The third column in the histor.dat file contains the nonlinear residual.
The easiest thing to do would be to write a bash script to launch a svsolver job and then check the value of the residual from the last line in histor.dat. If the residual is smaller than a tolerance then kill the svsolver job.
Cheers,
Dave
The third column in the histor.dat file contains the nonlinear residual.
The easiest thing to do would be to write a bash script to launch a svsolver job and then check the value of the residual from the last line in histor.dat. If the residual is smaller than a tolerance then kill the svsolver job.
Cheers,
Dave
- Jimmy Azarnoosh
- Posts: 25
- Joined: Mon Oct 05, 2020 5:43 pm
Re: Stop simulation based on residual using python/batch script
Thank you Dave
Jimmy
Jimmy