DAFoam
v3.0.6
Discrete Adjoint with OpenFOAM
dafoam
src
adjoint
DASolver
DARhoSimpleFoam
UEqnRhoSimple.H
Go to the documentation of this file.
1
// Solve the Momentum equation
2
3
MRF
.correctBoundaryVelocity(
U
);
4
5
if
(hasFvSource_)
6
{
7
daFvSourcePtr_->calcFvSource(
fvSource
);
8
}
9
10
tmp<fvVectorMatrix>
tUEqn
(
11
fvm::div(
phi
,
U
, divUScheme)
12
+
MRF
.DDt(
rho
,
U
)
13
+ turbulencePtr_->divDevRhoReff(
U
)
14
-
fvSource
15
- fvOptions(
rho
,
U
));
16
fvVectorMatrix&
UEqn
=
tUEqn
.ref();
17
18
UEqn
.relax();
19
20
fvOptions.constrain(
UEqn
);
21
22
// get the solver performance info such as initial
23
// and final residuals
24
SolverPerformance<vector>
solverU
=
solve
(
UEqn
== -fvc::grad(
p
));
25
26
this->
primalResidualControl<vector>
(solverU, printToScreen, printInterval,
"U"
);
27
28
fvOptions.correct(
U
);
29
30
// bound U
31
DAUtility::boundVar(
allOptions
,
U
, printToScreen);
allOptions
const dictionary & allOptions
Definition:
createRefsRhoSimpleC.H:15
U
U
Definition:
pEqnPimpleDyM.H:60
MRF
IOMRFZoneListDF & MRF
Definition:
createRefsRhoSimple.H:18
fvSource
volScalarField & fvSource
Definition:
createRefsHeatTransfer.H:7
p
volScalarField & p
Definition:
createRefsPimple.H:6
primalResidualControl< vector >
this primalResidualControl< vector >(solverU, printToScreen, printInterval, "U")
phi
surfaceScalarField & phi
Definition:
createRefsPimple.H:8
tUEqn
tmp< fvVectorMatrix > tUEqn(fvm::div(phi, U, divUScheme)+MRF.DDt(rho, U)+turbulencePtr_->divDevRhoReff(U) - fvSource - fvOptions(rho, U))
solverU
SolverPerformance< vector > solverU
Definition:
UEqnRhoSimple.H:24
solve
pseudoPEqn solve(solverDictP_)
UEqn
fvVectorMatrix & UEqn
Definition:
UEqnRhoSimple.H:16
rho
volScalarField & rho
Definition:
createRefsRhoSimpleC.H:8
Generated by
1.8.17