Public Member Functions | Static Public Attributes | List of all members
DAOPTION Class Reference
Inheritance diagram for DAOPTION:
Inheritance graph
[legend]
Collaboration diagram for DAOPTION:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self)
 

Static Public Attributes

string solverName = "DASimpleFoam"
 The name of the DASolver to use for primal and adjoint computation. More...
 
float primalMinResTol = 1.0e-8
 The convergence tolerance for the primal solver. More...
 
dictionary primalBC = {}
 The boundary condition for primal solution. More...
 
dictionary normalizeStates
 State normalization for dRdWT computation. More...
 
dictionary objFunc = {}
 Information on objective function. More...
 
dictionary designVar = {}
 Design variable information. More...
 
list designSurfaces = ["None"]
 List of patch names for the design surface. More...
 
dictionary fvSource = {}
 Information for the finite volume source term, which will be added in the momentum equation We support multiple source terms Example "fvSource": { "disk1": { "type": "actuatorDisk", # Actuator disk source. More...
 
string adjJacobianOption = "JacobianFD"
 Adjoint solution option. More...
 
dictionary primalVarBounds
 The variable upper and lower bounds for primal solution. More...
 
bool multiPoint = False
 Whether to perform multipoint optimization. More...
 
int nMultiPoints = 1
 If multiPoint = True, how many primal configurations for the multipoint optimization. More...
 
dictionary adjPartDerivFDStep
 The step size for finite-difference computation of partial derivatives. More...
 
int transonicPCOption = -1
 Which options to use to improve the adjoint equation convergence of transonic conditions This is used only for transonic solvers such as DARhoSimpleCFoam. More...
 
dictionary unsteadyAdjoint = {"mode": "None", "nTimeInstances": -1, "periodicity": -1.0}
 Options for unsteady adjoint. More...
 
int objFuncAvgStart = 1
 At which iteration should we start the averaging of objective functions. More...
 
int adjPCLag = 1
 The interval of recomputing the pre-conditioner matrix dRdWTPC for solveAdjoint By default, dRdWTPC will be re-computed each time the solveAdjoint function is called However, one can increase the lag to skip it and reuse the dRdWTPC computed previously. More...
 
dictionary useAD = {"mode": "None", "dvName": "None", "seedIndex": -9999}
 Whether to use AD: Mode options: forward, reverse, or None. More...
 
string rootDir = "./"
 The root directory is usually . More...
 
string runStatus = "None"
 The run status which can be solvePrimal, solveAdjoint, or calcTotalDeriv. More...
 
bool printPYDAFOAMOptions = False
 Whether to print all options defined in pyDAFoam to screen before optimization. More...
 
bool printDAOptions = True
 Whether to print all DAOption defined in the C++ layer to screen before optimization. More...
 
bool debug = False
 Whether running the optimization in the debug mode, which prints extra information. More...
 
list writeJacobians = ["None"]
 Whether to write Jacobian matrices to file for debugging Example: writeJacobians = ["dRdWT", "dFdW"] This will write the dRdWT and dFdW matrices to the disk. More...
 
int printInterval = 100
 The print interval of primal and adjoint solution, e.g., how frequent to print the primal solution steps, how frequent to print the dRdWT partial derivative computation. More...
 
int printIntervalUnsteady = 500
 The print interval of unsteady primal solvers, e.g., for DAPisoFoam. More...
 
float primalMinResTolDiff = 1.0e2
 Users can adjust primalMinResTolDiff to tweak how much difference between primalMinResTol and the actual primal convergence is consider to be fail=True for the primal solution. More...
 
bool adjUseColoring = True
 Whether to use graph coloring to accelerate partial derivative computation. More...
 
dictionary adjEqnOption
 The Petsc options for solving the adjoint linear equation. More...
 
list normalizeResiduals
 Normalization for residuals. More...
 
dictionary maxResConLv4JacPCMat
 The maximal connectivity level for the dRdWTPC matrix. More...
 
dictionary jacLowerBounds
 The min bound for Jacobians, any value that is smaller than the bound will be set to 0 Setting a large lower bound for preconditioner (PC) can help to reduce memory. More...
 
int maxTractionBCIters = 100
 The maximal iterations of tractionDisplacement boundary conditions. More...
 
dictionary decomposeParDict
 decomposeParDict option. More...
 
string adjStateOrdering = "state"
 The ordering of state variable. More...
 
string meshSurfaceFamily = "None"
 Default name for the mesh surface family. More...
 
string designSurfaceFamily = "designSurfaces"
 Default name for the design surface family. More...
 
dictionary checkMeshThreshold
 The threshold for check mesh call. More...
 
list writeSensMap = ["NONE"]
 The sensitivity map will be saved to disk during optimization for the given design variable names in the list. More...
 
bool writeDeformedFFDs = False
 Whether to write deformed FFDs to the disk during optimization. More...
 

Detailed Description

Define a set of options to use in PYDAFOAM and set their initial values.
This class will be used by PYDAFOAM._getDefOptions()

NOTE: Give an initial value for a new option, this help PYDAFOAM determine the type of this
option. If it is a list, give at least one default value. If it is a dict, you can leave it
blank, e.g., {}. Also, use ## to add comments before the new option such that these comments
will be  picked up by Doxygen. If possible, give examples.

NOTE: We group these options into three categories.
- The basic options are those options that will be used for EVERY solvers and EVERY cases.
- The intermediate options are options that will be used in some of solvers for special
  situation (e.g., primalVarBounds to prevent solution from divergence).
- The advanced options will be used in special situation to improve performance, e.g.,
  maxResConLv4JacPCMat to reduce memory of preconditioner. Its usage is highly case dependent.
  It may also include options that have a default value that is rarely changed, except for
  very special situation.

Definition at line 30 of file pyDAFoam.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)
Nothing needs to be done for initializing DAOPTION

Definition at line 579 of file pyDAFoam.py.

Member Data Documentation

◆ solverName

string solverName = "DASimpleFoam"
static

The name of the DASolver to use for primal and adjoint computation.

See dafoam/src/adjoint/DASolver for more details Currently support:

  • DASimpleFoam: Incompressible steady-state flow solver for Navier-Stokes equations
  • DASimpleTFoam: Incompressible steady-state flow solver for Navier-Stokes equations with temperature
  • DAPisoFoam: Incompressible transient flow solver for Navier-Stokes equations
  • DAPimpleFoam: Incompressible transient flow solver for Navier-Stokes equations
  • DARhoSimpleFoam: Compressible steady-state flow solver for Navier-Stokes equations (subsonic)
  • DARhoSimpleCFoam: Compressible steady-state flow solver for Navier-Stokes equations (transonic)
  • DATurboFoam: Compressible steady-state flow solver for Navier-Stokes equations (turbomachinery)
  • DASolidDisplacementFoam: Steady-state structural solver for linear elastic equations

Definition at line 65 of file pyDAFoam.py.

◆ primalMinResTol

float primalMinResTol = 1.0e-8
static

The convergence tolerance for the primal solver.

If the primal can not converge to 2 orders of magnitude (default) higher than this tolerance, the primal solution will return fail=True

Definition at line 69 of file pyDAFoam.py.

◆ primalBC

dictionary primalBC = {}
static

The boundary condition for primal solution.

The keys should include "variable", "patch", and "value". For turbulence variable, one can also set "useWallFunction" [bool]. Note that setting "primalBC" will overwrite any values defined in the "0" folder. The primalBC setting will be printed to screen for each primal solution during the optimization Example "primalBC": { "U0": {"variable": "U", "patches": ["inlet"], "value": [10.0, 0.0, 0.0]}, "p0": {"variable": "p", "patches": ["outlet"], "value": [101325.0]}, "nuTilda0": {"variable": "nuTilda", "patches": ["inlet"], "value": [1.5e-4]}, "useWallFunction": True, },

Definition at line 82 of file pyDAFoam.py.

◆ normalizeStates

dictionary normalizeStates
static
Initial value:
= {
"p": 1.0,
"phi": 1.0,
"U": 1.0,
"T": 1.0,
"nuTilda": 1.0,
"k": 1.0,
"epsilon": 1.0,
"omega": 1.0,
"p_rgh": 1.0,
"D": 1.0,
}

State normalization for dRdWT computation.

Typically, we set far field value for each state variable. NOTE: If you forget to set normalization value for a state variable, the adjoint may not converge or it may be inaccurate! For "phi", use 1.0 to normalization Example normalizeStates = {"U": 10.0, "p": 101325.0, "phi": 1.0, "nuTilda": 1.e-4}

Definition at line 89 of file pyDAFoam.py.

◆ objFunc

dictionary objFunc = {}
static

Information on objective function.

Each objective function requires a different input forma But for all objectives, we need to give a name to the objective function, e.g., CD or any other preferred name, and the information for each part of the objective function. Most of the time, the objective has only one part (in this case part1), but one can also combine two parts of objectives, e.g., we can define a new objective that is the sum of force and moment. For each part, we need to define the type of objective (e.g., force, moment; we need to use the reserved type names), how to select the discrete mesh faces to compute the objective (e.g., we select them from the name of a patch patchToFace), the name of the patch (wing) for patchToFace, the scaling factor "scale", and whether to compute adjoint for this objective "addToAdjoint". For force objectives, we need to project the force vector to a specific direction. The following example defines that CD is the force that is parallel to flow (parallelToFlow). Alternative, we can also use fixedDirection and provide a direction key for force, i.e., "directionMode": "fixedDirection", "direction": [1.0, 0.0, 0.0]. Since we select parallelToFlow, we need to prescribe the name of angle of attack design variable to determine the flow direction. Here alpha will be defined in runScript.py: DVGeo.addGeoDVGlobal("alpha", [alpha0], alpha, lower=-10.0, upper=10.0, scale=1.0). NOTE: if no alpha is added in DVGeo.addGeoDVGlobal, we can NOT use parallelToFlow. For this case, we have to use "directionMode": "fixedDirection". Example "objFunc": { "CD": { "part1": { "type": "force", "source": "patchToFace", "patches": ["wing"], "directionMode": "parallelToFlow", "alphaName": "alpha", "scale": 1.0 / (0.5 * UmagIn * UmagIn * ARef), "addToAdjoint": True, } }, "CL": { "part1": { "type": "force", "source": "patchToFace", "patches": ["wing"], "directionMode": "normalToFlow", "alphaName": "alpha", "scale": 1.0 / (0.5 * UmagIn * UmagIn * ARef), "addToAdjoint": True, } }, "CMZ": { "part1": { "type": "moment", "source": "patchToFace", "patches": ["wing"], "axis": [0.0, 0.0, 1.0], "center": [0.25, 0.0, 0.05], "scale": 1.0 / (0.5 * UmagIn * UmagIn * ARef * LRef), "addToAdjoint": True, } }, "TPR": { "part1": { "type": "totalPressureRatio", "source": "patchToFace", "patches": ["inlet", "outlet"], "inletPatches": ["inlet"], "outletPatches": ["outlet"], "scale": 1.0, "addToAdjoint": True, } }, "TTR": { "part1": { "type": "totalTemperatureRatio", "source": "patchToFace", "patches": ["inlet", "outlet"], "inletPatches": ["inlet"], "outletPatches": ["outlet"], "scale": 1.0, "addToAdjoint": False, } }, "MFR": { "part1": { "type": "massFlowRate", "source": "patchToFace", "patches": ["inlet"], "scale": -1.0, "addToAdjoint": True, } }, "PL": { "part1": { "type": "totalPressure", "source": "patchToFace", "patches": ["inlet"], "scale": 1.0 / (0.5 * U0 * U0), "addToAdjoint": True, }, "part2": { "type": "totalPressure", "source": "patchToFace", "patches": ["outlet"], "scale": -1.0 / (0.5 * U0 * U0), "addToAdjoint": True, } }, "NU": { "part1": { "type": "wallHeatFlux", "source": "patchToFace", "patches": ["ubend"], "scale": 1.0, "addToAdjoint": True, } }, "VMS": { "part1": { "type": "vonMisesStressKS", "source": "boxToCell", "min": [-10.0, -10.0, -10.0], "max": [10.0, 10.0, 10.0], "scale": 1.0, "coeffKS": 2.0e-3, "addToAdjoint": True, } }, "M": { "part1": { "type": "mass", "source": "boxToCell", "min": [-10.0, -10.0, -10.0], "max": [10.0, 10.0, 10.0], "scale": 1.0, "addToAdjoint": True, } }, "THRUST": { "part1": { "type": "variableVolSum", "source": "boxToCell", "min": [-50.0, -50.0, -50.0], "max": [50.0, 50.0, 50.0], "varName": "fvSource", "varType": "vector", "component": 0, "isSquare": 0, "scale": 1.0, "addToAdjoint": True, }, }, "FI": { "part1": { "type": "stateErrorNorm", "source": "boxToCell", "min": [-100.0, -100.0, -100.0], "max": [100.0, 100.0, 100.0], "stateName": "U", "stateRefName": "UTrue", "stateType": "vector", "scale": 1.0, "addToAdjoint": True, }, "part2": { "type": "stateErrorNorm", "source": "boxToCell", "min": [-100.0, -100.0, -100.0], "max": [100.0, 100.0, 100.0], "stateName": "betaSA", "stateRefName": "betaSATrue", "stateType": "scalar", "scale": 0.01, "addToAdjoint": True, }, }, },

Definition at line 271 of file pyDAFoam.py.

◆ designVar

dictionary designVar = {}
static

Design variable information.

Different type of design variables require different keys For alpha, we need to prescribe a list of far field patch names from which the angle of attack is computed, this is usually a far field patch. Also, we need to prescribe flow and normal axies, and alpha = atan( U_normal / U_flow ) at patches Example designVar = { "shapey" : {"designVarType": "FFD"}, "twist": {"designVarType": "FFD"}, "alpha" = { "designVarType": "AOA", "patches": ["farField"], "flowAxis": "x", "normalAxis": "y" }, "ux0" = { "designVarType": "BC", "patches": ["inlet"], "variable": "U", "comp": 0 }, }

Definition at line 294 of file pyDAFoam.py.

◆ designSurfaces

list designSurfaces = ["None"]
static

List of patch names for the design surface.

These patch names need to be of wall type and shows up in the constant/polyMesh/boundary file

Definition at line 298 of file pyDAFoam.py.

◆ fvSource

dictionary fvSource = {}
static

Information for the finite volume source term, which will be added in the momentum equation We support multiple source terms Example "fvSource": { "disk1": { "type": "actuatorDisk", # Actuator disk source.

This is a child class in DAFvSource "source": "cylinderAnnulusToCell", # Define a volume to add the fvSource term "p1": [-0.4, -0.1, 0.05], # p1 and p2 define the axis and width "p2": [-0.1, -0.1, 0.05], # p2-p1 should be streamwise "innerRadius": 0.01, "outerRadius": 0.5, "rotDir": "left", "scale": 50.0, "POD": 0.7, # pitch/diameter }, "disk2": { "type": "actuatorDisk", "source": "cylinderAnnulusToCell", "p1": [-0.4, 0.1, 0.05], "p2": [-0.1, 0.1, 0.05], "innerRadius": 0.01, "outerRadius": 0.5, "rotDir": "right", "scale": 25.0, # scale the source such the integral equals desired thrust "POD": 1.0, }, "line1": { "type": "actuatorPoint", "smoothFunction": "hyperbolic", # or gaussian "center": [-0.55, 0.0, 0.05], # center and size define a rectangular "size": [0.2, 0.2, 0.1], "amplitude": [0.0, 0.2, 0.0], "thrustDirIdx": 0, "periodicity": 0.1, "eps": 10.0, "scale": 10.0 # scale the source such the integral equals desired thrust }, "gradP" { "type": "uniformPressureGradient", "value": 1e-3, "direction": [1.0, 0.0, 0.0], }, },

Definition at line 349 of file pyDAFoam.py.

◆ adjJacobianOption

string adjJacobianOption = "JacobianFD"
static

Adjoint solution option.

JacobianFD: Using finite-difference method to compute the partials JacobianFree: Using the matrix-free GMRES to solve the adjoint equation without computing the state Jacobians.

Definition at line 355 of file pyDAFoam.py.

◆ primalVarBounds

dictionary primalVarBounds
static
Initial value:
= {
"UMax": 1e16,
"UMin": -1e16,
"pMax": 1e16,
"pMin": -1e16,
"p_rghMax": 1e16,
"p_rghMin": -1e16,
"eMax": 1e16,
"eMin": -1e16,
"TMax": 1e16,
"TMin": -1e16,
"hMax": 1e16,
"hMin": -1e16,
"DMax": 1e16,
"DMin": -1e16,
"rhoMax": 1e16,
"rhoMin": -1e16,
"nuTildaMax": 1e16,
"nuTildaMin": 1e-16,
"kMax": 1e16,
"kMin": 1e-16,
"omegaMax": 1e16,
"omegaMin": 1e-16,
"epsilonMax": 1e16,
"epsilonMin": 1e-16,
"ReThetatMax": 1e16,
"ReThetatMin": 1e-16,
"gammaIntMax": 1e16,
"gammaIntMin": 1e-16,
}

The variable upper and lower bounds for primal solution.

The key is variable+"Max/Min". Setting the bounds increases the robustness of primal solution for compressible solvers. Also, we set lower bounds for turbulence variables to ensure they are physical Example primalValBounds = {"UMax": 1000, "UMin": -1000, "pMax": 1000000}

Definition at line 362 of file pyDAFoam.py.

◆ multiPoint

bool multiPoint = False
static

Whether to perform multipoint optimization.

Definition at line 394 of file pyDAFoam.py.

◆ nMultiPoints

int nMultiPoints = 1
static

If multiPoint = True, how many primal configurations for the multipoint optimization.

Definition at line 397 of file pyDAFoam.py.

◆ adjPartDerivFDStep

dictionary adjPartDerivFDStep
static
Initial value:
= {
"State": 1.0e-6,
"FFD": 1.0e-3,
"BC": 1.0e-2,
"AOA": 1.0e-3,
"ACTP": 1.0e-2,
"ACTD": 1.0e-2,
"ACTL": 1.0e-2,
}

The step size for finite-difference computation of partial derivatives.

The default values will work for most of the case.

Definition at line 401 of file pyDAFoam.py.

◆ transonicPCOption

int transonicPCOption = -1
static

Which options to use to improve the adjoint equation convergence of transonic conditions This is used only for transonic solvers such as DARhoSimpleCFoam.

Definition at line 413 of file pyDAFoam.py.

◆ unsteadyAdjoint

dictionary unsteadyAdjoint = {"mode": "None", "nTimeInstances": -1, "periodicity": -1.0}
static

Options for unsteady adjoint.

mode can be hybridAdjoint or timeAccurateAdjoint Here nTimeInstances is the number of time instances and periodicity is the periodicity of flow oscillation (hybrid adjoint only)

Definition at line 418 of file pyDAFoam.py.

◆ objFuncAvgStart

int objFuncAvgStart = 1
static

At which iteration should we start the averaging of objective functions.

This is only used for unsteady solvers

Definition at line 422 of file pyDAFoam.py.

◆ adjPCLag

int adjPCLag = 1
static

The interval of recomputing the pre-conditioner matrix dRdWTPC for solveAdjoint By default, dRdWTPC will be re-computed each time the solveAdjoint function is called However, one can increase the lag to skip it and reuse the dRdWTPC computed previously.

This obviously increses the speed because the dRdWTPC computation takes about 30% of the adjoint total runtime. However, setting a too large lag value will decreases the speed of solving the adjoint equations. One needs to balance these factors

Definition at line 430 of file pyDAFoam.py.

◆ useAD

dictionary useAD = {"mode": "None", "dvName": "None", "seedIndex": -9999}
static

Whether to use AD: Mode options: forward, reverse, or None.

If forward mode AD is used the seedIndex will be set to compute derivative by running the whole primal solver. dvName is the name of design variable to set the seed for the forward AD setting seedIndex to -1 for dFdField will assign seeds for all design variables.

Definition at line 436 of file pyDAFoam.py.

◆ rootDir

string rootDir = "./"
static

The root directory is usually .

/

Definition at line 443 of file pyDAFoam.py.

◆ runStatus

string runStatus = "None"
static

The run status which can be solvePrimal, solveAdjoint, or calcTotalDeriv.

This parameter is used internally, so users should never change this option in the Python layer.

Definition at line 447 of file pyDAFoam.py.

◆ printPYDAFOAMOptions

bool printPYDAFOAMOptions = False
static

Whether to print all options defined in pyDAFoam to screen before optimization.

Definition at line 450 of file pyDAFoam.py.

◆ printDAOptions

bool printDAOptions = True
static

Whether to print all DAOption defined in the C++ layer to screen before optimization.

Definition at line 453 of file pyDAFoam.py.

◆ debug

bool debug = False
static

Whether running the optimization in the debug mode, which prints extra information.

Definition at line 456 of file pyDAFoam.py.

◆ writeJacobians

list writeJacobians = ["None"]
static

Whether to write Jacobian matrices to file for debugging Example: writeJacobians = ["dRdWT", "dFdW"] This will write the dRdWT and dFdW matrices to the disk.

Definition at line 462 of file pyDAFoam.py.

◆ printInterval

int printInterval = 100
static

The print interval of primal and adjoint solution, e.g., how frequent to print the primal solution steps, how frequent to print the dRdWT partial derivative computation.

Definition at line 466 of file pyDAFoam.py.

◆ printIntervalUnsteady

int printIntervalUnsteady = 500
static

The print interval of unsteady primal solvers, e.g., for DAPisoFoam.

Definition at line 469 of file pyDAFoam.py.

◆ primalMinResTolDiff

float primalMinResTolDiff = 1.0e2
static

Users can adjust primalMinResTolDiff to tweak how much difference between primalMinResTol and the actual primal convergence is consider to be fail=True for the primal solution.

Definition at line 473 of file pyDAFoam.py.

◆ adjUseColoring

bool adjUseColoring = True
static

Whether to use graph coloring to accelerate partial derivative computation.

Unless you are debugging the accuracy of partial computation, always set it to True

Definition at line 477 of file pyDAFoam.py.

◆ adjEqnOption

dictionary adjEqnOption
static
Initial value:
= {
"globalPCIters": 0,
"asmOverlap": 1,
"localPCIters": 1,
"jacMatReOrdering": "rcm",
"pcFillLevel": 1,
"gmresMaxIters": 1000,
"gmresRestart": 1000,
"gmresRelTol": 1.0e-6,
"gmresAbsTol": 1.0e-14,
"gmresTolDiff": 1.0e2,
"useNonZeroInitGuess": False,
"printInfo": 1,
}

The Petsc options for solving the adjoint linear equation.

These options should work for most of the case. If the adjoint does not converge, try to increase pcFillLevel to 2, or try "jacMatReOrdering": "nd"

Definition at line 482 of file pyDAFoam.py.

◆ normalizeResiduals

list normalizeResiduals
static
Initial value:
= [
"URes",
"pRes",
"p_rghRes",
"nuTildaRes",
"phiRes",
"TRes",
"DRes",
"kRes",
"omegaRes",
"epsilonRes",
]

Normalization for residuals.

We should normalize all residuals!

Definition at line 498 of file pyDAFoam.py.

◆ maxResConLv4JacPCMat

dictionary maxResConLv4JacPCMat
static
Initial value:
= {
"pRes": 2,
"phiRes": 1,
"URes": 2,
"TRes": 2,
"nuTildaRes": 2,
"kRes": 2,
"epsilonRes": 2,
"omegaRes": 2,
"p_rghRes": 2,
"DRes": 2,
}

The maximal connectivity level for the dRdWTPC matrix.

Reducing the connectivity level reduce the memory usage, however, it may slow down the adjoint equation convergence. The default value should have the best convergence speed but not optimal memory usage.

Definition at line 514 of file pyDAFoam.py.

◆ jacLowerBounds

dictionary jacLowerBounds
static
Initial value:
= {
"dRdW": 1.0e-30,
"dRdWPC": 1.0e-30,
}

The min bound for Jacobians, any value that is smaller than the bound will be set to 0 Setting a large lower bound for preconditioner (PC) can help to reduce memory.

Definition at line 529 of file pyDAFoam.py.

◆ maxTractionBCIters

int maxTractionBCIters = 100
static

The maximal iterations of tractionDisplacement boundary conditions.

Definition at line 535 of file pyDAFoam.py.

◆ decomposeParDict

dictionary decomposeParDict
static
Initial value:
= {
"method": "scotch",
"simpleCoeffs": {"n": [2, 2, 1], "delta": 0.001},
"preservePatches": ["None"],
}

decomposeParDict option.

This file will be automatically written such that users can run optimization with any number of CPU cores without the need to manually change decomposeParDict

Definition at line 540 of file pyDAFoam.py.

◆ adjStateOrdering

string adjStateOrdering = "state"
static

The ordering of state variable.

Options are: state or cell. Most of the case, the state odering is the best choice.

Definition at line 548 of file pyDAFoam.py.

◆ meshSurfaceFamily

string meshSurfaceFamily = "None"
static

Default name for the mesh surface family.

Users typically don't need to change

Definition at line 551 of file pyDAFoam.py.

◆ designSurfaceFamily

string designSurfaceFamily = "designSurfaces"
static

Default name for the design surface family.

Users typically don't need to change

Definition at line 554 of file pyDAFoam.py.

◆ checkMeshThreshold

dictionary checkMeshThreshold
static
Initial value:
= {
"maxAspectRatio": 1000.0,
"maxNonOrth": 70.0,
"maxSkewness": 4.0,
"maxIncorrectlyOrientedFaces": 0,
}

The threshold for check mesh call.

Definition at line 557 of file pyDAFoam.py.

◆ writeSensMap

list writeSensMap = ["NONE"]
static

The sensitivity map will be saved to disk during optimization for the given design variable names in the list.

Currently only support design variable type FFD and Field The surface sensitivity map is separated from the primal solution because they only have surface mesh. They will be saved to folders such as 1e-11, 2e-11, 3e-11, etc, When loading in paraview, you need to uncheck the "internalMesh", and check "allWalls" on the left panel If your design variable is of field type, the sensitivity map will be saved along with the primal solution because they share the same mesh. The sensitivity files read sens_objFuncName_designVarName NOTE: this function only supports adjJacobianOption = JacobianFree Example: "writeSensMap" : ["shapex", "shapey"]

Definition at line 574 of file pyDAFoam.py.

◆ writeDeformedFFDs

bool writeDeformedFFDs = False
static

Whether to write deformed FFDs to the disk during optimization.

Definition at line 577 of file pyDAFoam.py.


The documentation for this class was generated from the following file: