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;
scalar domainFraction
Definition: alphaEqn.H:25
zeroField Su
Definition: alphaSuSp.H:1
alpha2
Definition: alphaEqn.H:9
surfaceScalarField rho1f(fvc::interpolate(rho1))
rhoPhi
Definition: alphaEqn.H:6
isoAdvection advector(alpha1, phi, U)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:40
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.
Info<< "Creating temperaturePhaseChangeTwoPhaseMixture\"<< endl;autoPtr< temperaturePhaseChangeTwoPhaseMixture > mixture
Definition: createFields.H:39
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:487
tmp< volScalarField > tporosity
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:81
surfaceScalarField rho2f(fvc::interpolate(rho2))
dynamicFvMesh & mesh
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:26
const bool porosityEnabled(porosityProperties.getOrDefault< bool >("porosityEnabled", false))
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> reconstruct(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
U
Definition: pEqn.H:72
messageStream Info
Information stream (stdout output on master, null elsewhere)
zeroField Sp
Definition: alphaSuSp.H:2
const volScalarField & alpha1