Go to the documentation of this file.
51 pressureControlPtr_(nullptr),
52 turbulencePtr_(nullptr),
53 daTurbulenceModelPtr_(nullptr),
54 daFvSourcePtr_(nullptr),
55 fvSourcePtr_(nullptr),
56 fvSourceEnergyPtr_(nullptr),
57 initialMass_(dimensionedScalar(
"initialMass", dimensionSet(1, 0, 0, 0, 0, 0, 0), 0.0)),
70 Info <<
"Initializing fields for DARhoSimpleFoam" << endl;
78 const word turbModelName(
81 "turbulenceProperties",
82 mesh.time().constant(),
95 if (
allOptions.subDict(
"fvSource").toc().size() != 0)
98 Info <<
"Initializing DASource" << endl;
99 word sourceName =
allOptions.subDict(
"fvSource").toc()[0];
100 word fvSourceType =
allOptions.subDict(
"fvSource").subDict(sourceName).getWord(
"type");
114 #include "createFvOptions.H"
119 Info <<
"\nStarting time loop\n"
127 Info <<
"Time = " <<
runTime.timeName() << nl << endl;
label checkPrimalFailure()
check whether the primal fails based on residual and regression fail flag
label loop(Time &runTime)
return whether to loop the primal solution, similar to runTime::loop() except we don't do file IO
label printToScreen_
whether to print primal information to the screen
autoPtr< DARegression > daRegressionPtr_
DARegression pointer.
autoPtr< DAModel > daModelPtr_
DAModel pointer.
autoPtr< DAIndex > daIndexPtr_
DAIndex pointer.
autoPtr< DATurbulenceModel > daTurbulenceModelPtr_
DATurbulenceModel pointer.
addToRunTimeSelectionTable(DAFunction, DAFunctionForce, dictionary)
autoPtr< DAOption > daOptionPtr_
DAOption pointer.
static autoPtr< DATurbulenceModel > New(const word modelType, const fvMesh &mesh, const DAOption &daOption)
label hasFvSource_
whether to have fvSource term
static autoPtr< DAFvSource > New(const word modelType, const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex)
virtual void initSolver()
initialize fields and variables
defineTypeNameAndDebug(DAFunction, 0)
autoPtr< DAFvSource > daFvSourcePtr_
DASource pointer.
void writeAssociatedFields()
write associated fields such as relative velocity
const dictionary & allOptions
label regModelFail_
whether the regModel compute fails
virtual label solvePrimal()
solve the primal equations
autoPtr< Time > runTimePtr_
runTime pointer
autoPtr< fvMesh > meshPtr_
fvMesh pointer
autoPtr< argList > argsPtr_
args pointer
DARhoSimpleFoam(char *argsAll, PyObject *pyOptions)
void printElapsedTime(const Time &runTime, const label printToScreen)
void calcAllFunctions(label print=0)
calculate the values of all objective functions and print them to screen