cape.pycart.util¶
This module imports the generic utilities using
from cape.util import *
It also stores the absolute path to the folder containing the
cape.pycart module as the variable pyCartFolder.
The module also provides several other methods for reading multiple
files to determine the situational status of the Cart3D solution in the
present working directory. These methods may be duplicated in
cape.pycart.case.
- See also:
- cape.pycart.util.GetAdaptFolder() str | None¶
Get the most recent adapt folder
Can be one of the following:
adapt??adapt??/FLOWNoneif those do not exist
This function must be called from the top level of a case run directory.
- Call:
>>> fdir = GetAdaptFolder()
- Outputs:
- fdir:
str|None Name of the most recently used
adapt??/folder
- fdir:
- Versions:
2024-06-24
@ddalle: v1.0
- cape.pycart.util.GetHistIter(fname='history.dat')¶
Get the most recent iteration number from a
history.datfile
- cape.pycart.util.GetSteadyHistIter()¶
Get largest steady-state iteration number from
history.dat- Call:
>>> n = GetSteadyHistIter()
- Outputs:
- n:
int Iteration number of last line w/o decimal (integer)
- n:
- Versions:
2015-12-02
@ddalle: v1.0
- cape.pycart.util.GetTotalHistIter()¶
Get current iteration from
history.datcorrected by restart- Call:
>>> n = GetUnsteadyHistIter()
- Outputs:
- n:
float Most recent iteration number, including partial iters
- n:
- Versions:
2015-12-02
@ddalle: v1.0
- cape.pycart.util.GetUnsteadyHistIter()¶
Get largest time-accurate iteration number from
history.dat- Call:
>>> n = GetUnsteadyHistIter()
- Outputs:
- n:
float Most recent iteration number, including partial iterations
- n:
- Versions:
2015-12-02
@ddalle: v1.0
- cape.pycart.util.GetWorkingFolder() str¶
Get the most recent working folder
Can be one of the following:
.(present directory)adapt??adapt??/FLOW
This function must be called from the top level of a case run directory.
- Call:
>>> fdir = GetWorkingFolder()
- Outputs:
- fdir:
str Name of the most recently used working folder with a history file
- fdir:
- Versions:
2014-11-24
@ddalle: v1.02023-06-06
@ddalle: v2.0; supportadapt??/FLOW/2024-06-24
@ddalle: v2.1; useGetAdaptFolder()