Hi,
I see that fluid simulations can be created using sv.simulation.Fluid(). However, it appears that only velocity and resistance boundary conditions are supported. Is there a way to implement rcr boundary conditions in fluid simulations using the Python API? Or if not, is there a way to manually create the simulation files based on a template?
Thanks!
Python API Simulations
- David Parker
- Posts: 1761
- Joined: Tue Aug 23, 2005 2:43 pm
Re: Python API Simulations
Hello,
The sv.simulation.Fluid() class is only partially implemented, was sort of a test of ideas.
SV creates an .svpre and rcrt.dat files from the values set in the Simulation Tool GUI and stored in a .sjb file in under the SV project Simulations directory. The solver.inp file and other input data needed by svSolver is then created by running the svpre program (installed with the svSolver) with the .svpre file.
The easiest thing to do might be to write a Python script that reads in an .sjb file and writes .svpre and rcrt.dat files.
If you are only changing the rcrt.dat file then you could just create that.
Cheers,
Dave
The sv.simulation.Fluid() class is only partially implemented, was sort of a test of ideas.
SV creates an .svpre and rcrt.dat files from the values set in the Simulation Tool GUI and stored in a .sjb file in under the SV project Simulations directory. The solver.inp file and other input data needed by svSolver is then created by running the svpre program (installed with the svSolver) with the .svpre file.
The easiest thing to do might be to write a Python script that reads in an .sjb file and writes .svpre and rcrt.dat files.
If you are only changing the rcrt.dat file then you could just create that.
Cheers,
Dave
- Moses Hamm
- Posts: 10
- Joined: Sun Dec 04, 2022 10:44 pm
Re: Python API Simulations
Thanks David! Quick follow up: I plan to use the SV gateway's svPre feature once I create the .svpre file. However, it also requires the mesh-complete file. Is there an example script of how to create that using the Python API?
- David Parker
- Posts: 1761
- Joined: Tue Aug 23, 2005 2:43 pm
Re: Python API Simulations
Hello,
There are no API functions to create the mesh-complete files needed for a simulation. You can generate these files using a Python script. Have a look here https://github.com/ktbolt/cardiovascula ... ete/python that does this for an FSI simulation to see how to do it.
Cheers,
Dave
There are no API functions to create the mesh-complete files needed for a simulation. You can generate these files using a Python script. Have a look here https://github.com/ktbolt/cardiovascula ... ete/python that does this for an FSI simulation to see how to do it.
Cheers,
Dave