6 const volScalarField&
alpha = phase;
16 phaseModel& phase =
fluid.movingPhases()[movingPhasei];
17 const volScalarField&
alpha = phase;
24 IOobject::groupName(
"rAU", phase.name()),
27 UEqns[phase.index()].A()
28 + byDt(
max(phase.residualAlpha() -
alpha, scalar(0))*phase.rho())
40 const volScalarField&
alpha = phase;
57 volScalarField
rho(
"rho",
fluid.rho());
65 phaseModel& phase =
fluid.movingPhases()[movingPhasei];
66 MRF.correctBoundaryFlux(phase.U(), phase.phiRef());
70 PtrList<surfaceScalarField> phigFs(
phases.size());
89 - (fvc::interpolate(phase.rho() -
rho))*(
g &
mesh.Sf())
90 -
fluid.surfaceTension(phase)*
mesh.magSf()
107 PtrList<surfaceScalarField> ddtCorrByAs(
fluid.ddtCorrByAs(
rAUs));
111 phaseModel& phase =
fluid.movingPhases()[movingPhasei];
112 const volScalarField&
alpha = phase;
119 IOobject::groupName(
"HbyA", phase.name()),
124 HbyAs[phase.index()] =
127 UEqns[phase.index()].H()
130 max(phase.residualAlpha() -
alpha, scalar(0))
139 new surfaceScalarField
141 IOobject::groupName(
"phiHbyA", phase.name()),
142 fvc::flux(
HbyAs[phase.index()])
143 - phigFs[phase.index()]
144 - ddtCorrByAs[phase.index()]
150 fluid.fillFields(
"phiHbyA", dimForce/dimDensity/dimVelocity,
phiHbyAs);
153 if (!partialElimination)
155 PtrList<volVectorField> KdUByAs(
fluid.KdUByAs(
rAUs));
156 PtrList<surfaceScalarField> phiKdPhis(
fluid.phiKdPhis(
rAUs));
164 if (phiKdPhis.set(
phasei))
183 dimensionedScalar(
"phiHbyA", dimArea*dimVelocity, 0)
192 if (partialElimination)
194 PtrList<surfaceScalarField> phiKdPhis(
fluid.phiKdPhis(
rAUs));
198 if (phiKdPhis.set(
phasei))
208 surfaceScalarField
rAUf
217 dimensionedScalar(
"rAUf", dimensionSet(-1, 3, 1, 0, 0), 0)
229 surfaceScalarField::Boundary
phib(
phi.boundaryField());
235 alphafs[
phasei].boundaryField()*phase.phi()().boundaryField();
240 p_rgh.boundaryFieldRef(),
243 )/(
mesh.magSf().boundaryField()*
rAUf.boundaryField())
248 PtrList<fvScalarMatrix> pEqnComps(
phases.size());
249 PtrList<volScalarField> dmdts(
fluid.dmdts());
253 const volScalarField&
alpha = phase;
254 volScalarField&
rho = phase.thermoRef().rho();
256 if (phase.compressible())
260 surfaceScalarField
phid
262 IOobject::groupName(
"phid", phase.name()),
263 fvc::interpolate(phase.thermo().psi())*phase.phi()
271 fvc::ddt(
alpha,
rho) + fvc::div(phase.alphaRhoPhi())
274 fvc::ddt(
alpha) + fvc::div(phase.alphaPhi()),
282 phase.thermo().psi()*fvm::ddt(
p_rgh)
290 pEqnComps[
phasei].relax();
299 fvc::ddt(
alpha,
rho) + fvc::div(phase.alphaRhoPhi())
302 (fvc::ddt(
alpha) + fvc::div(phase.alphaPhi())),
307 *correction(fvm::ddt(
p_rgh))
317 if (pEqnComps.set(
phasei))
334 if (pEqnComps.set(
phasei))
353 while (
pimple.correctNonOrthogonal())
356 fvScalarMatrix pEqnIncomp
363 fvScalarMatrix pEqn(pEqnIncomp);
367 if (pEqnComps.set(
phasei))
369 pEqn += pEqnComps[
phasei];
381 if (
pimple.finalNonOrthogonalIter())
385 surfaceScalarField mSfGradp(
"mSfGradp", pEqnIncomp.flux()/
rAUf);
389 phaseModel& phase =
fluid.movingPhases()[movingPhasei];
396 if (pEqnComps.set(phase.index()))
398 phase.divU(-pEqnComps[phase.index()] &
p_rgh);
405 mSfGradp = pEqnIncomp.flux()/
rAUf;
409 phaseModel& phase =
fluid.movingPhases()[movingPhasei];
416 - phigFs[phase.index()]
420 if (partialElimination)
427 phaseModel& phase =
fluid.movingPhases()[movingPhasei];
429 phase.URef().correctBoundaryConditions();
445 phase.thermoRef().rho() += phase.thermo().psi()*(
p_rgh -
p_rgh_0);
451 p_rgh.correctBoundaryConditions();
const uniformDimensionedVectorField & g
const surfaceScalarField & ghf
const volScalarField & gh
const dimensionedScalar & pMin
surfaceScalarField phid("phid", fvc::interpolate(psi) *(fvc::flux(HbyA)+MRF.zeroFilter(rhorAUf *fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho))))
Info<< "Creating field kinetic energy K\n"<< endl;volScalarField K("K", 0.5 *magSqr(U));if(U.nOldTimes()){ volVectorField *Uold=&U.oldTime();volScalarField *Kold=&K.oldTime();*Kold==0.5 *magSqr(*Uold);while(Uold->nOldTimes()) { Uold=&Uold-> oldTime()
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU))
PtrList< fvVectorMatrix > UEqns(fluid.phases().size())
volScalarField p_rgh_0(p_rgh)
surfaceScalarField ghSnGradRho(ghf *fvc::snGrad(rho) *mesh.magSf())
PtrList< surfaceScalarField > phiHbyAs(fluid.phases().size())
PtrList< volVectorField > HbyAs(fluid.phases().size())
setSnGrad< fixedFluxPressureFvPatchScalarField >(p_rgh.boundaryFieldRef(),(phiHbyA.boundaryField() - MRF.relative(phib))/(mesh.magSf().boundaryField() *rAUf.boundaryField()))
PtrList< surfaceScalarField > phiFs(fluid.phiFs(rAUs))
PtrList< surfaceScalarField > alphafs(phases.size())
PtrList< surfaceScalarField > alpharAUfs(phases.size())
PtrList< volScalarField > rAUs
multiphaseSystem::phaseModelList & phases
#define forAll(list, i)
Loop across all elements in list.