cape.pycart.aeroCsh
: Cart3D aero.csh
interface¶
This is a module built off of the cape.filecntl
module customized for
manipulating aero.csh
files. Such files are actually C shell scripts
copied into each run directory that operate adaptive runs of Cart3D. The
primary action of the AeroCsh
is to set the values of
several variables within the script.
Because this is a C shell script, the pyCart.aeroCsh.AeroCsh.Write()
method creates an executable script.
Parameters that are set in the header section of aero.csh
include
inputs to cubes
, mgPrep
, flowCart
, and adjointCart
. This is in
addition to the overall mesh adaptation parameters set in
cape.pycart.options.runControl.Adaptation
.
- See Also:
- class cape.pycart.aeroCsh.AeroCsh(fname='aero.csh')¶
File control class for
aero.csh
filesThis class is derived from
cape.filecntl.filecntl.FileCntl
.- Call:
>>> AC = AeroCsh() >>> AC = AeroCsh(fname="aero.csh")
- Inputs:
- fname:
str
Name of CNTL file to read, defaults to
'aero.csh'
- fname:
- GetVar(name)¶
Get generic
aero.csh
variable value- Call:
>>> val = AC.GetVar(name)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- name:
str
Name of variable as identified in ‘aero.csh’
- AC:
- Outputs:
- val:
str
Text of value from file
- val:
- Versions:
2023-06-05
@ddalle
: v1.0
- Prepare(opts, j=0)¶
Prepare all the key parameters of an
aero.csh
file- Call:
>>> AC.Prepare(opts, j)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- opts:
pyCart.options.Options
Options interface
- j:
int
Run sequence index
- AC:
- Versions:
2015-11-09
@ddalle
: v1.0 (prev inpycart.cntl
)
- SetABuffer(buf)¶
Set the number of buffer layers when refining a cell
- Call:
>>> AC.SetABuffer(buf)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- buf:
int
Number of buffer layers
- AC:
- Versions:
2014-11-14
@ddalle
: v1.0
- SetAPC(apc)¶
Set the list of mesh growth factors
- Call:
>>> AC.SetAPC(apc)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- apc: array_like
Vector of
'p'
and'a'
- AC:
- Versions:
2014-10-13
@ddalle
: v1.0
- SetAdjFirstOrder(adj)¶
Set flag to run adjointCart first-order
- Call:
>>> AC.SetAdjFirstOrder(adj)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- adj:
bool
Whether or not to run adjointCart first-order
- AC:
- Versions:
2014-11-20
@ddalle
: v1.0
- SetAdjointCartMG(mg_ad)¶
Set the number of multigrid levels for adjointCart
- Call:
>>> AC.SetAdjointCartMG(mg_ad)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- mg_ad:
int
Number of adjointCart multigrid levels
- AC:
- Versions:
2014-11-20
@ddalle
: v1.0
- SetBinaryIO(binaryIO)¶
Set whether or not to write binary Tecplot files
- Call:
>>> AC.SetBinaryIO(binaryIO)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- binaryIO:
bool
Whether or not to write binary Tecplot files
- AC:
- Versions:
2014-11-19
@ddalle
: v1.02023-06-05
@ddalle
: v2.0; two output formats
- SetBuffLim(buffLim)¶
Turn on or off buffer limiting to smear shocks
- Call:
>>> AC.SetBuffLim(buffLim)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- buffLim:
bool
Whether or not to use the
-buffLim
flag
- AC:
- Versions:
2014-12-19
@ddalle
: v1.0
- SetCFL(cfl)¶
Set the CFL number
- Call:
>>> AC.SetCFL(cfl)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- cfl:
float
CFL number
- AC:
- Versions:
2014-06-10
@ddalle
: v1.0
- SetCFLMin(cflmin)¶
Set the minimum CFL number, which
aero.csh
uses as backup- Call:
>>> AC.SetCFLMin(cflmin)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- cfl:
float
CFL number
- AC:
- Versions:
2014-10-03
@ddalle
: v1.0
- SetCubesA(a)¶
Set the angle criterion for cubes
- Call:
>>> AC.SetCubesA(a)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- a:
float
Angle criterion for cubes
- AC:
- Versions:
2014-12-04
@ddalle
: v1.0
- SetCubesB(b)¶
Set number of buffer layers for cubes
- Call:
>>> AC.SetCubesB(b)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- b:
int
Number of buffer layers for cubes
- AC:
- Versions:
2014-12-04
@ddalle
: v1.0
- SetErrorTolerance(etol)¶
Set error tolerance in
aero.csh
file- Call:
>>> AC.SetErrorTolerance(etol)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- etol:
float
Number to set the function error tolerance to
- AC:
- Versions:
2014-06-10
@ddalle
: v1.0
- SetFMG(fmg)¶
Turn on or off
-no_fmg
flag- Call:
>>> AC.SetFMG(fmg)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- fmg:
bool
Whether or not to use full multigrid
- AC:
- Versions:
2014-11-13
@ddalle
: v1.0
- SetFinalMeshXRef(xref)¶
Set the number of additional adaptations on final error map
- Call:
>>> AC.SetFinalMeshXRef(xref)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- xref:
int
Number of additional adaptations
- AC:
- Versions:
2014-11-14
@ddalle
: v1.0
- SetFlowCartMG(mg_fc)¶
Set the number of multigrid levels for flowCart
- Call:
>>> AC.SetFlowCartMG(mg_fc)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- mg_fc:
int
Number of flowCart multigrid levels
- AC:
- Versions:
2014-11-20
@ddalle
: v1.0
- SetLimiter(limiter)¶
Set the limiter for flowCart
- Call:
>>> AC.SetLimiter(limiter)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- limiter:
int
Limiter, 2 or 5
- AC:
- Versions:
2014-10-13
@ddalle
: v1.0
- SetMaxR(maxR)¶
Set the maximum number of refinements for cubes
- Call:
>>> AC.SetMaxR(maxR)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- maxR:
int
Maximum number of refinements for cubes
- AC:
- Versions:
2014-12-04
@ddalle
: v1.0
- SetMaxnCells(max_nCells)¶
Set the maximum number of cells for the mesh
- Call:
>>> AC.SetMaxnCells(max_nCells)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- max_nCells:
int
Maximum number of cells allowed in mesh
- AC:
- Versions:
2014-06-10
@ddalle
: v1.0
- SetMeshGrowth(mesh_growth)¶
Set the list of mesh growth factors
- Call:
>>> AC.SetMeshGrowth(mesh_growth)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- mesh_growth: array_like
Vector of mesh growth parameters
- AC:
- Versions:
2014-06-10
@ddalle
: v1.0
- SetPMG(pmg)¶
Turn on or off
-pmg
flag- Call:
>>> AC.SetPMG(pmg)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- pmg:
bool
Whether or not to use poly multigrid
- AC:
- Versions:
2014-11-13
@ddalle
: v1.0
- SetPreSpec(pre=True)¶
Turn on or off
preSpec.c3d.cntl
- Call:
>>> AC.SetPreSpec(pre=True)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- pre:
bool
Whether or not to use prespecified regions
- AC:
- Versions:
2014-12-04
@ddalle
: v1.0
- SetTM(tm)¶
Turn on or off option to use first-order cut cells
- Call:
>>> AC.SetTM(tm)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- tm:
bool
orint
Use first-order cut cells (tm=0) or not (tm=1)
- AC:
- Versions:
2014-12-19
@ddalle
: v1.0
- SetVar(name, val, f=False)¶
Set generic
aero.csh
variable value- Call:
>>> AC.SetVar(name, val)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- name:
str
Name of variable as identified in ‘aero.csh’
- val: any, converted using
str()
Value to which variable is set in final script
- AC:
- Versions:
2014-06-10
@ddalle
: v1.0
- SetYIsSpanwise(y_is_spanwise)¶
Turn on or off y_is_spanwise flag
- Call:
>>> AC.SetYIsSpanwise(y_is_spanwise)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- y_is_spanwise:
bool
Whether or not to use y-axis as spanwise axis
- AC:
- Versions:
2014-11-11
@ddalle
: v1.02023-06-05
@ddalle
: v2.0; two output formats
- SetnAdapt(n_adapt_cycles)¶
Set the number of adaptation cycles
- Call:
>>> AC.SetnAdapt(n_adapt_cycles)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- n_adapt_cycles:
int
Number of adaptation cycles
- AC:
- Versions:
2014-06-10
@ddalle
: v1.0
- SetnIter(it_fc)¶
Set the initial number of flowCart iterations
- Call:
>>> AC.SetnIter(it_fc)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- it_fc:
int
Number of flowCart iters on initial mesh
- AC:
- Versions:
2014-06-10
@ddalle
: v1.0
- SetnIterAdjoint(it_ad)¶
Set the number of adjointCart iterations
- Call:
>>> AC.SetnIter(it_ad)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- it_ad:
int
Number of adjointCart iters
- AC:
- Versions:
2014-06-10
@ddalle
: v1.0
- SetnIterList(ws_it)¶
Set the number of flowCart iterations on new mesh
- Call:
>>> AC.SetnIterList(ws_it)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- ws_it:
int
Number of flowCart iters on subsequent meshes
- AC:
- Effects:
Writes a line of the form
'set ws_it = ( 50 50 50 )'
- Versions:
2014-06-10
@ddalle
: v1.0
- SetnMultiGrid(mg_fc)¶
Set the number of multigrid levels for both solvers
- Call:
>>> AC.SetnMultiGrid(mg_fc)
- Inputs:
- AC:
AeroCsh
Instance of the
aero.csh
manipulation class- mg_fc:
int
Number of multigrid levels, applied to flowCart and adjointCart
- AC:
- Versions:
2014-06-10
@ddalle
: v1.0