How to start a simulation
MENY
How to start a simulation
How to start a simulation
The main interface for starfish is python script starfish.py, which has a text based menu to guide your use. You can start this by typing the following in a terminal
$ python starfish.py
The remainder of this page is most relevant to STARFiSh_v0.3, but most is the same for v0.4, just switch Main.py to Simulator.py
To start a simulation you run the file Simulator.py (Main.py) located in the directory STARFiSh. In a Linux/Unix terminal, a typical simulation is run as followed:
$ python Simulator.py -optionsOptions:
- -h: show help message and exit
- -f: open file with given network name
$ python Simulator.py -f singleBifurcation
- -n: set in data number of the solution data you want to save you data. The data number can be any combination of letters or/and number up to 3 characters long (e.g. 2ae). If no data number is given, the network is saved with data number 999, which is kind of the temporary data number name. If a solution file with the defined data number exists already, it will be overwritten without any warnings!
$ python Simulator.py -f singleBifurcation -n 22a
-
- -d : simulation case description
$ python Simulator.py -f singleBifurcation -n 22a -d 'my first simulation'
- -s : save simulation result True/False, if a data number is defined with -n then the simulation is saved anyway, so this option is outdated and does not have to be set
- -v: Choose visualisation mode:
- 0: no visualisation
- 1: 2d and 3d visualisation
- 2: 2d visualisation
- 3: 3d visualisation
$ python Simulator.py -f singleBifurcation -n 22a -d 'my first simulation' -v 3
- -r: re-simulate case with same network saved with given data number. If this option is disabled (default) then all network data is loaded from the network xml file with the defined network name. If this option is set (see example) then all network data is restored from the already saved simulation file specified with the network name and the data number. This comes particular useful if it is needed to re-run a simulation, but the nework xml file has changed (e.g. different boundary conditions).
$ python Simulator.py -f singleBifurcation -n 22a -d 'my first simulation' -v 3 -r
Special cases
The options -f and -d are compulsory, however if one is not defined the code will ask for the needed informations.-n option is not specified
In this case the simulation is save default with the temporary data number n = 999. It means this solution file is overwritten every time you run a simulation defined without data number.-f option is not specified
The following massage will show all available networks and an input prompt:[ 0 ] - singleBifurcation [ 1 ] - singleVessel Choose simulation case you want to open according to its number:Choose the network to simulate by typing the corresponding number (e.g. "0" for singleBifurcation).
-d option is not specified
The following massage will show up with an input prompt for the case description:Type in description of the simulation case:
Type in the description of you simulation case for example: 'my first simulation' (Note: here you don't need to specify the string with ' ')