Go to the documentation of this file.
24 fvSourcePtr_(nullptr),
37 Info <<
"Initializing fields for DAHeatTransferFoam" << endl;
68 daOptionPtr_->setOption<word>(
"runStatus",
"solvePrimal");
70 Info <<
"\nCalculating temperature distribution\n"
86 label printInterval =
daOptionPtr_->getOption<label>(
"printIntervalUnsteady");
87 label printToScreen = 0;
95 Info <<
"Time = " <<
runTime.timeName() << nl << endl;
112 Info <<
"ExecutionTime = " <<
runTime.elapsedCpuTime() <<
" s"
113 <<
" ClockTime = " <<
runTime.elapsedClockTime() <<
" s"
void writeFailedMesh()
write the failed mesh to disk
label loop(Time &runTime)
return whether to loop the primal solution, similar to runTime::loop() except we don't do file IO
autoPtr< DACheckMesh > daCheckMeshPtr_
DACheckMesh object pointer.
fvScalarMatrix TEqn(fvm::div(phi, T) - fvm::laplacian(alphaEff, T))
virtual label solvePrimal(const Vec xvVec, Vec wVec)
solve the primal equations
virtual void initSolver()
initialize fields and variables
autoPtr< DAOption > daOptionPtr_
DAOption pointer.
volScalarField & fvSource
void calcPrimalResidualStatistics(const word mode, const label writeRes=0)
calculate the norms of all residuals and print to screen
label isPrintTime(const Time &runTime, const label printInterval) const
this primalResidualControl< scalar >(solverE, printToScreen, printInterval, "he")
autoPtr< DALinearEqn > daLinearEqnPtr_
DALinearEqn pointer.
DAHeatTransferFoam(char *argsAll, PyObject *pyOptions)
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
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
void pointVec2OFMesh(const Vec xvVec) const
assign the points in fvMesh of OpenFOAM based on the point vector
SolverPerformance< scalar > solverT