cape.pyfun.cntl: FUN3D control module

This module provides tools to quickly setup basic or complex FUN3D run matrices and serve as an executive for pre-processing, running, post-processing, and managing the solutions. A collection of cases combined into a run matrix can be loaded using the following commands.

>>> import cape.pyfun.cntl
>>> cntl = cape.pyfun.cntl.Cntl("pyFun.json")
>>> cntl
<cape.pyfun.Cntl(nCase=892)>
>>> cntl.x.GetFullFolderNames(0)
'poweroff/m1.5a0.0b0.0'

An instance of this cape.pyfun.cntl.Cntl class has many attributes, which include the run matrix (cntl.x), the options interface (cntl.opts), and optionally the data book (cntl.DataBook), the appropriate input files (such as cntl.Namelist), and possibly others.

Attribute

Class

cntl.x

cape.pyfun.runmatrix.RunMatrix

cntl.opts

cape.pyfun.options.Options

cntl.tri

cape.pyfun.tri.Tri

cntl.DataBook

cape.pyfun.dataBook.DataBook

cntl.Namelist

cape.pyfun.namelist.Namelist

Finally, the cape.pyfun.cntl.Cntl class is subclassed from the cape.cntl.Cntl class, so any methods available to the CAPE class are also available here.

class cape.pyfun.cntl.Cntl(fname='pyFun.json')

Class for handling global options and setup for FUN3D.

This class is intended to handle all settings used to describe a group of FUN3D cases. For situations where it is not sufficiently customized, it can be used partially, e.g., to set up a Mach/alpha sweep for each single control variable setting.

The settings are read from a JSON file, which is robust and simple to read, but has the disadvantage that there is no support for comments. Hopefully the various names are descriptive enough not to require explanation.

Defaults are read from the file options/pyFun.default.json.

Call:
>>> cntl = pyFun.Cntl(fname="pyFun.json")
Inputs:
fname: str

Name of pyFun input file

Outputs:
cntl: cape.pyfun.cntl.Cntl

Instance of the pyFun control class

Data members:
cntl.opts: dict

Dictionary of options for this case (directly from fname)

cntl.x: pyFun.runmatrix.RunMatrix

Values and definitions for variables in the run matrix

cntl.RootDir: str

Absolute path to the root directory

Versions:
  • 2015-10-16 @ddalle: Started

ApplyCase(i, nPhase=None, **kw)

Apply settings from cntl.opts to an individual case

This rewrites each run namelist file and the case.json file in the specified directories.

Call:
>>> cntl.ApplyCase(i, nPhase=None)
Inputs:
cntl: cape.pyfun.cntl.Cntl

FUN3D control interface

i: int

Case number

nPhase: {None} | positive int

Last phase number (default determined by PhaseSequence)

Versions:
  • 2016-03-31 @ddalle: Version 1.0

ArchivePWD(phantom=False)

Archive a single case in the current folder ($PWD)

Call:
>>> cntl.ArchivePWD(phantom=False)
Inputs:
cntl: cape.pyfun.cntl.Cntl

CAPE main control instance

phantom: True | {False}

Write actions to archive.log; only delete if False

Versions:
  • 2017-03-10 @ddalle: First cape.pyfun version

  • 2017-12-15 @ddalle: Added phantom option

CaseGetCurrentIter()

Get the current iteration number from the appropriate module

This function utilizes the cape.case module, and so it must be copied to the definition for each solver’s control class

Call:
>>> n = cntl.CaseGetCurrentIter()
Inputs:
cntl: cape.pyfun.cntl.Cntl

CAPE main control instance

i: int

Index of the case to check (0-based)

Outputs:
n: int or None

Number of completed iterations or None if not set up

Versions:
  • 2015-10-14 @ddalle: Version 1.0

CaseGetCurrentPhase()

Get the current phase number from the appropriate module

This function utilizes the cape.case module, and so it must be copied to the definition for each solver’s control class

Call:
>>> j = cntl.CaseGetCurrentPhase()
Inputs:
cntl: Cntl

CAPE main control instance

i: int

Index of the case to check (0-based)

Outputs:
j: int | None

Phase number

Versions:
  • 2017-06-29 @ddalle: Version 1.0

CaseStartCase()

Start a case by either submitting it or running it

This function relies on cape.pycart.case, and so it is customized for the Cart3D solver only in that it calls the correct case module.

Call:
>>> pbs = cntl.CaseStartCase()
Inputs:
cntl: cape.pyfun.cntl.Cntl

CAPE main control instance

Outputs:
pbs: int or None

PBS job ID if submitted successfully

Versions:
  • 2015-10-14 @ddalle: Version 1.0

CheckError(i)

Check if a case has a failure

Call:
>>> q = cntl.CheckError(i)
Inputs:
cntl: cape.pyfun.cntl.Cntl

FUN3D control interface

i: int

Run index

Outputs:
q: bool

If True, case has FAIL file in it

Versions:
  • 2015-01-02 @ddalle: Version 1.0

  • 2017-04-06 @ddalle: Checking for

    nan_locations*.dat

CheckMesh(i)

Check if the mesh for case i is prepared

Call:
>>> q = cntl.CheckMesh(i)
Inputs:
cntl: cape.pyfun.cntl.Cntl

CAPE main control instance

i: int

Index of the case to check

Outputs:
q: bool

Whether or not the mesh for case i is prepared

Versions:
  • 2015-10-19 @ddalle: Version 1.0

CheckMeshFiles(v=False)

Check for the mesh files in the present folder

Call:
>>> q = cntl.CheckMeshFiles(v=False)
Inputs:
cntl: cape.pyfun.cntl.Cntl

CAPE main control instance

v: True | {False}

Verbose flag

Outputs:
q: bool

Whether or not the present folder has the required mesh files

Versions:
  • 2016-04-11 @ddalle: Version 1.0

  • 2017-02-22 @ddalle: Added verbose option

CheckNone(v=False)

Check if the current folder has the necessary files to run

Call:
>>> q = cntl.CheckNone(v=False)
Inputs:
cntl: cape.pyfun.cntl.Cntl

CAPE main control instance

v: True | {False}

Verbosity option

Outputs:
q: True | False

Whether or not the case is not set up to run

Versions:
  • 2015-10-19 @ddalle: Version 1.0

  • 2016-04-11 @ddalle: Checking for AFLR3 input files,

    too

  • 2016-04-29 @ddalle: Simpler version that handles

    Flow/

  • 2017-02-22 @ddalle: Added verbose option

CleanPWD(phantom=False)

Archive a single case in the current folder ($PWD)

Call:
>>> cntl.CleanPWD(phantom=False)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of control interface

phantom: True | {False}

Write actions to archive.log; only delete if False

Versions:
  • 2017-03-10 @ddalle: Version 1.0

  • 2017-12-15 @ddalle: Added phantom option

CompID2SurfID(compID)

Convert triangulation component ID to surface index

This relies on an XML configuration file and a FUN3D mapbc file

Call:
>>> surfID = cntl.CompID2SurfID(compID)
>>> surfID = cntl.CompID2SurfID(face)
>>> surfID = cntl.CompID2SurfID(comps)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of FUN3D control class

compID: int

Surface boundary ID as used in surface mesh

face: str

Name of face

comps: list (int | str)

List of component IDs or face names

Outputs:
surfID: list[int]

List of corresponding indices of surface in MapBC

Versions:
  • 2016-04-27 @ddalle: Version 1.0

EvalSurfID(comp)

Convert a component name to a MapBC surface index (1-based)

This function also works if the input, comp, is an integer (returns the same integer) or an integer string such as "1". Before looking up an index by name, the function attempts to return int(comp).

Call:
>>> surfID = cntl.EvalSurfID(comp)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of control class

comp: str | int

Component name or surface index (1-based)

Outputs:
surfID: int

Surface index (1-based) according to cntl.MapBC

Versions:
  • 2017-02-23 @ddalle: Version 1.0

ExtendCase(i, n=1, j=None, imax=None)

Add iterations to case i by repeating the last phase

Call:
>>> cntl.ExtendCase(i, n=1, j=None, imax=None)
Inputs:
cntl: cape.pyfun.cntl.Cntl

CAPE main control instance

i: int

Run index

n: {1} | positive int

Add n times steps to the total iteration count

j: {None} | nonnegative int

Apply to phase j, by default use the last phase

imax: {None} | nonnegative int

Use imax as the maximum iteration count

Versions:
  • 2016-12-12 @ddalle: Version 1.0

GetCPUTime(i, running=False)

Read a CAPE-style core-hour file from a case

Call:
>>> CPUt = cntl.GetCPUTime(i, running=False)
Inputs:
cntl: cape.pyfun.cntl.Cntl

FUN3D control interface

i: int

Case index

runing: True | {False}

Whether or not to check for time since last start

Outputs:
CPUt: float | None

Total core hours used in this job

Versions:
  • 2015-12-22 @ddalle: Version 1.0

  • 2016-08-31 @ddalle: Checking time since last start

GetConfigInput(comp, warn=False)

Determine which component indices are in a named component based on the MapBC file, which is always numbered 1,2,…,N. Output the format as a nice string, such as "4-10,13,15-18".

If possible, this is read from the "Inputs" subsection of the "Config" section of the master JSON file. Otherwise, it is read from the "mapbc" and configuration files.

Call:
>>> cntl.GetConfigInput(comp, warn=False)
Inputs:
cntl: cape.pyfun.cntl.Cntl

CAPE main control instance

comp: str

Name of component to process

warn: True | {False}

Whether or not to print warnings if not raising errors

Outputs:
inp: str

String describing list of integers included

Versions:
  • 2016-10-21 @ddalle: Version 1.0

GetGridFormat(j=0)

Get the grid format

The JSON file overrides the value from the namelist file

Call:
>>> fmt = cntl.GetGridFormat(j=0)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of global pyFun settings object

j: int

Run sequence index

Outputs:
fmt: str

Project root name

Versions:
  • 2015-10-18 @ddalle: Version 1.0

GetInputMeshFileNames()

Return the list of mesh files from file

Call:
>>> fname = cntl.GetInputMeshFileNames()
Inputs:
cntl: cape.pyfun.cntl.Cntl

CAPE main control instance

Outputs:
fname: list[str]

List of file names read from root directory

Versions:
  • 2015-10-19 @ddalle: Version 1.0

GetNamelistVar(sec, key, j=0)

Get a namelist variable’s value

The JSON file overrides the value from the namelist file

Call:
>>> val = cntl.GetNamelistVar(sec, key, j=0)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of global pyFun settings object

sec: str

Name of namelist section

key: str

Variable to read

j: int

Run sequence index

Outputs:
val:int`|:class:`float`|:class:`str`|:class:`list

Value

Versions:
  • 2015-10-19 @ddalle: Version 1.0

GetProcessedMeshFileNames()

Return the list of mesh files that are written

Call:
>>> fname = cntl.GetProcessedMeshFileNames()
Inputs:
cntl: cape.pyfun.cntl.Cntl

CAPE main control instance

Outputs:
fname: list[str]

List of file names written to case folders

Versions:
  • 2015-10-19 @ddalle: Version 1.0

GetProjectRootName(j=0)

Get the project root name

The JSON file overrides the value from the namelist file if appropriate

Call:
>>> name = cntl.GetProjectName(j=0)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of global pyFun settings object

j: int

Phase number

Outputs:
name: str

Project root name

Versions:
  • 2015-10-18 @ddalle: Version 1.0

GetSurfBCFlowInitState(key, i, CT=False, comp=None)

Get nondimensional state for flow initialization volumes

Call:
>>> rho, U, c = cntl.GetSurfBCFlowInitState(key, i,
                                            CT=False)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of global pyFun settings object

key: str

Name of SurfBC key to process

i: int

Case index

CT: True | {False}

Whether this key has thrust as input (else p0, T0 directly)

comp: {None} | str

Name of component for which to get BCs

Outputs:
rho: float

Normalized static density, rho/rhoinf

U: float

Normalized velocity, U/ainf

c: float

Normalized sound speed, a/ainf

Versions:
  • 2016-03-29 @ddalle: Version 1.0

  • 2016-04-13 @ddalle: Added CT/BC capability

GetSurfBCState(key, i, comp=None)

Get stagnation pressure and temperature ratios

Call:
>>> p0, T0 = cntl.GetSurfBCState(key, i, comp=None)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of global pyFun settings object

key: str

Name of key to process

i: int

Case index

comp: {None} | str

Name of component for which to get BCs

Outputs:
p0: float

Ratio of BC stagnation pressure to freestream static pressure

T0: float

Ratio of BC stagnation temperature to freestream static temp

Versions:
  • 2016-03-29 @ddalle: Version 1.0

GetSurfBCVolume(key, compID)

Get coordinates for flow initialization box

Call:
>>> x1, x2, r = cntl.GetSurfBCVolume(key, compID)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of global pyFun settings object

key: str

Name of SurfBC key to process

compID: int

Component ID for which to calculate flow volume

Outputs:
x1: np.ndarray[float]

First point of cylinder center line

x2: np.ndarray[float]

End point of cylinder center line

r: float

Radius of cylinder

Versions:
  • 2016-03-29 @ddalle: Version 1.0

GetSurfCTState(key, i, comp=None)

Get stagnation pressure and temperature ratios for SurfCT key

Call:
>>> p0, T0 = cntl.GetSurfCTState(key, i, comp=None)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of global pyFun settings object

key: str

Name of key to process

i: int

Case index

comp: {None} | str

Name of component for which to get BCs

Outputs:
p0: float

Ratio of BC stagnation pressure to freestream static pressure

T0: float

Ratio of BC stagnation temperature to freestream static temp

Versions:
  • 2016-04-13 @ddalle: Version 1.0

NamelistFunction(i)

Apply a function at the end of PrepareNamelist(i)()

This is allows the user to modify settings at a later point than is done using CaseFunction()

This calls the function(s) in the global "NamelistFunction" option from the JSON file. These functions must take cntl as an input and the case number i. The function(s) are usually from a module imported via the "Modules" option. See the following example:

"Modules": ["testmod"],
"NamelistFunction": ["testmod.nmlfunc"]

This leads pyFun to call testmod.nmlfunc(cntl, i) near the end of PrepareNamelist() for each case i in the run matrix.

Call:
>>> cntl.NamelistFunction(i)
Inputs:
cntl: Cntl

Overall control interface

i: int

Case number

Versions:
  • 2017-06-07 @ddalle: Version 1.0

  • 2022-04-13 @ddalle: Version 2.0; exec_modfunction()

See also:
PrepareCase(i)

Prepare a case for running if it is not already prepared

Call:
>>> cntl.PrepareCase(i)
Inputs:
cntl: cape.pyfun.cntl.Cntl

CAPE main control instance

i: int

Index of case to prepare/analyze

Versions:
  • 2015-10-19 @ddalle: Version 1.0

PrepareFAUXGeom(i)

Prepare/edit a FAUXGeom input file for a case

Call:
>>> cntl.PrepareFAUXGeom(i)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of control class

i: int

Case index

Versions:
  • 2017-02-23 @ddalle: Version 1.0

PrepareFreezeSurfs(i)

Prepare adaption file for list of surfaces to freeze during adapts

Call:
>>> cntl.PrepareFreezeSurfs(i)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of control class

i: int

Case index

Versions:
  • 2017-02-23 @ddalle: Version 1.0

PrepareKineticData(i)

Prepare/edit a kineticdata input file for a case

Call:
>>> cntl.PrepareKineticData(i)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of control class

i: int

Case index

Versions:
  • 2018-04-19 @ddalle: Version 1.0

PrepareMesh(i)

Prepare the mesh for case i if necessary

Call:
>>> cntl.PrepareMesh(i)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of control class

i: int

Case index

Versions:
  • 2015-10-19 @ddalle: Version 1.0

  • 2022-04-13 @ddalle: Version 1.1; exec_modfunction()

PrepareNamelist(i)

Write fun3d.nml for run case i in the appropriate folder and with the appropriate settings.

Call:
>>> cntl.PrepareNamelist(i)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of FUN3D control class

i: int

Run index

Versions:
  • 2014-06-04 @ddalle: Version 1.0

  • 2014-06-06 @ddalle: Low-level functionality for grid

    folders

  • 2014-09-30 @ddalle: Changed to write only a single

    case

  • 2018-04-19 @ddalle: Moved flight conditions to new

    function

PrepareNamelistAdiabaticWalls()

Prepare any boundary condition flags if needed

Call:
>>> cntl.PrepareNamelistAdiabiticWalls()
Inputs:
cntl: cape.pyfun.cntl.Cntl

FUN3D settings interface

Versions:
  • 2021-03-22 @jmeeroff: Version 1.0

PrepareNamelistBoundaryConditions()

Prepare any boundary condition flags if needed

Call:
>>> cntl.PrepareNamelistBoundaryConditions()
Inputs:
cntl: cape.pyfun.cntl.Cntl

FUN3D settings interface

Versions:
  • 2018-10-24 @ddalle: Version 1.0

  • 2019-??-?? @jmeeroff: Version 1.1; auto wall

  • 2022-07-13 @ddalle: Version 1.2; “auto” flag

PrepareNamelistBoundaryList()

Write the correct boundary list in namelist

Call:
>>> cntl.SetBoundaryList()
Inputs:
cntl: cape.pyfun.cntl.Cntl

FUN3D settings interface

Versions:
  • 2021-03-18 @jmeeroff: Version 1.0

PrepareNamelistBoundaryPoints()

Write the lines of the boundary point sensors in the namelist

Call:
>>> cntl.PrepareNamelistBoundaryPoints()
Inputs:
cntl: cape.pyfun.cntl.Cntl

FUN3D settings interface

Versions:
  • 2017-09-01 @ddalle: Version 1.0

PrepareNamelistConfig()

Write the lines for the force/moment output in a namelist

Call:
>>> cntl.PrepareNamelistConfig()
Inputs:
cntl: cape.pyfun.cntl.Cntl

CAPE main control instance

Versions:
  • 2015-10-20 @ddalle: Version 1.0

PrepareNamelistFlightConditions(i)

Set namelist flight conditions

Call:
>>> cntl.PrepareNamelistFligntConditions(i)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of FUN3D control class

i: int

Run index

Versions:
  • 2018-04-19 @ddalle: Version 1.0

PrepareRubberData(i)

Prepare rubber.data file if appropriate

Call:
>>> cntl.PrepareRubberData(i)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of FUN3D control class

i: int

Run index

Versions:
  • 2016-04-27 @ddalle: Version 1.0

PrepareSpeciesThermoData(i)

Prepare/edit a speciesthermodata input file for a case

Call:
>>> cntl.PrepareSpeciesThermoData(i)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of control class

i: int

Case index

Versions:
  • 2018-04-19 @ddalle: Version 1.0

PrepareTData(i)

Prepare/edit a tdata input file for a case

Call:
>>> cntl.PrepareTData(i)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of control class

i: int

Case index

Versions:
  • 2018-04-19 @ddalle: Version 1.0

ProcessMeshFileName(fname, fproj=None)

Return a mesh file name using the project root name

Call:
>>> fout = cntl.ProcessMeshFileName(fname, fproj=None)
Inputs:
cntl: cape.pyfun.cntl.Cntl

CAPE main control instance

fname: str

Raw file name to be converted to case-folder file name

fproj: {None} | :class;`str`

Project root name

Outputs:
fout: str

Name of file name using project name as prefix

Versions:
  • 2016-04-05 @ddalle: Version 1.0

  • 2023-03-15 @ddalle: Version 1.1; add fproj

ReadCaseJSON(i)

Read case.json file from case i if possible

Call:
>>> rc = cntl.ReadCaseJSON(i)
Inputs:
ofl: cape.pyfun.cntl.Cntl

Instance of FUN3D control class

i: int

Run index

Outputs:
rc: None | pyOver.options.runControl.RunControl

Run control interface read from case.json file

Versions:
  • 2016-12-12 @ddalle: Version 1.0

  • 2017-03-31 @ddalle: Copied from cape.pyover

ReadCaseNamelist(i, rc=None, j=None)

Read namelist from case i, phase j if possible

Call:
>>> nml = cntl.ReadCaseNamelist(i, rc=None, j=None)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of FUN3D control class

i: int

Run index

rc: None | RunControl

Run control interface read from case.json file

j: {None} | nonnegative int

Phase number

Outputs:
nml: None | pyOver.overNamelist.OverNamelist

Namelist interface is possible

Versions:
  • 2016-12-12 @ddalle: Version 1.0

ReadDataBook(comp=None)

Read the current data book

Call:
>>> cntl.ReadDataBook()
Inputs:
cntl: cape.pyfun.cntl.Cntl

CAPE main control instance

Versions:
  • 2016-09-15 @ddalle: Version 1.0

ReadFAUXGeom()

Read any FAUXGeom input file template

Call:
>>> cntl.ReadFAUXGeom()
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of control class

Versions:
  • 2017-02-23 @ddalle: Version 1.0

ReadFreezeSurfs()

Read list of surfaces to freeze

Call:
>>> cntl.ReadFreezeSurfs()
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of control class

Versions:
  • 2017-02-23 @ddalle: Version 1.0

ReadMapBC(j=0, q=True)

Read the FUN3D boundary condition map

Call:
>>> cntl.ReadMapBC(q=True)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of the pyFun control class

q: {True} | False

Whether or not to read to MapBC, else MapBC0

Versions:
  • 2016-03-30 @ddalle: Version 1.0

ReadMovingBodyInputFile(j=0, q=True)

Read the moving_body.input template

Call:
>>> cntl.ReadMovingBodyInputFile(j=0, q=True)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of the pyFun control class

j: int

Phase number

q: bool

Whether or not to read to Namelist, else Namelist0

Versions:
  • 2015-10-16 @ddalle: Version 1.0

  • 2015-12-31 @ddalle: Added Namelist0

  • 2018-10-22 @ddalle: Forked from ReadNamelist()

ReadNamelist(j=0, q=True)

Read the fun3d.nml file

Call:
>>> cntl.ReadNamelist(j=0, q=True)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of the pyFun control class

j: int

Phase number

q: bool

Whether or not to read to Namelist, else Namelist0

Versions:
  • 2015-10-16 @ddalle: Version 1.0

  • 2015-12-31 @ddalle: Added Namelist0

ReadReport(rep)

Read a report interface

Call:
>>> R = cntl.ReadReport(rep)
Inputs:
cntl: cape.pyfun.cntl.Cntl

CAPE main control instance

rep: str

Name of report

Outputs:
R: pyFun.report.Report

Report interface

Versions:
  • 2018-10-19 @ddalle: Version 1.0

ReadRubberData(j=0, q=True)

Read the rubber.data file

Call:
>>> cntl.ReadRubberData(j=0, q=True)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of the pyFun control class

j: int

Phase number

q: bool

Whether or not read RubberData, else RubberData0

Versions:
  • 2016-04-27 @ddalle: Version 1.0

SetSurfBC(key, i, CT=False)

Set all surface BCs and flow initialization for one key

This uses the 7011 boundary condition and sets the values of BC stagnation pressure to freestream pressure and stagnation temperature to freestream temperature. Further, it creates a flow initialization volume to help with solution startup

Call:
>>> cntl.SetSurfBC(key, i, CT=False)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Instance of global pyFun settings object

key: str

Name of SurfBC key to process

i: int

Case index

CT: True | {False}

Whether this key has thrust as input (else p0, T0 directly)

Versions:
  • 2016-03-29 @ddalle: Version 1.0

  • 2016-04-13 @ddalle: Version 1.1; SurfCT compatibility

  • 2022-06-08 @ddalle: Version 1.2; check auto flow init

SkeletonPWD(phantom=False)

Delete most files in current folder, leaving only a skeleton

Call:
>>> cntl.SkeletonPWD(phantom=False)
Inputs:
cntl: cape.pyfun.cntl.Cntl

CAPE main control instance

phantom: True | {False}

Write actions to archive.log; only delete if False

Versions:
  • 2017-12-14 @ddalle: Version 1.0

WriteFreezeSurfs(fname)

Write a pyfun.freeze file that lists surfaces to freeze

This is about the simplest file format in history, which is simply a list of surface indices.

Call:
>>> cntl.WriteFreezeSurfs(fname)
Inputs:
cntl: cape.pyfun.cntl.Cntl

Control interface

fname: str

Name of file to write

Versions:
  • 2017-02-23 @ddalle: Version 1.0

WritePBS(i)

Write the PBS script(s) for a given case

Call:
>>> cntl.WritePBS(i)
Inputs:
cntl: cape.pyfun.cntl.Cntl

CAPE main control instance

i: int

Run index

Versions:
  • 2014-10-19 @ddalle: Version 1.0

cli(*a, **kw)

Command-line interface

Call:
>>> cntl.cli(*a, **kw)
Inputs:
cntl: cape.pyfun.cntl.Cntl

CAPE main control instance

kw: dict (True | False | str)

Unprocessed keyword arguments

Outputs:
cmd: None | str

Name of command that was processed, if any

Versions:
  • 2018-10-19 @ddalle: Content from bin/ executables