alphaEqnSubCycle.H
Go to the documentation of this file.
1 {
3  (
4  IOobject
5  (
6  "alphaPhi",
7  runTime.timeName(),
8  mesh
9  ),
10  mesh,
11  dimensionedScalar("0", phi.dimensions(), 0)
12  );
13 
15  (
16  mesh.Sf() & fvc::interpolate(UdmModel.Udm())
17  );
18 
19  if (nAlphaSubCycles > 1)
20  {
21  dimensionedScalar totalDeltaT = runTime.deltaT();
22  surfaceScalarField alphaPhiSum
23  (
24  IOobject
25  (
26  "alphaPhiSum",
27  runTime.timeName(),
28  mesh
29  ),
30  mesh,
31  dimensionedScalar("0", phi.dimensions(), 0)
32  );
33 
34  for
35  (
36  subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
37  !(++alphaSubCycle).end();
38  )
39  {
40  #include "alphaEqn.H"
41  alphaPhiSum += (runTime.deltaT()/totalDeltaT)*alphaPhi;
42  }
43 
44  alphaPhi = alphaPhiSum;
45  }
46  else
47  {
48  #include "alphaEqn.H"
49  }
50 
51  // Apply the diffusion term separately to allow implicit solution
52  // and boundedness of the explicit advection
53  {
54  fvScalarMatrix alpha1Eqn
55  (
58  );
59 
60  alpha1Eqn.solve(mesh.solver("alpha1Diffusion"));
61 
62  alphaPhi += alpha1Eqn.flux();
63  alpha2 = 1.0 - alpha1;
64 
65  Info<< "Phase-1 volume fraction = "
66  << alpha1.weightedAverage(mesh.Vsc()).value()
67  << " Min(" << alpha1.name() << ") = " << min(alpha1).value()
68  << " Max(" << alpha1.name() << ") = " << max(alpha1).value()
69  << endl;
70  }
71 
72  rhoPhi = alphaPhi*(rho1 - rho2) + phi*rho2;
73  rho = mixture.rho();
74 }
surfaceScalarField phir(mesh.Sf()&fvc::interpolate(UdmModel.Udm()))
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
Info<< "Reading field p_rgh\n"<< endl;volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Reading field U\n"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Creating phaseChangeTwoPhaseMixture\n"<< endl;autoPtr< phaseChangeTwoPhaseMixture > mixture
Definition: createFields.H:33
messageStream Info
tmp< surfaceScalarField > interpolate(const RhoType &rho)
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
Definition: fvcDdt.C:45
dynamicFvMesh & mesh
rhoPhi
Definition: rhoEqn.H:10
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
relativeVelocityModel & UdmModel(UdmModelPtr())
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
rho1
Definition: pEqn.H:124
rho2
Definition: pEqn.H:125
surfaceScalarField alphaPhi(IOobject( "alphaPhi", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), phi *fvc::interpolate(alpha1))
volScalarField & alpha1
Definition: createFields.H:15
surfaceScalarField & phi
alpha2
Definition: alphaEqn.H:112
label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles")))
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.