Loading...
Searching...
No Matches
alphaEqnSubCycle.H
Go to the documentation of this file.
2{
3 dimensionedScalar totalDeltaT = runTime.deltaT();
4 surfaceScalarField rhoPhiSum
5 (
6 mesh.newIOobject("rhoPhiSum"),
7 mesh,
8 dimensionedScalar(rhoPhi.dimensions(), Zero)
9 );
10
11 for
12 (
13 subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
14 !(++alphaSubCycle).end();
15 )
16 {
17 #include "alphaEqn.H"
18 rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
19 }
20
21 rhoPhi = rhoPhiSum;
22}
23else
24{
25 #include "alphaEqn.H"
26}
27
28{
29 volScalarField rhoNew(alpha1*rho1 + alpha2*rho2 + alpha3*rho3);
30
31 //solve(fvm::ddt(rho) + fvc::div(rhoPhi));
32 //Info<< "density error = "
33 // << max((mag(rho - rhoNew)/mag(rhoNew))().primitiveField()) << endl;
34
35 rho == rhoNew;
36}
rhoPhi
Definition rhoEqn.H:10
const volScalarField & alpha1
volScalarField & rho2
const volScalarField & alpha2
volScalarField & rho1
dynamicFvMesh & mesh
engineTime & runTime
GeometricField< scalar, fvPatchField, volMesh > volScalarField
label nAlphaSubCycles(alphaControls.get< label >("nAlphaSubCycles"))