cape.pyus.casecntl: US3D Case control module¶
This module contains the important function casecntl.run_us3d(), which
actually runs us3d or us3d_mpi, along with the utilities that
support it.
It also contains US3D-specific versions of some of the generic methods from
cape.case. For instance the function GetCurrentIter() determines
how many US3D iterations have been run in the current folder, which is
obviously a solver-specific task.
- cape.pyus.casecntl.GetInputInp(rc=None, j=None)¶
Read case namelist
input.inpfile- Call:
>>> inp = pyUS.casecntl.GetInputInp(rc=None, j=None)
- Inputs:
- rc:
cape.pyus.options.runControl.RunControl Run control options
- j:
int Phase number
- rc:
- Outputs:
- inp:
pyUS.inputinpfile.InputInp Interface to
input.inp
- inp:
- Versions:
2019-06-27
@ddalle: First version
- cape.pyus.casecntl.GetPBSScript(i=None)¶
Determine the file name of the PBS script to call
This is a compatibility function for cases that do or do not have multiple PBS scripts in a single run directory
- cape.pyus.casecntl.GetPhaseNumber(rc)¶
Determine the phase number based on files in folder
- Call:
>>> i = casecntl.GetPhaseNumber(rc)
- Inputs:
- rc:
cape.pyfun.options.runControl.RunControl Options interface for run control
- rc:
- Outputs:
- i:
int Most appropriate phase number for a restart
- i:
- Versions:
2020-10-02
@ddalle: Placeholder version
- cape.pyus.casecntl.PrepareFiles(rc, i=None)¶
Prepare file names appropriate to run phase i of FUN3D
- Call:
>>> PrepareFiles(rc, i=None)
- Inputs:
- rc:
cape.pyus.options.runControl.RunControl Options interface from
case.json- i:
int Phase number
- rc:
- Versions:
2016-04-14
@ddalle: First version
- cape.pyus.casecntl.ReadCaseJSON()¶
Read RunControl settings for local case
- Call:
>>> rc = pyUS.casecntl.ReadCaseJSON()
- Outputs:
- rc:
cape.pyus.options.runControl.RunControl Options interface for run control settings
- rc:
- Versions:
2014-10-02
@ddalle: First version2015-10-19
@ddalle: FUN3D version
- cape.pyus.casecntl.RunPhase(rc, i)¶
Run one phase using appropriate commands
- Call:
>>> RunPhase(rc, i)
- Inputs:
- rc:
cape.pyus.options.runControl.RunControl Options interface from
case.json- i:
int Phase number
- rc:
- Versions:
2020-04-16
@ddalle: Starter version
- cape.pyus.casecntl.RunUS3DGenBC(rc, i)¶
Execute
us3d-genbc- Call:
>>> RunUS3DPrepar(rc, i)
- Inputs:
- rc:
cape.pyus.options.runControl.RunControl Options interface from
case.json- i:
int Phase number, does nothing if i is not
0
- rc:
- Versions:
2020-04-16
@ddalle: First version
- cape.pyus.casecntl.RunUS3DPrepar(rc, i)¶
Execute
us3d-prepar- Call:
>>> RunUS3DPrepar(rc, i)
- Inputs:
- rc:
cape.pyus.options.runControl.RunControl Options interface from
case.json- i:
int Phase number, does nothing if i is not
0
- rc:
- Versions:
2020-04-16
@ddalle: First version
- cape.pyus.casecntl.StartCase()¶
Start a case by either submitting it or calling locally
- Call:
>>> casecntl.StartCase()
- Versions:
2014-10-06
@ddalle: First version2015-10-19
@ddalle: Copied fromcape.pycart2020-04-27
@ddalle: Copied fromcape.pyus
- cape.pyus.casecntl.WriteStartTime(tic, rc, i, fname='pyus_start.dat')¶
Write the start time in tic
- Call:
>>> WriteStartTime(tic, rc, i, fname="pyus_start.dat")
- Inputs:
- Versions:
2016-08-31
@ddalle: First version2019-06-27
@ddalle: US3D version
- cape.pyus.casecntl.WriteUserTime(tic, rc, i, fname='pyus_time.dat')¶
Write time usage since time tic to file
- Call:
>>> toc = WriteUserTime(tic, rc, i, fname="pyus_time.dat")
- Inputs:
- Outputs:
- toc:
datetime.datetime Time at which time delta was measured
- toc:
- Versions:
2015-12-09
@ddalle: First version2019-06-27
@ddalle: US3D version
- cape.pyus.casecntl.run_us3d()¶
Setup and run the appropriate US3D command
- Call:
>>> pyUS.casecntl.run_us3d()
- Versions:
2019-06-27
@ddalle: Started