Go to the documentation of this file.
49 alphaPorosityPtr_(nullptr),
50 laminarTransportPtr_(nullptr),
51 turbulencePtr_(nullptr),
52 daTurbulenceModelPtr_(nullptr),
53 daFvSourcePtr_(nullptr),
54 fvSourcePtr_(nullptr),
71 Info <<
"Initializing fields for DASimpleTFoam" << endl;
86 if (
allOptions.subDict(
"fvSource").toc().size() != 0)
89 Info <<
"Initializing DASource" << endl;
90 word sourceName =
allOptions.subDict(
"fvSource").toc()[0];
91 word fvSourceType =
allOptions.subDict(
"fvSource").subDict(sourceName).getWord(
"type");
113 #include "createFvOptions.H"
116 daOptionPtr_->setOption<word>(
"runStatus",
"solvePrimal");
121 Info <<
"\nStarting time loop\n"
140 label printInterval =
daOptionPtr_->getOption<label>(
"printInterval");
141 label printToScreen = 0;
149 Info <<
"Time = " <<
runTime.timeName() << nl << endl;
170 Info <<
"ExecutionTime = " <<
runTime.elapsedCpuTime() <<
" s"
171 <<
" ClockTime = " <<
runTime.elapsedClockTime() <<
" s"
void writeFailedMesh()
write the failed mesh to disk
const dictionary & allOptions
label loop(Time &runTime)
return whether to loop the primal solution, similar to runTime::loop() except we don't do file IO
autoPtr< DATurbulenceModel > daTurbulenceModelPtr_
DATurbulenceModel pointer.
autoPtr< DACheckMesh > daCheckMeshPtr_
DACheckMesh object pointer.
autoPtr< DAModel > daModelPtr_
DAModel pointer.
autoPtr< DAIndex > daIndexPtr_
DAIndex pointer.
virtual label solvePrimal(const Vec xvVec, Vec wVec)
solve the primal equations
singlePhaseTransportModel & laminarTransport
autoPtr< DAOption > daOptionPtr_
DAOption pointer.
void calcPrimalResidualStatistics(const word mode, const label writeRes=0)
calculate the norms of all residuals and print to screen
DASimpleTFoam(char *argsAll, PyObject *pyOptions)
label isPrintTime(const Time &runTime, const label printInterval) const
autoPtr< DALinearEqn > daLinearEqnPtr_
DALinearEqn pointer.
static autoPtr< DAFvSource > New(const word modelType, const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex)
void setDAObjFuncList()
initialize DASolver::daObjFuncPtrList_ one needs to call this before calling printAllObjFuncs
void printAllObjFuncs()
calculate the values of all objective functions and print them to screen
autoPtr< DAFvSource > daFvSourcePtr_
DASource pointer.
scalar primalMinRes_
the maximal residual for primal solution
autoPtr< Time > runTimePtr_
runTime pointer
autoPtr< fvMesh > meshPtr_
fvMesh pointer
defineTypeNameAndDebug(DAFvSource, 0)
addToRunTimeSelectionTable(DAFvSource, DAFvSourceActuatorDisk, dictionary)
void ofField2StateVec(Vec stateVec) const
set the state vector based on the latest fields in OpenFOAM
label checkMesh() const
check the mesh quality and return meshOK
label checkResidualTol()
check whether the min residual in primal satisfy the prescribed tolerance
void pointVec2OFMesh(const Vec xvVec) const
assign the points in fvMesh of OpenFOAM based on the point vector
virtual void initSolver()
initialize fields and variables
label hasFvSource_
whether to have fvSource term