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 scalar domainFraction = 0;
27 {
28  const volScalarField& porosity = tporosity.cref();
29  rhoPhi *= scalar(1)/fvc::interpolate(porosity);
30  domainFraction = alpha1.weightedAverage(mesh.Vsc()*porosity).value();
31 }
32 else
33 {
34  domainFraction = alpha1.weightedAverage(mesh.Vsc()).value();
35 }
36 
37 Info<< "Phase-1 volume fraction = "
39  << " Min(" << alpha1.name() << ") = " << min(alpha1).value()
40  << " Max(" << alpha1.name() << ") = " << max(alpha1).value()
41  << endl;
Foam::fvc::reconstruct
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> reconstruct(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcReconstruct.C:56
tporosity
tmp< volScalarField > tporosity
Definition: createPorosity.H:19
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:369
alpha1
const volScalarField & alpha1
Definition: setRegionFluidFields.H:8
porosityEnabled
const bool porosityEnabled(porosityProperties.getOrDefault< bool >("porosityEnabled", false))
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 (stdout output on master, null elsewhere)
alpha2
alpha2
Definition: alphaEqn.H:9
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
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
Foam::fac::interpolate
static tmp< GeometricField< Type, faePatchField, edgeMesh > > interpolate(const GeometricField< Type, faPatchField, areaMesh > &tvf, const edgeScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
domainFraction
scalar domainFraction
Definition: alphaEqn.H:25
rhoPhi
rhoPhi
Definition: alphaEqn.H:6