38 enum class cloudForceSplit
40 faceExplicitCellImplicit,
49 faceExplicitCellLagged,
68 "faceExplicitCellImplicit",
69 "faceExplicitCellLagged",
73 const NamedEnum<cloudForceSplit, 3> cloudForceSplitNames;
90 int main(
int argc,
char *argv[])
98 #include "createFields.H" 100 #include "initContinuityErrs.H" 102 Info<<
"\nStarting time loop\n" <<
endl;
104 while (
pimple.run(runTime))
107 #include "CourantNo.H" 108 #include "setDeltaT.H" 115 Info<<
"Time = " << runTime.userTimeName() <<
nl <<
endl;
118 clouds.storeGlobalPositions();
142 alphac =
max(1.0 - clouds.theta(), alphacMin);
143 alphac.correctBoundaryConditions();
145 alphaPhic = alphacf*
phic;
159 zeroGradientFvPatchVectorField::typeName
171 zeroGradientFvPatchVectorField::typeName
174 const cloudForceSplit cloudSUSplit =
175 pimple.dict().found(
"cloudForceSplit")
176 ? cloudForceSplitNames.read(
pimple.dict().lookup(
"cloudForceSplit"))
177 : cloudForceSplit::faceExplicitCellImplicit;
179 switch (cloudSUSplit)
181 case cloudForceSplit::faceExplicitCellImplicit:
182 cloudSUu.primitiveFieldRef() = -cloudSU.source()/
mesh.V();
183 cloudSUu.correctBoundaryConditions();
184 cloudSUp.primitiveFieldRef() =
Zero;
185 cloudSUp.correctBoundaryConditions();
187 cloudSU.source() =
Zero;
190 case cloudForceSplit::faceExplicitCellLagged:
191 cloudSUu.primitiveFieldRef() =
192 (cloudSU.diag()*Uc() - cloudSU.source())/
mesh.V();
193 cloudSUu.correctBoundaryConditions();
194 cloudSUp.primitiveFieldRef() =
Zero;
195 cloudSUp.correctBoundaryConditions();
197 cloudSU.source() = cloudSU.diag()*Uc();
200 case cloudForceSplit::faceImplicit:
201 cloudSUu.primitiveFieldRef() = -cloudSU.source()/
mesh.V();
202 cloudSUu.correctBoundaryConditions();
203 cloudSUp.primitiveFieldRef() = cloudSU.diag()/
mesh.V();
204 cloudSUp.correctBoundaryConditions();
205 cloudSU.diag() =
Zero;
206 cloudSU.source() =
Zero;
231 Info<<
"ExecutionTime = " << runTime.elapsedCpuTime() <<
" s" 232 <<
" ClockTime = " << runTime.elapsedClockTime() <<
" s"
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
pimpleNoLoopControl & pimple
volScalarField muc(IOobject(IOobject::groupName("mu", continuousPhaseName), runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), rhoc *continuousPhaseViscosity->nu())
Info<< "Reading field U\"<< endl;volVectorField Uc(IOobject(IOobject::groupName("U", continuousPhaseName), runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Reading field p\"<< endl;volScalarField p(IOobject("p", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Reading/calculating continuous-phase face flux field phic\"<< endl;surfaceScalarField phic(IOobject(IOobject::groupName("phi", continuousPhaseName), runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), linearInterpolate(Uc) &mesh.Sf());pressureReference pressureReference(p, pimple.dict());mesh.schemes().setFluxRequired(p.name());Info<< "Creating turbulence model\"<< endl;autoPtr< viscosityModel > continuousPhaseViscosity(viscosityModel::New(mesh))
virtual void correct()
Correct the fvModels.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
GeometricField< vector, fvPatchField, volMesh > volVectorField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Creates and initialises the continuous phase face velocity field Ufc if required. ...
const dimensionSet dimForce
volScalarField rhoc(IOobject(rhocValue.name(), runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), mesh, rhocValue)
const dimensionSet dimVelocity
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
Foam::fvModels & fvModels
Calculates and outputs the mean and maximum Courant Numbers.
Info<< "Creating field alphac\"<< endl;volScalarField alphac(IOobject(IOobject::groupName("alpha", continuousPhaseName), runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), mesh, dimensionedScalar(dimless, 0));Info<< "Constructing clouds"<< endl;parcelCloudList clouds(rhoc, Uc, muc, g);scalar alphacMin(1 - mesh.solution().solverDict(alphac.name()).lookup< scalar >"max"));alphac=max(1.0 - clouds.theta(), alphacMin);alphac.correctBoundaryConditions();surfaceScalarField alphacf("alphacf", fvc::interpolate(alphac));surfaceScalarField alphaPhic(IOobject::groupName("alphaPhi", continuousPhaseName), alphacf *phic);autoPtr< phaseIncompressible::momentumTransportModel > continuousPhaseTurbulence(phaseIncompressible::momentumTransportModel::New(alphac, Uc, alphaPhic, phic, continuousPhaseViscosity))
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
fvMatrix< vector > fvVectorMatrix
const dimensionSet dimVolume
Execute application functionObjects to post-process existing results.