Go to the documentation of this file.
45 mechanicalPropertiesPtr_(nullptr),
54 divSigmaExpPtr_(nullptr)
66 Info <<
"Initializing fields for DASolidDisplacementFoam" << endl;
98 daOptionPtr_->setOption<word>(
"runStatus",
"solvePrimal");
100 Info <<
"\nCalculating displacement field\n"
116 label printInterval =
daOptionPtr_->getOption<label>(
"printInterval");
117 label printToScreen = 0;
125 Info <<
"Iteration = " <<
runTime.value() << nl << endl;
129 scalar initialResidual = 0;
135 == fvm::laplacian(2 *
mu +
lambda,
D,
"laplacian(DD,D)")
140 SolverPerformance<vector>
solverU = DEqn.solve();
141 initialResidual =
solverU.max().initialResidual();
169 Info <<
"ExecutionTime = " <<
runTime.elapsedCpuTime() <<
" s"
170 <<
" ClockTime = " <<
runTime.elapsedClockTime() <<
" s"
void writeFailedMesh()
write the failed mesh to disk
volVectorField & divSigmaExp
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.
autoPtr< DAOption > daOptionPtr_
DAOption pointer.
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
volSymmTensorField & sigmaD
autoPtr< DALinearEqn > daLinearEqnPtr_
DALinearEqn pointer.
this primalResidualControl< vector >(solverU, printToScreen, printInterval, "U")
virtual label solvePrimal(const Vec xvVec, Vec wVec)
solve the primal equations
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 convergenceTolerance_
convergence tolerance for D
scalar primalMinRes_
the maximal residual for primal solution
autoPtr< Time > runTimePtr_
runTime pointer
autoPtr< fvMesh > meshPtr_
fvMesh pointer
defineTypeNameAndDebug(DAFvSource, 0)
SolverPerformance< vector > solverU
DASolidDisplacementFoam(char *argsAll, PyObject *pyOptions)
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
virtual void initSolver()
initialize fields and variables
label nCorr_
number of correctors
void pointVec2OFMesh(const Vec xvVec) const
assign the points in fvMesh of OpenFOAM based on the point vector
Switch compactNormalStress_
whether to use compact normal stress