Go to the documentation of this file.
24 fvSourcePtr_(nullptr),
26 daFvSourcePtr_(nullptr)
38 Info <<
"Initializing fields for DAHeatTransferFoam" << endl;
46 if (
allOptions.subDict(
"fvSource").toc().size() != 0)
49 Info <<
"Initializing DASource" << endl;
50 word sourceName =
allOptions.subDict(
"fvSource").toc()[0];
51 word fvSourceType =
allOptions.subDict(
"fvSource").subDict(sourceName).getWord(
"type");
72 Info <<
"\nCalculating temperature distribution\n"
81 Info <<
"Time = " <<
runTime.timeName() << nl << endl;
autoPtr< volScalarField > fvSourcePtr_
heat source
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< DAModel > daModelPtr_
DAModel pointer.
autoPtr< DAIndex > daIndexPtr_
DAIndex pointer.
virtual void initSolver()
initialize fields and variables
addToRunTimeSelectionTable(DAFunction, DAFunctionForce, dictionary)
autoPtr< DAFvSource > daFvSourcePtr_
DASource pointer.
autoPtr< DAOption > daOptionPtr_
DAOption pointer.
volScalarField & fvSource
SolverPerformance< scalar > solverT
DAHeatTransferFoam(char *argsAll, PyObject *pyOptions)
static void primalResidualControl(const SolverPerformance< scalar > &solverP, const label printToScreen, const word varName, scalar &primalMaxRes)
control when to print the residual and also compute the maxInitRes
static autoPtr< DAFvSource > New(const word modelType, const fvMesh &mesh, const DAOption &daOption, const DAModel &daModel, const DAIndex &daIndex)
defineTypeNameAndDebug(DAFunction, 0)
const dictionary & allOptions
label hasFvSource_
whether to have fvSource term
autoPtr< Time > runTimePtr_
runTime pointer
autoPtr< fvMesh > meshPtr_
fvMesh pointer
virtual label solvePrimal()
solve the primal equations
fvScalarMatrix TEqn(fvm::ddt(T)+fvm::div(phi, T) - fvm::laplacian(alphaEff, T))
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
autoPtr< DAGlobalVar > daGlobalVarPtr_
DAGlobalVar pointer.