alphaEqn.H
Go to the documentation of this file.
1 {
2  // Temporarily making U relative to mesh motion
3  if (mesh.moving())
4  {
5  U -= fvc::reconstruct(mesh.phi());
6  }
7 
8  // Updating alpha1
9  #include "alphaSuSp.H"
10  advector.advect(Sp, Su);
11 
12  // Making U absolute again after advection step
13  if (mesh.moving())
14  {
15  U += fvc::reconstruct(mesh.phi());
16  }
17 
18  #include "rhofs.H"
19  rhoPhi = advector.getRhoPhi(rho1f, rho2f);
20 
21  alpha2 = 1.0 - alpha1;
22  mixture.correct();
23 }
24 
25 Info<< "Phase-1 volume fraction = "
26  << alpha1.weightedAverage(mesh.Vsc()).value()
27  << " Min(" << alpha1.name() << ") = " << min(alpha1).value()
28  << " Max(" << alpha1.name() << ") = " << max(alpha1).value()
29  << endl;
Foam::fvc::reconstruct
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> reconstruct(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcReconstruct.C:56
Sp
zeroField Sp
Definition: alphaSuSp.H:2
advector
isoAdvection advector(alpha1, phi, U)
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:350
alpha1
const volScalarField & alpha1
Definition: setRegionFluidFields.H:8
rho2f
surfaceScalarField rho2f(fvc::interpolate(rho2))
Foam::min
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:33
Su
zeroField Su
Definition: alphaSuSp.H:1
Foam::Info
messageStream Info
Information stream (uses stdout - output is on the master only)
alpha2
alpha2
Definition: alphaEqn.H:9
Foam::max
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:47
rho1f
surfaceScalarField rho1f(fvc::interpolate(rho1))
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
U
U
Definition: pEqn.H:72
mixture
Info<< "Creating temperaturePhaseChangeTwoPhaseMixture\n"<< endl;autoPtr< temperaturePhaseChangeTwoPhaseMixture > mixture
Definition: createFields.H:39
rhoPhi
rhoPhi
Definition: alphaEqn.H:6