DAFoam
v4.0.2
Discrete Adjoint with OpenFOAM
dafoam
src
adjoint
DASolver
DAPimpleDyMFoam
TEqnPimpleDyM.H
Go to the documentation of this file.
1
{
2
volScalarField&
T
= TPtr_();
3
dimensionedScalar
Pr
= PrPtr_();
4
dimensionedScalar
Prt
= PrtPtr_();
5
volScalarField&
alphat
= alphatPtr_();
6
7
alphat
= turbulencePtr_->nut() /
Prt
;
8
alphat
.correctBoundaryConditions();
9
10
volScalarField
alphaEff
(
"alphaEff"
, turbulencePtr_->nu() /
Pr
+
alphat
);
11
12
fvScalarMatrix
TEqn
(
13
fvm::ddt(
T
)
14
+ fvm::div(
phi
,
T
)
15
- fvm::laplacian(
alphaEff
,
T
));
16
17
TEqn
.relax();
18
19
// get the solver performance info such as initial
20
// and final residuals
21
SolverPerformance<scalar>
solverT
=
TEqn
.solve();
22
23
DAUtility::primalResidualControl(
solverT
, pimplePrintToScreen,
"T"
, daGlobalVarPtr_->primalMaxRes);
24
25
// bound T
26
DAUtility::boundVar(
allOptions
,
T
, pimplePrintToScreen);
27
}
Pr
dimensionedScalar Pr
Definition:
TEqnPimpleDyM.H:3
solverT
SolverPerformance< scalar > solverT
Definition:
TEqnPimpleDyM.H:21
phi
surfaceScalarField & phi
Definition:
createRefsPimpleDyM.H:8
T
volScalarField & T
Definition:
createRefsHeatTransfer.H:5
Prt
dimensionedScalar Prt
Definition:
TEqnPimpleDyM.H:4
allOptions
const dictionary & allOptions
Definition:
createRefsPimpleDyM.H:14
alphaEff
volScalarField alphaEff("alphaEff", turbulencePtr_->nu()/Pr+alphat)
alphat
volScalarField & alphat
Definition:
TEqnPimpleDyM.H:5
TEqn
fvScalarMatrix TEqn(fvm::ddt(T)+fvm::div(phi, T) - fvm::laplacian(alphaEff, T))
Generated by
1.8.17