Compare commits

..

17 Commits

Author SHA1 Message Date
55d5f99047 WIP: TUT: tutorial adjustment for backward compatibility 2023-01-31 16:14:43 +00:00
d439440453 WIP: TUT: tutorial adjustments for backward compatibility 2023-01-20 16:56:11 +00:00
6c66cc58a6 WIP: Updated lagrangian solvers followinf library changes 2023-01-10 13:35:42 +00:00
265b3dd2f8 WIP: deprecated lagrangian coal combustion - models added to reactingMultiphase 2023-01-10 13:35:42 +00:00
b17a9128a1 ENH: Added new parcelFoam solver based on kinematicParcelFoam 2023-01-10 13:35:42 +00:00
31d4148173 STYLE: lagrangian turbulence library - removed 'basic' prefix 2023-01-10 13:35:42 +00:00
13b8a3c02a STYLE: lagrangian intermediate library - removed 'basic' prefix 2023-01-10 13:35:42 +00:00
715831610d WIP: Added new rhoParcelFoam solver based on reactingParcelFoam 2023-01-10 13:35:42 +00:00
ab42d1a1e6 WIP: migrated coalCloudList to parcelCloudModelList 2023-01-10 13:35:42 +00:00
13cf489f63 WIP: clouds - moved spray cloud and parcels to main intermediate library 2023-01-10 13:35:42 +00:00
3277fb931b WIP: clouds - updated dependent code 2023-01-10 13:35:40 +00:00
9e83d31138 WIP: clouds - refactoring 2023-01-10 13:34:47 +00:00
878f1bf773 WIP: Clouds - new run-time selection based on openfoam.org changes 2023-01-10 13:34:47 +00:00
84348dc3f5 WIP: clouds - added debug - based on openfoam.org changes 2023-01-10 13:34:47 +00:00
1f7c038ad7 DUMMY 2023-01-10 13:34:47 +00:00
f20361d44a WIP: Clouds - new run-time selection based on openfoam.org changes 2023-01-10 13:34:33 +00:00
580a003d4d WIP: Removed base classes 2023-01-10 13:34:22 +00:00
2084 changed files with 26770 additions and 35316 deletions

View File

@ -1,2 +1,2 @@
api=2301
patch=230110
api=2212
patch=0

View File

@ -1,4 +1,125 @@
#include "../createFields.H"
Info<< "Reading velocity field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
// Initialise the velocity internal field to zero
U = dimensionedVector(U.dimensions(), Zero);
surfaceScalarField phi
(
IOobject
(
"phi",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
fvc::flux(U)
);
if (args.found("initialiseUBCs"))
{
U.correctBoundaryConditions();
phi = fvc::flux(U);
}
// Construct a pressure field
// If it is available read it otherwise construct from the velocity BCs
// converting fixed-value BCs to zero-gradient and vice versa.
// Allow override from command-line -pName option
const word pName = args.getOrDefault<word>("pName", "p");
// Infer the pressure BCs from the velocity
wordList pBCTypes
(
U.boundaryField().size(),
fixedValueFvPatchScalarField::typeName
);
forAll(U.boundaryField(), patchi)
{
if (U.boundaryField()[patchi].fixesValue())
{
pBCTypes[patchi] = zeroGradientFvPatchScalarField::typeName;
}
}
// Note that registerObject is false for the pressure field. The pressure
// field in this solver doesn't have a physical value during the solution.
// It shouldn't be looked up and used by sub models or boundary conditions.
Info<< "Constructing pressure field " << pName << nl << endl;
volScalarField p
(
IOobject
(
pName,
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE,
false
),
mesh,
dimensionedScalar(sqr(dimVelocity), Zero),
pBCTypes
);
// Infer the velocity potential BCs from the pressure
wordList PhiBCTypes
(
p.boundaryField().size(),
zeroGradientFvPatchScalarField::typeName
);
forAll(p.boundaryField(), patchi)
{
if (p.boundaryField()[patchi].fixesValue())
{
PhiBCTypes[patchi] = fixedValueFvPatchScalarField::typeName;
}
}
Info<< "Constructing velocity potential field Phi\n" << endl;
volScalarField Phi
(
IOobject
(
"Phi",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE
),
mesh,
dimensionedScalar(dimLength*dimVelocity, Zero),
PhiBCTypes
);
label PhiRefCell = 0;
scalar PhiRefValue = 0;
setRefCell
(
Phi,
potentialFlow.dict(),
PhiRefCell,
PhiRefValue
);
mesh.setFluxRequired(Phi.name());
#include "createMRF.H"
// Add solver-specific interpolations
{

View File

@ -83,7 +83,6 @@ Description
\heading Options
\plaintable
-writep | write the Euler pressure
-writephi | Write the final volumetric flux
-writePhi | Write the final velocity potential
-initialiseUBCs | Update the velocity boundaries before solving for Phi
\endplaintable
@ -118,12 +117,6 @@ int main(int argc, char *argv[])
"Initialise U boundary conditions"
);
argList::addBoolOption
(
"writephi",
"Write the final volumetric flux field"
);
argList::addBoolOption
(
"writePhi",
@ -142,8 +135,6 @@ int main(int argc, char *argv[])
"Execute functionObjects"
);
#include "addRegionOption.H"
#include "addCheckCaseOptions.H"
#include "setRootCaseLists.H"
#include "createTime.H"
#include "createNamedDynamicFvMesh.H"
@ -203,16 +194,11 @@ int main(int argc, char *argv[])
<< endl;
}
// Write U
// Write U and phi
U.write();
phi.write();
// Optionally write the volumetric flux, phi
if (args.found("writephi"))
{
phi.write();
}
// Optionally write velocity potential, Phi
// Optionally write Phi
if (args.found("writePhi"))
{
Phi.write();

View File

@ -171,7 +171,10 @@ if (ign.ignited())
fvOptions.correct(Su);
Su.clamp_range(SuMin, SuMax);
// Limit the maximum Su
// ~~~~~~~~~~~~~~~~~~~~
Su.min(SuMax);
Su.max(SuMin);
}
else
{
@ -215,7 +218,7 @@ if (ign.ignited())
+ (
scalar(1)
+ (2*XiShapeCoef)
*(scalar(0.5) - clamp(b, zero_one{}))
*(scalar(0.5) - min(max(b, scalar(0)), scalar(1)))
)*(XiEqStar - scalar(1.001))
);

View File

@ -39,13 +39,13 @@ tmp<fv::convectionScheme<scalar>> mvConvection
fvOptions.correct(Yi);
Yi.clamp_min(0);
Yi.max(0.0);
Yt += Yi;
}
}
Y[inertIndex] = scalar(1) - Yt;
Y[inertIndex].clamp_min(0);
Y[inertIndex].max(0.0);
radiation->correct();

View File

@ -1,9 +1,9 @@
Info<< "\nConstructing reacting cloud" << endl;
basicReactingCloud parcels
reactingCloud parcels
(
"reactingCloud1",
g,
rho,
U,
g,
slgThermo
);

View File

@ -37,7 +37,7 @@ Description
#include "fvCFD.H"
#include "turbulentFluidThermoModel.H"
#include "basicReactingCloud.H"
#include "reactingCloud.H"
#include "surfaceFilmModel.H"
#include "pyrolysisModelCollection.H"
#include "radiationModel.H"

View File

@ -38,11 +38,11 @@ tmp<fv::convectionScheme<scalar>> mvConvection
fvOptions.correct(Yi);
Yi.clamp_min(0);
Yi.max(0.0);
Yt += Yi;
}
}
Y[inertIndex] = scalar(1) - Yt;
Y[inertIndex].clamp_min(0);
Y[inertIndex].max(0.0);
}

View File

@ -103,7 +103,14 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
<< exit(FatalIOError);
}
if (!this->readValueEntry(dict))
if (dict.found("value"))
{
fvPatchField<scalar>::operator=
(
scalarField("value", dict, p.size())
);
}
else
{
fvPatchField<scalar>::operator=(patchInternalField());
}
@ -158,10 +165,14 @@ void Foam::smoluchowskiJumpTFvPatchScalarField::updateCoeffs()
return;
}
const auto& pmu = patch().lookupPatchField<volScalarField>(muName_);
const auto& prho = patch().lookupPatchField<volScalarField>(rhoName_);
const auto& ppsi = patch().lookupPatchField<volScalarField>(psiName_);
const auto& pU = patch().lookupPatchField<volVectorField>(UName_);
const fvPatchScalarField& pmu =
patch().lookupPatchField<volScalarField, scalar>(muName_);
const fvPatchScalarField& prho =
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
const fvPatchField<scalar>& ppsi =
patch().lookupPatchField<volScalarField, scalar>(psiName_);
const fvPatchVectorField& pU =
patch().lookupPatchField<volVectorField, vector>(UName_);
// Prandtl number reading consistent with rhoCentralFoam
const dictionary& thermophysicalProperties =
@ -196,7 +207,7 @@ void Foam::smoluchowskiJumpTFvPatchScalarField::updateCoeffs()
// Write
void Foam::smoluchowskiJumpTFvPatchScalarField::write(Ostream& os) const
{
fvPatchField<scalar>::write(os);
fvPatchScalarField::write(os);
os.writeEntryIfDifferent<word>("U", "U", UName_);
os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
@ -206,7 +217,7 @@ void Foam::smoluchowskiJumpTFvPatchScalarField::write(Ostream& os) const
os.writeEntry("accommodationCoeff", accommodationCoeff_);
Twall_.writeEntry("Twall", os);
os.writeEntry("gamma", gamma_);
fvPatchField<scalar>::writeValueEntry(os);
writeEntry("value", os);
}

View File

@ -105,15 +105,18 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
<< exit(FatalIOError);
}
if (this->readValueEntry(dict))
if (dict.found("value"))
{
const auto* hasRefValue = dict.findEntry("refValue", keyType::LITERAL);
const auto* hasFrac = dict.findEntry("valueFraction", keyType::LITERAL);
fvPatchField<vector>::operator=
(
vectorField("value", dict, p.size())
);
if (hasRefValue && hasFrac)
if (dict.found("refValue") && dict.found("valueFraction"))
{
this->refValue().assign(*hasRefValue, p.size());
this->valueFraction().assign(*hasFrac, p.size());
this->refValue() = vectorField("refValue", dict, p.size());
this->valueFraction() =
scalarField("valueFraction", dict, p.size());
}
else
{
@ -152,9 +155,12 @@ void Foam::maxwellSlipUFvPatchVectorField::updateCoeffs()
return;
}
const auto& pmu = patch().lookupPatchField<volScalarField>(muName_);
const auto& prho = patch().lookupPatchField<volScalarField>(rhoName_);
const auto& ppsi = patch().lookupPatchField<volScalarField>(psiName_);
const fvPatchScalarField& pmu =
patch().lookupPatchField<volScalarField, scalar>(muName_);
const fvPatchScalarField& prho =
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
const fvPatchField<scalar>& ppsi =
patch().lookupPatchField<volScalarField, scalar>(psiName_);
Field<scalar> C1
(
@ -181,8 +187,8 @@ void Foam::maxwellSlipUFvPatchVectorField::updateCoeffs()
if (curvature_)
{
const auto& ptauMC =
patch().lookupPatchField<volTensorField>(tauMCName_);
const fvPatchTensorField& ptauMC =
patch().lookupPatchField<volTensorField, tensor>(tauMCName_);
vectorField n(patch().nf());
refValue() -= C1/prho*transform(I - n*n, (n & ptauMC));
@ -194,7 +200,7 @@ void Foam::maxwellSlipUFvPatchVectorField::updateCoeffs()
void Foam::maxwellSlipUFvPatchVectorField::write(Ostream& os) const
{
fvPatchField<vector>::write(os);
fvPatchVectorField::write(os);
os.writeEntryIfDifferent<word>("T", "T", TName_);
os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
os.writeEntryIfDifferent<word>("psi", "thermo:psi", psiName_);
@ -209,7 +215,7 @@ void Foam::maxwellSlipUFvPatchVectorField::write(Ostream& os) const
refValue().writeEntry("refValue", os);
valueFraction().writeEntry("valueFraction", os);
fvPatchField<vector>::writeValueEntry(os);
writeEntry("value", os);
}

View File

@ -104,8 +104,11 @@ void Foam::fixedRhoFvPatchScalarField::updateCoeffs()
return;
}
const auto& psip = patch().lookupPatchField<volScalarField>(psiName_);
const auto& pp = patch().lookupPatchField<volScalarField>(pName_);
const fvPatchField<scalar>& psip =
patch().lookupPatchField<volScalarField, scalar>(psiName_);
const fvPatchField<scalar>& pp =
patch().lookupPatchField<volScalarField, scalar>(pName_);
operator==(psip*pp);
@ -115,10 +118,11 @@ void Foam::fixedRhoFvPatchScalarField::updateCoeffs()
void Foam::fixedRhoFvPatchScalarField::write(Ostream& os) const
{
fvPatchField<scalar>::write(os);
fvPatchScalarField::write(os);
os.writeEntryIfDifferent<word>("p", "p", pName_);
os.writeEntryIfDifferent<word>("psi", "thermo:psi", psiName_);
fvPatchField<scalar>::writeValueEntry(os);
writeEntry("value", os);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -9,7 +9,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/regionFaModels/lnInclude
-I$(LIB_SRC)/regionFaModels\lnInclude
EXE_LIBS = \
-lfiniteVolume \

View File

@ -7,7 +7,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/regionFaModels/lnInclude
-I$(LIB_SRC)/regionFaModels\lnInclude
EXE_LIBS = \
-lfiniteVolume \

View File

@ -10,7 +10,7 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/regionFaModels/lnInclude
-I$(LIB_SRC)/regionFaModels\lnInclude
EXE_LIBS = \
-lfiniteVolume \

View File

@ -7,7 +7,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/regionFaModels/lnInclude
-I$(LIB_SRC)/regionFaModels\lnInclude
EXE_LIBS = \
-lfiniteVolume \

View File

@ -19,7 +19,7 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionFaModels/lnInclude
-I$(LIB_SRC)/regionFaModels\lnInclude
EXE_LIBS = \

View File

@ -88,29 +88,26 @@ kappa
case mtLookup:
{
if (mesh.foundObject<volScalarField>(kappaName_))
{
const auto* ptr =
mesh.cfindObject<volScalarField>(kappaName_);
if (ptr)
{
return patch().patchField(*ptr);
}
return patch().lookupPatchField<volScalarField, scalar>
(
kappaName_
);
}
else if (mesh.foundObject<volSymmTensorField>(kappaName_))
{
const auto* ptr =
mesh.cfindObject<volSymmTensorField>(kappaName_);
const symmTensorField& KWall =
patch().lookupPatchField<volSymmTensorField, scalar>
(
kappaName_
);
if (ptr)
{
const symmTensorField& KWall = patch().patchField(*ptr);
const vectorField n(patch().nf());
const vectorField n(patch().nf());
return n & KWall & n;
}
return n & KWall & n;
}
else
{
FatalErrorInFunction
<< "Did not find field " << kappaName_
@ -120,6 +117,9 @@ kappa
<< " or volSymmTensorField."
<< exit(FatalError);
}
break;
}
@ -131,8 +131,10 @@ kappa
mesh.lookupObject<phaseSystem>("phaseProperties")
);
auto tkappaEff = tmp<scalarField>::New(patch().size(), Zero);
auto& kappaEff = tkappaEff.ref();
tmp<scalarField> kappaEff
(
new scalarField(patch().size(), 0.0)
);
forAll(fluid.phases(), phasei)
{
@ -140,10 +142,10 @@ kappa
const fvPatchScalarField& alpha = phase.boundaryField()[patchi];
kappaEff += alpha*phase.kappaEff(patchi)();
kappaEff.ref() += alpha*phase.kappaEff(patchi)();
}
return tkappaEff;
return kappaEff;
break;
}
@ -159,11 +161,9 @@ kappa
}
}
// Return zero-sized (not nullptr)
return tmp<scalarField>::New();
return scalarField(0);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -243,12 +243,14 @@ turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField
<< exit(FatalError);
}
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
this->readValueEntry(dict, IOobjectOption::MUST_READ);
if (this->readMixedEntries(dict))
if (dict.found("refValue"))
{
// Full restart
refValue() = scalarField("refValue", dict, p.size());
refGrad() = scalarField("refGradient", dict, p.size());
valueFraction() = scalarField("valueFraction", dict, p.size());
}
else
{
@ -306,11 +308,12 @@ updateCoeffs()
scalarField& Tp = *this;
const auto& nbrField =
refCast
<
const turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField
>(nbrPatch.lookupPatchField<volScalarField>(TnbrName_));
const turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField&
nbrField = refCast
<const turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField>
(
nbrPatch.lookupPatchField<volScalarField, scalar>(TnbrName_)
);
// Swap to obtain full local values of neighbour internal field
scalarField TcNbr(nbrField.patchInternalField());
@ -327,13 +330,13 @@ updateCoeffs()
scalarField qr(Tp.size(), 0.0);
if (qrName_ != "none")
{
qr = patch().lookupPatchField<volScalarField>(qrName_);
qr = patch().lookupPatchField<volScalarField, scalar>(qrName_);
}
scalarField qrNbr(Tp.size(), 0.0);
if (qrNbrName_ != "none")
{
qrNbr = nbrPatch.lookupPatchField<volScalarField>(qrNbrName_);
qrNbr = nbrPatch.lookupPatchField<volScalarField, scalar>(qrNbrName_);
mpp.distribute(qrNbr);
}
@ -483,7 +486,7 @@ void turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField::write
Ostream& os
) const
{
mixedFvPatchField<scalar>::write(os);
mixedFvPatchScalarField::write(os);
os.writeEntry("kappaMethod", KMethodTypeNames_[method_]);
os.writeEntryIfDifferent<word>("kappa","none", kappaName_);

View File

@ -48,7 +48,7 @@ if (Y.size())
fvOptions.correct(Yi);
Yi.clamp_min(0);
Yi.max(0.0);
Yt += Yi;
}
}
@ -56,6 +56,6 @@ if (Y.size())
if (Y.size())
{
Y[inertIndex] = scalar(1) - Yt;
Y[inertIndex].clamp_min(0);
Y[inertIndex].max(0.0);
}
}

View File

@ -89,10 +89,17 @@ void Foam::adjointOutletPressureFvPatchScalarField::updateCoeffs()
return;
}
const auto& phip = patch().lookupPatchField<surfaceScalarField>("phi");
const auto& phiap = patch().lookupPatchField<surfaceScalarField>("phia");
const auto& Up = patch().lookupPatchField<volVectorField>("U");
const auto& Uap = patch().lookupPatchField<volVectorField>("Ua");
const fvsPatchField<scalar>& phip =
patch().lookupPatchField<surfaceScalarField, scalar>("phi");
const fvsPatchField<scalar>& phiap =
patch().lookupPatchField<surfaceScalarField, scalar>("phia");
const fvPatchField<vector>& Up =
patch().lookupPatchField<volVectorField, vector>("U");
const fvPatchField<vector>& Uap =
patch().lookupPatchField<volVectorField, vector>("Ua");
operator==((phiap/patch().magSf() - 1.0)*phip/patch().magSf() + (Up & Uap));
@ -102,8 +109,8 @@ void Foam::adjointOutletPressureFvPatchScalarField::updateCoeffs()
void Foam::adjointOutletPressureFvPatchScalarField::write(Ostream& os) const
{
fvPatchField<scalar>::write(os);
fvPatchField<scalar>::writeValueEntry(os);
fvPatchScalarField::write(os);
writeEntry("value", os);
}

View File

@ -90,8 +90,11 @@ void Foam::adjointOutletVelocityFvPatchVectorField::updateCoeffs()
return;
}
const auto& phiap = patch().lookupPatchField<surfaceScalarField>("phia");
const auto& Up = patch().lookupPatchField<volVectorField>("U");
const fvsPatchField<scalar>& phiap =
patch().lookupPatchField<surfaceScalarField, scalar>("phia");
const fvPatchField<vector>& Up =
patch().lookupPatchField<volVectorField, vector>("U");
scalarField Un(mag(patch().nf() & Up));
vectorField UtHat((Up - patch().nf()*Un)/(Un + SMALL));
@ -107,8 +110,8 @@ void Foam::adjointOutletVelocityFvPatchVectorField::updateCoeffs()
void Foam::adjointOutletVelocityFvPatchVectorField::write(Ostream& os) const
{
fvPatchField<vector>::write(os);
fvPatchField<vector>::writeValueEntry(os);
fvPatchVectorField::write(os);
writeEntry("value", os);
}

View File

@ -8,7 +8,7 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/regionFaModels/lnInclude
-I$(LIB_SRC)/regionFaModels\lnInclude
EXE_LIBS = \
-lfiniteVolume \

View File

@ -94,7 +94,7 @@ if (mesh.changing())
{
if (refCells[zoneId] != -1)
{
validCells.push_back(refCells[zoneId]);
validCells.append(refCells[zoneId]);
}
}

View File

@ -42,11 +42,11 @@ Description
#include "CorrectPhi.H"
#ifdef MPPIC
#include "basicKinematicCloud.H"
#define basicKinematicTypeCloud basicKinematicCloud
#include "kinematicCloud.H"
#define kinematicTypeCloud kinematicCloud
#else
#include "basicKinematicCollidingCloud.H"
#define basicKinematicTypeCloud basicKinematicCollidingCloud
#include "kinematicCollidingCloud.H"
#define kinematicTypeCloud kinematicCollidingCloud
#endif
int main(int argc, char *argv[])
@ -88,7 +88,7 @@ int main(int argc, char *argv[])
Info<< "Time = " << runTime.timeName() << nl << endl;
// Store the particle positions
kinematicCloud.storeGlobalPositions();
kCloud.storeGlobalPositions();
mesh.update();
@ -111,15 +111,15 @@ int main(int argc, char *argv[])
continuousPhaseTransport.correct();
muc = rhoc*continuousPhaseTransport.nu();
kinematicCloud.evolve();
kCloud.evolve();
// Update continuous phase volume fraction field
alphac = max(1.0 - kinematicCloud.theta(), alphacMin);
alphac = max(1.0 - kCloud.theta(), alphacMin);
alphac.correctBoundaryConditions();
alphacf = fvc::interpolate(alphac);
alphaPhic = alphacf*phic;
fvVectorMatrix cloudSU(kinematicCloud.SU(Uc));
fvVectorMatrix cloudSU(kCloud.SU(Uc));
volVectorField cloudVolSUSu
(
IOobject

View File

@ -12,6 +12,8 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \

View File

@ -11,8 +11,11 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseIncompressible/lnInclude \

View File

@ -43,11 +43,11 @@ Description
#include "pimpleControl.H"
#ifdef MPPIC
#include "basicKinematicCloud.H"
#define basicKinematicTypeCloud basicKinematicCloud
#include "kinematicCloud.H"
#define kinematicTypeCloud kinematicCloud
#else
#include "basicKinematicCollidingCloud.H"
#define basicKinematicTypeCloud basicKinematicCollidingCloud
#include "kinematicCollidingCloud.H"
#define kinematicTypeCloud kinematicCollidingCloud
#endif
int main(int argc, char *argv[])
@ -91,16 +91,16 @@ int main(int argc, char *argv[])
continuousPhaseTransport.correct();
muc = rhoc*continuousPhaseTransport.nu();
Info<< "Evolving " << kinematicCloud.name() << endl;
kinematicCloud.evolve();
Info<< "Evolving " << kCloud.name() << endl;
kCloud.evolve();
// Update continuous phase volume fraction field
alphac = max(1.0 - kinematicCloud.theta(), alphacMin);
alphac = max(1.0 - kCloud.theta(), alphacMin);
alphac.correctBoundaryConditions();
alphacf = fvc::interpolate(alphac);
alphaPhic = alphacf*phic;
fvVectorMatrix cloudSU(kinematicCloud.SU(Uc));
fvVectorMatrix cloudSU(kCloud.SU(Uc));
volVectorField cloudVolSUSu
(
IOobject

View File

@ -10,6 +10,8 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \

View File

@ -10,8 +10,11 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \

View File

@ -125,13 +125,13 @@ const word kinematicCloudName
);
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
basicKinematicTypeCloud kinematicCloud
kinematicTypeCloud kCloud
(
kinematicCloudName,
g,
rhoc,
Uc,
muc,
g
muc
);
// Particle fraction upper limit
@ -139,13 +139,13 @@ scalar alphacMin
(
1.0
- (
kinematicCloud.particleProperties().subDict("constantProperties")
kCloud.particleProperties().subDict("constantProperties")
.get<scalar>("alphaMax")
)
);
// Update alphac from the particle locations
alphac = max(1.0 - kinematicCloud.theta(), alphacMin);
alphac = max(1.0 - kCloud.theta(), alphacMin);
alphac.correctBoundaryConditions();
surfaceScalarField alphacf("alphacf", fvc::interpolate(alphac));

View File

@ -6,7 +6,6 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/lagrangian/coalCombustion/lnInclude \
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
@ -35,7 +34,6 @@ EXE_LIBS = \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-lcoalCombustion\
-lspecie \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \

View File

@ -40,11 +40,11 @@ tmp<fv::convectionScheme<scalar>> mvConvection
fvOptions.correct(Yi);
Yi.clamp_min(0);
Yi.max(0.0);
Yt += Yi;
}
}
Y[inertIndex] = scalar(1) - Yt;
Y[inertIndex].clamp_min(0);
Y[inertIndex].max(0.0);
}

View File

@ -37,8 +37,8 @@ Description
#include "fvCFD.H"
#include "turbulentFluidThermoModel.H"
#include "basicThermoCloud.H"
#include "coalCloud.H"
#include "thermoCloud.H"
#include "reactingMultiphaseCloud.H"
#include "psiReactionThermo.H"
#include "CombustionModel.H"
#include "fvOptions.H"

View File

@ -1,19 +1,19 @@
Info<< "\nConstructing coal cloud" << endl;
coalCloud coalParcels
reactingMultiphaseCloud coalParcels
(
"coalCloud1",
g,
rho,
U,
g,
slgThermo
);
Info<< "\nConstructing limestone cloud" << endl;
basicThermoCloud limestoneParcels
thermoCloud limestoneParcels
(
"limestoneCloud1",
g,
rho,
U,
g,
slgThermo
);

View File

@ -9,6 +9,8 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels \

View File

@ -63,13 +63,13 @@ const word kinematicCloudName
);
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
basicKinematicCollidingCloud kinematicCloud
kinematicCollidingCloud kCloud
(
kinematicCloudName,
g,
rhoInf,
U,
mu,
g
mu
);
IOobject Hheader

View File

@ -10,6 +10,8 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels \

View File

@ -41,7 +41,7 @@ Description
#include "dynamicFvMesh.H"
#include "singlePhaseTransportModel.H"
#include "turbulentTransportModel.H"
#include "basicKinematicCollidingCloud.H"
#include "kinematicCollidingCloud.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -76,19 +76,19 @@ int main(int argc, char *argv[])
{
Info<< "Time = " << runTime.timeName() << nl << endl;
kinematicCloud.storeGlobalPositions();
kCloud.storeGlobalPositions();
mesh.update();
U.correctBoundaryConditions();
Info<< "Evolving " << kinematicCloud.name() << endl;
Info<< "Evolving " << kCloud.name() << endl;
laminarTransport.correct();
mu = laminarTransport.nu()*rhoInfValue;
kinematicCloud.evolve();
kCloud.evolve();
runTime.write();

View File

@ -40,7 +40,7 @@ Description
#include "fvCFD.H"
#include "singlePhaseTransportModel.H"
#include "turbulentTransportModel.H"
#include "basicKinematicCollidingCloud.H"
#include "kinematicCollidingCloud.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -75,13 +75,13 @@ int main(int argc, char *argv[])
{
Info<< "Time = " << runTime.timeName() << nl << endl;
Info<< "Evolving " << kinematicCloud.name() << endl;
Info<< "Evolving " << kCloud.name() << endl;
laminarTransport.correct();
mu = laminarTransport.nu()*rhoInfValue;
kinematicCloud.evolve();
kCloud.evolve();
runTime.write();

View File

@ -8,6 +8,12 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \

View File

@ -6,7 +6,7 @@
+ MRF.DDt(U)
+ turbulence->divDevReff(U)
==
parcels.SU(U, true)
scalar(1)/rhoInfValue*parcels.SU(U)
+ fvOptions(U)
);

View File

@ -4,13 +4,12 @@ const word kinematicCloudName
);
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
basicKinematicCloud parcels
kinematicCloud parcels
(
kinematicCloudName,
g,
rhoInf,
U,
muc,
g
muc
);

View File

@ -40,7 +40,7 @@ Description
#include "singlePhaseTransportModel.H"
#include "turbulentTransportModel.H"
#include "surfaceFilmModel.H"
#include "basicKinematicCloud.H"
#include "kinematicCloud.H"
#include "fvOptions.H"
#include "pimpleControl.H"
#include "CorrectPhi.H"
@ -67,7 +67,6 @@ int main(int argc, char *argv[])
#include "createDyMControls.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createRegionControls.H"
#include "createUfIfPresent.H"
turbulence->validate();
@ -95,7 +94,7 @@ int main(int argc, char *argv[])
// Do any mesh changes
mesh.update();
if (solvePrimaryRegion && mesh.changing())
if (pimple.solveFlow() && mesh.changing())
{
MRF.update();
@ -120,7 +119,7 @@ int main(int argc, char *argv[])
parcels.evolve();
surfaceFilm.evolve();
if (solvePrimaryRegion)
if (pimple.solveFlow())
{
// --- PIMPLE loop
while (pimple.loop())

View File

@ -0,0 +1,3 @@
parcelFoam.C
EXE = $(FOAM_USER_APPBIN)/parcelFoam

View File

@ -1,49 +1,48 @@
EXE_INC = \
-I$(FOAM_SOLVERS)/lagrangian/reactingParcelFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/finiteArea/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/regionFaModels/lnInclude \
-I$(LIB_SRC)/finiteArea/lnInclude \
-I$(LIB_SRC)/faOptions/lnInclude
-I$(LIB_SRC)/faOptions/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude
LIB_LIBS = \
EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lmeshTools \
-lsampling \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lincompressibleTransportModels \
-ldynamicMesh \
-ldynamicFvMesh \
-ltopoChangerFvMesh \
-latmosphericModels \
-lregionModels \
-lsurfaceFilmModels \
-lsurfaceFilmDerivedFvPatchFields \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-ldistributionModels \
-lspecie \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lthermophysicalProperties \
-lreactionThermophysicalModels \
-lSLGThermo \
-lradiationModels \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lcompressibleTurbulenceModels \
-lincompressibleTransportModels \
-lregionModels \
-lsurfaceFilmModels \
-ldynamicMesh \
-ldynamicFvMesh \
-lregionFaModels \
-lfiniteArea
-lfiniteArea \
-lfaOptions

View File

@ -0,0 +1,22 @@
MRF.correctBoundaryVelocity(U);
fvVectorMatrix UEqn
(
fvm::ddt(U) + fvm::div(phi, U)
+ MRF.DDt(U)
+ turbulence->divDevReff(U)
==
scalar(1)/rhoInfValue*parcels.SU(U)
+ fvOptions(U)
);
UEqn.relax();
fvOptions.constrain(UEqn);
if (pimple.momentumPredictor())
{
solve(UEqn == -fvc::grad(p));
fvOptions.correct(U);
}

View File

@ -0,0 +1,2 @@
auto parcels = parcelCloudModelList(g, rhoInf, U, muc);

View File

@ -0,0 +1 @@
regionModels::surfaceFilmModel& surfaceFilm = tsurfaceFilm();

View File

@ -0,0 +1,85 @@
#include "readGravitationalAcceleration.H"
Info<< "Reading field p\n" << endl;
volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "\nReading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
#include "createPhi.H"
singlePhaseTransportModel laminarTransport(U, phi);
dimensionedScalar rhoInfValue
(
"rhoInf",
dimDensity,
laminarTransport
);
volScalarField rhoInf
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
rhoInfValue
);
volScalarField muc
(
IOobject
(
"muc",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
rhoInf*laminarTransport.nu()
);
Info<< "Creating turbulence model\n" << endl;
autoPtr<incompressible::turbulenceModel> turbulence
(
incompressible::turbulenceModel::New(U, phi, laminarTransport)
);
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, pimple.dict(), pRefCell, pRefValue);
mesh.setFluxRequired(p.name());
#include "createMRF.H"
#include "createClouds.H"
#include "createSurfaceFilmModel.H"
#include "createFvOptions.H"

View File

@ -0,0 +1,58 @@
volScalarField rAU(1.0/UEqn.A());
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
surfaceScalarField phiHbyA("phiHbyA", fvc::flux(HbyA));
if (pimple.ddtCorr())
{
phiHbyA += MRF.zeroFilter(fvc::interpolate(rAU)*fvc::ddtCorr(U, phi, Uf));
}
MRF.makeRelative(phiHbyA);
if (p.needReference())
{
fvc::makeRelative(phiHbyA, U);
adjustPhi(phiHbyA, U, p);
fvc::makeAbsolute(phiHbyA, U);
}
// Update the pressure BCs to ensure flux consistency
constrainPressure(p, U, phiHbyA, rAU, MRF);
// Non-orthogonal pressure corrector loop
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
fvm::laplacian(rAU, p)
==
fvc::div(phiHbyA)
);
pEqn.setReference(pRefCell, pRefValue);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
{
phi = phiHbyA - pEqn.flux();
}
}
#include "continuityErrs.H"
p.relax();
U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions();
fvOptions.correct(U);
// Correct rhoUf if the mesh is moving
fvc::correctUf(Uf, U, phi);
// Make the fluxes relative to the mesh motion
fvc::makeRelative(phi, U);

View File

@ -0,0 +1,154 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
parcelFoam
Group
grpLagrangianSolvers
Description
Transient solver for incompressible, turbulent flow with kinematic,
particle cloud, and surface film modelling.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "dynamicFvMesh.H"
#include "singlePhaseTransportModel.H"
#include "turbulentTransportModel.H"
#include "surfaceFilmModel.H"
#include "parcelCloudModelList.H"
#include "fvOptions.H"
#include "pimpleControl.H"
#include "CorrectPhi.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
argList::addNote
(
"Transient solver for incompressible, turbulent flow"
" with kinematic particle clouds"
" and surface film modelling."
);
#define CREATE_MESH createMeshesPostProcess.H
#include "postProcess.H"
#include "addCheckCaseOptions.H"
#include "setRootCaseLists.H"
#include "createTime.H"
#include "createDynamicFvMesh.H"
#include "initContinuityErrs.H"
#include "createDyMControls.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createUfIfPresent.H"
turbulence->validate();
#include "CourantNo.H"
#include "setInitialDeltaT.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (runTime.run())
{
#include "readDyMControls.H"
#include "CourantNo.H"
#include "setMultiRegionDeltaT.H"
++runTime;
Info<< "Time = " << runTime.timeName() << nl << endl;
// Store the particle positions
parcels.storeGlobalPositions();
// Do any mesh changes
mesh.update();
if (pimple.solveFlow() && mesh.changing())
{
MRF.update();
if (correctPhi)
{
// Calculate absolute flux
// from the mapped surface velocity
phi = mesh.Sf() & Uf();
#include "../../incompressible/pimpleFoam/correctPhi.H"
// Make the fluxes relative to the mesh-motion
fvc::makeRelative(phi, U);
}
if (checkMeshCourantNo)
{
#include "meshCourantNo.H"
}
}
parcels.evolve();
surfaceFilm.evolve();
if (pimple.solveFlow())
{
// --- PIMPLE loop
while (pimple.loop())
{
#include "UEqn.H"
// --- Pressure corrector loop
while (pimple.correct())
{
#include "pEqn.H"
}
if (pimple.turbCorr())
{
laminarTransport.correct();
turbulence->correct();
}
}
}
runTime.write();
runTime.printExecutionTime(Info);
}
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //

View File

@ -41,11 +41,11 @@ tmp<fv::convectionScheme<scalar>> mvConvection
fvOptions.correct(Yi);
Yi.clamp_min(0);
Yi.max(0.0);
Yt += Yi;
}
}
Y[inertIndex] = scalar(1) - Yt;
Y[inertIndex].clamp_min(0);
Y[inertIndex].max(0.0);
}

View File

@ -1,9 +1,9 @@
Info<< "\nConstructing reacting cloud" << endl;
basicReactingTypeCloud parcels
reactingTypeCloud parcels
(
"reactingCloud1",
g,
rho,
U,
g,
slgThermo
);

View File

@ -37,8 +37,8 @@ Description
\*---------------------------------------------------------------------------*/
#define CLOUD_BASE_TYPE HeterogeneousReacting
#define CLOUD_BASE_TYPE_NAME "HeterogeneousReacting"
#define CLOUD_BASE_TYPE heterogeneousReacting
#define CLOUD_BASE_TYPE_NAME "heterogeneousReacting"
#include "reactingParcelFoam.C"

View File

@ -53,12 +53,12 @@ Description
#include "cloudMacros.H"
#ifndef CLOUD_BASE_TYPE
#define CLOUD_BASE_TYPE ReactingMultiphase
#define CLOUD_BASE_TYPE reactingMultiphase
#define CLOUD_BASE_TYPE_NAME "reacting"
#endif
#include CLOUD_INCLUDE_FILE(CLOUD_BASE_TYPE)
#define basicReactingTypeCloud CLOUD_TYPE(CLOUD_BASE_TYPE)
#define reactingTypeCloud CLOUD_TYPE(CLOUD_BASE_TYPE)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -81,7 +81,6 @@ int main(int argc, char *argv[])
#include "createDyMControls.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createRegionControls.H"
#include "initContinuityErrs.H"
#include "createRhoUfIfPresent.H"
@ -105,7 +104,7 @@ int main(int argc, char *argv[])
// so that it can be mapped and used in correctPhi
// to ensure the corrected phi has the same divergence
autoPtr<volScalarField> divrhoU;
if (solvePrimaryRegion && correctPhi)
if (pimple.solveFlow() && correctPhi)
{
divrhoU.reset
(
@ -133,7 +132,7 @@ int main(int argc, char *argv[])
// Store momentum to set rhoUf for introduced faces.
autoPtr<volVectorField> rhoU;
if (solvePrimaryRegion && rhoUf.valid())
if (pimple.solveFlow() && rhoUf.valid())
{
rhoU.reset(new volVectorField("rhoU", rho*U));
}
@ -144,7 +143,7 @@ int main(int argc, char *argv[])
// Do any mesh changes
mesh.update();
if (solvePrimaryRegion && mesh.changing())
if (pimple.solveFlow() && mesh.changing())
{
gh = (g & mesh.C()) - ghRef;
ghf = (g & mesh.Cf()) - ghRef;
@ -172,7 +171,7 @@ int main(int argc, char *argv[])
parcels.evolve();
surfaceFilm.evolve();
if (solvePrimaryRegion)
if (pimple.solveFlow())
{
if (pimple.nCorrPIMPLE() <= 1)
{

View File

@ -7,7 +7,6 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/lagrangian/coalCombustion/lnInclude \
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \

View File

@ -38,11 +38,11 @@ tmp<fv::convectionScheme<scalar>> mvConvection
fvOptions.correct(Yi);
Yi.clamp_min(0);
Yi.max(0.0);
Yt += Yi;
}
}
Y[inertIndex] = scalar(1) - Yt;
Y[inertIndex].clamp_min(0);
Y[inertIndex].max(0.0);
}

View File

@ -1,9 +1,9 @@
Info<< "\nConstructing " << CLOUD_BASE_TYPE_NAME << " cloud" << endl;
basicReactingTypeCloud parcels
reactingTypeCloud parcels
(
word(CLOUD_BASE_TYPE_NAME) & "Cloud1",
g,
rho,
U,
g,
slgThermo
);

View File

@ -45,13 +45,13 @@ Description
#include "cloudMacros.H"
#ifndef CLOUD_BASE_TYPE
#define CLOUD_BASE_TYPE ReactingMultiphase
#define CLOUD_BASE_TYPE reactingMultiphase
//#define CLOUD_BASE_TYPE_NAME "reactingMultiphase" Backwards compat
#define CLOUD_BASE_TYPE_NAME "reacting"
#endif
#include CLOUD_INCLUDE_FILE(CLOUD_BASE_TYPE)
#define basicReactingTypeCloud CLOUD_TYPE(CLOUD_BASE_TYPE)
#define reactingTypeCloud CLOUD_TYPE(CLOUD_BASE_TYPE)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -0,0 +1,41 @@
{
volScalarField& he = thermo.he();
fvScalarMatrix EEqn
(
fvm::ddt(rho, he) + mvConvection->fvmDiv(phi, he)
+ fvc::ddt(rho, K) + fvc::div(phi, K)
+ (
he.name() == "e"
? fvc::div
(
fvc::absolute(phi/fvc::interpolate(rho), U),
p,
"div(phiv,p)"
)
: -dpdt
)
- fvm::laplacian(turbulence->alphaEff(), he)
==
rho*(U&g)
+ parcels.Sh(he)
+ surfaceFilm.Sh()
+ radiation->Sh(thermo, he)
+ Qdot
+ fvOptions(rho, he)
);
EEqn.relax();
fvOptions.constrain(EEqn);
EEqn.solve();
fvOptions.correct(he);
thermo.correct();
radiation->correct();
Info<< "T gas min/max = " << min(T).value() << ", "
<< max(T).value() << endl;
}

View File

@ -0,0 +1,3 @@
rhoParcelFoam.C
EXE = $(FOAM_USER_APPBIN)/rhoParcelFoam

View File

@ -1,52 +1,58 @@
EXE_INC = \
-I../reactingParcelFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/surfMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/finiteArea/lnInclude \
-I${LIB_SRC}/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I${LIB_SRC}/sampling/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
-I$(LIB_SRC)/lagrangian/turbulence/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/regionFaModels/lnInclude \
-I$(LIB_SRC)/finiteArea/lnInclude \
-I$(LIB_SRC)/faOptions/lnInclude
-I$(LIB_SRC)/faOptions/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude \
-I$(FOAM_SOLVERS)/combustion/reactingFoam
LIB_LIBS = \
EXE_LIBS = \
-lfiniteVolume \
-lsurfMesh \
-lfvOptions \
-lmeshTools \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-ldistributionModels \
-ldynamicMesh \
-ldynamicFvMesh \
-lsampling \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lthermoTools \
-lspecie \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lthermophysicalProperties \
-lreactionThermophysicalModels \
-lthermophysicalProperties \
-lSLGThermo \
-lradiationModels \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lcompressibleTurbulenceModels \
-lincompressibleTransportModels \
-lchemistryModel \
-lregionModels \
-lradiationModels \
-lsurfaceFilmModels \
-ldynamicMesh \
-ldynamicFvMesh \
-lsurfaceFilmDerivedFvPatchFields \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-lODE \
-lcombustionModels \
-lregionFaModels \
-lfiniteArea
-lfiniteArea \
-lfaOptions

View File

@ -0,0 +1,34 @@
MRF.correctBoundaryVelocity(U);
fvVectorMatrix UEqn
(
fvm::ddt(rho, U) + fvm::div(phi, U)
+ MRF.DDt(rho, U)
+ turbulence->divDevRhoReff(U)
==
parcels.SU(U)
+ fvOptions(rho, U)
);
UEqn.relax();
fvOptions.constrain(UEqn);
if (pimple.momentumPredictor())
{
solve
(
UEqn
==
fvc::reconstruct
(
(
- ghf*fvc::snGrad(rho)
- fvc::snGrad(p_rgh)
)*mesh.magSf()
)
);
fvOptions.correct(U);
K = 0.5*magSqr(U);
}

View File

@ -0,0 +1,51 @@
tmp<fv::convectionScheme<scalar>> mvConvection
(
fv::convectionScheme<scalar>::New
(
mesh,
fields,
phi,
mesh.divScheme("div(phi,Yi_h)")
)
);
{
combustion->correct();
Qdot = combustion->Qdot();
volScalarField Yt(0.0*Y[0]);
forAll(Y, i)
{
if (i != inertIndex && composition.active(i))
{
volScalarField& Yi = Y[i];
fvScalarMatrix YEqn
(
fvm::ddt(rho, Yi)
+ mvConvection->fvmDiv(phi, Yi)
- fvm::laplacian(turbulence->muEff(), Yi)
==
parcels.SYi(i, Yi)
+ fvOptions(rho, Yi)
+ combustion->R(Yi)
+ surfaceFilm.Srho(i)
);
YEqn.relax();
fvOptions.constrain(YEqn);
YEqn.solve(mesh.solver("Yi"));
fvOptions.correct(Yi);
Yi.max(0.0);
Yt += Yi;
}
}
Y[inertIndex] = scalar(1) - Yt;
Y[inertIndex].max(0.0);
}

View File

@ -0,0 +1,3 @@
Info<< "\nConstructing cloud" << endl;
auto parcels = parcelCloudModelList(g, rho, U, slgThermo);

View File

@ -0,0 +1,5 @@
const volScalarField& T = thermo.T();
const volScalarField& psi = thermo.psi();
const label inertIndex(composition.species().find(inertSpecie));
regionModels::surfaceFilmModel& surfaceFilm = tsurfaceFilm();

View File

@ -0,0 +1,132 @@
#include "createRDeltaT.H"
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<rhoReactionThermo> pThermo(rhoReactionThermo::New(mesh));
rhoReactionThermo& thermo = pThermo();
thermo.validate(args.executable(), "h", "e");
SLGThermo slgThermo(mesh, thermo);
basicSpecieMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
const word inertSpecie(thermo.get<word>("inertSpecie"));
if
(
!composition.species().found(inertSpecie)
&& composition.species().size() > 0
)
{
FatalIOErrorIn(args.executable().c_str(), thermo)
<< "Inert specie " << inertSpecie << " not found in available species "
<< composition.species()
<< exit(FatalIOError);
}
Info<< "Creating field rho\n" << endl;
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
thermo.rho()
);
volScalarField& p = thermo.p();
Info<< "\nReading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
#include "compressibleCreatePhi.H"
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence
(
compressible::turbulenceModel::New
(
rho,
U,
phi,
thermo
)
);
Info<< "Creating combustion model\n" << endl;
autoPtr<CombustionModel<rhoReactionThermo>> combustion
(
CombustionModel<rhoReactionThermo>::New(thermo, turbulence())
);
#include "readGravitationalAcceleration.H"
#include "readhRef.H"
#include "gh.H"
volScalarField p_rgh
(
IOobject
(
"p_rgh",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
// Force p_rgh to be consistent with p
p_rgh = p - rho*gh;
pressureControl pressureControl(p, rho, pimple.dict(), false);
mesh.setFluxRequired(p_rgh.name());
Info<< "Creating multi-variate interpolation scheme\n" << endl;
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
forAll(Y, i)
{
fields.add(Y[i]);
}
fields.add(thermo.he());
volScalarField Qdot
(
IOobject
(
"Qdot",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero)
);
#include "createDpdt.H"
#include "createK.H"
#include "createMRF.H"
#include "createRadiationModel.H"
#include "createClouds.H"
#include "createSurfaceFilmModel.H"
#include "createFvOptions.H"

View File

@ -0,0 +1,35 @@
#include "createMesh.H"
dictionary filmDict;
IOobject io
(
"surfaceFilmProperties",
mesh.time().constant(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE,
false
);
if (io.typeHeaderOk<IOdictionary>())
{
IOdictionary propDict(io);
filmDict = std::move(propDict);
const word filmRegionName = filmDict.get<word>("region");
fvMesh filmMesh
(
IOobject
(
filmRegionName,
runTime.timeName(),
runTime,
IOobject::MUST_READ
)
);
}

View File

@ -0,0 +1,6 @@
Info<< "\nConstructing surface film model" << endl;
autoPtr<regionModels::surfaceFilmModel> tsurfaceFilm
(
regionModels::surfaceFilmModel::New(mesh, g)
);

View File

@ -0,0 +1,96 @@
if (!pimple.SIMPLErho())
{
rho = thermo.rho();
}
// Thermodynamic density needs to be updated by psi*d(p) after the
// pressure solution
const volScalarField psip0(psi*p);
volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
surfaceScalarField phiHbyA
(
"phiHbyA",
(
fvc::flux(rho*HbyA)
+ MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi))
)
+ phig
);
fvc::makeRelative(phiHbyA, rho, U);
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
// Update the pressure BCs to ensure flux consistency
constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF);
fvScalarMatrix p_rghDDtEqn
(
fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh))
+ fvc::div(phiHbyA)
==
parcels.Srho()
+ surfaceFilm.Srho()
+ fvOptions(psi, p_rgh, rho.name())
);
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix p_rghEqn
(
p_rghDDtEqn
- fvm::laplacian(rhorAUf, p_rgh)
);
p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
{
phi = phiHbyA + p_rghEqn.flux();
// Explicitly relax pressure for momentum corrector
p_rgh.relax();
U = HbyA + rAU*fvc::reconstruct((p_rghEqn.flux() + phig)/rhorAUf);
U.correctBoundaryConditions();
fvOptions.correct(U);
K = 0.5*magSqr(U);
}
}
p = p_rgh + rho*gh;
// Thermodynamic density update
thermo.correctRho(psi*p - psip0);
#include "rhoEqn.H"
#include "compressibleContinuityErrs.H"
if (pressureControl.limit(p))
{
p.correctBoundaryConditions();
rho = thermo.rho();
p_rgh = p - rho*gh;
}
else if (pimple.SIMPLErho())
{
rho = thermo.rho();
}
// Correct rhoUf if the mesh is moving
fvc::correctRhoUf(rhoUf, rho, U, phi);
if (thermo.dpdt())
{
dpdt = fvc::ddt(p);
if (mesh.moving())
{
dpdt -= fvc::div(fvc::meshPhi(rho, U), p);
}
}

View File

@ -0,0 +1,50 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Global
rhoEqn
Description
Solve the continuity for density.
\*---------------------------------------------------------------------------*/
{
fvScalarMatrix rhoEqn
(
fvm::ddt(rho)
+ fvc::div(phi)
==
parcels.Srho(rho)
+ surfaceFilm.Srho()
+ fvOptions(rho)
);
rhoEqn.solve();
fvOptions.correct(rho);
}
// ************************************************************************* //

View File

@ -0,0 +1,206 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2020 OpenFOAM Foundation
Copyright (C) 2018-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
rhoParcelFoam
Group
grpLagrangianSolvers
Description
Transient solver for compressible, turbulent flow with a reacting,
multiphase particle cloud, and surface film modelling.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "dynamicFvMesh.H"
#include "turbulentFluidThermoModel.H"
#include "surfaceFilmModel.H"
#include "rhoReactionThermo.H"
#include "CombustionModel.H"
#include "radiationModel.H"
#include "SLGThermo.H"
#include "fvOptions.H"
#include "pimpleControl.H"
#include "pressureControl.H"
#include "CorrectPhi.H"
#include "localEulerDdtScheme.H"
#include "fvcSmooth.H"
#include "parcelCloudModelList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
argList::addNote
(
"Transient solver for compressible, turbulent flow"
" with lagrangian parcel clouds and surface film modelling."
);
#define CREATE_MESH createMeshesPostProcess.H
#include "postProcess.H"
#include "addCheckCaseOptions.H"
#include "setRootCaseLists.H"
#include "createTime.H"
#include "createDynamicFvMesh.H"
#include "createDyMControls.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "initContinuityErrs.H"
#include "createRhoUfIfPresent.H"
turbulence->validate();
if (!LTS)
{
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (runTime.run())
{
#include "readDyMControls.H"
// Store divrhoU from the previous mesh
// so that it can be mapped and used in correctPhi
// to ensure the corrected phi has the same divergence
autoPtr<volScalarField> divrhoU;
if (pimple.solveFlow() && correctPhi)
{
divrhoU.reset
(
new volScalarField
(
"divrhoU",
fvc::div(fvc::absolute(phi, rho, U))
)
);
}
if (LTS)
{
#include "setRDeltaT.H"
}
else
{
#include "compressibleCourantNo.H"
#include "setMultiRegionDeltaT.H"
}
++runTime;
Info<< "Time = " << runTime.timeName() << nl << endl;
// Store momentum to set rhoUf for introduced faces.
autoPtr<volVectorField> rhoU;
if (pimple.solveFlow() && rhoUf.valid())
{
rhoU.reset(new volVectorField("rhoU", rho*U));
}
// Store the particle positions
parcels.storeGlobalPositions();
// Do any mesh changes
mesh.update();
if (pimple.solveFlow() && mesh.changing())
{
gh = (g & mesh.C()) - ghRef;
ghf = (g & mesh.Cf()) - ghRef;
MRF.update();
if (correctPhi)
{
// Calculate absolute flux
// from the mapped surface velocity
phi = mesh.Sf() & rhoUf();
#include "../../compressible/rhoPimpleFoam/correctPhi.H"
// Make the fluxes relative to the mesh-motion
fvc::makeRelative(phi, rho, U);
}
if (checkMeshCourantNo)
{
#include "meshCourantNo.H"
}
}
parcels.evolve();
surfaceFilm.evolve();
if (pimple.solveFlow())
{
if (pimple.nCorrPIMPLE() <= 1)
{
#include "rhoEqn.H"
}
// --- PIMPLE loop
while (pimple.loop())
{
#include "UEqn.H"
#include "YEqn.H"
#include "EEqn.H"
// --- Pressure corrector loop
while (pimple.correct())
{
#include "pEqn.H"
}
if (pimple.turbCorr())
{
turbulence->correct();
}
}
rho = thermo.rho();
}
runTime.write();
runTime.printExecutionTime(Info);
}
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //

View File

@ -0,0 +1,55 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Global
setMultiRegionDeltaT
Description
Reset the timestep to maintain a constant maximum Courant numbers.
Reduction of time-step is immediate, but increase is damped to avoid
unstable oscillations.
\*---------------------------------------------------------------------------*/
if (adjustTimeStep)
{
const scalar maxDeltaTFact =
min(maxCo/(CoNum + SMALL), maxCo/(surfaceFilm.CourantNumber() + SMALL));
const scalar deltaTFact =
min(min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2);
runTime.setDeltaT
(
min
(
deltaTFact*runTime.deltaTValue(),
maxDeltaT
)
);
Info<< "deltaT = " << runTime.deltaTValue() << endl;
}
// ************************************************************************* //

View File

@ -0,0 +1,137 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
{
volScalarField& rDeltaT = trDeltaT.ref();
const dictionary& pimpleDict = pimple.dict();
// Maximum flow Courant number
scalar maxCo(pimpleDict.get<scalar>("maxCo"));
// Maximum time scale
scalar maxDeltaT(pimpleDict.getOrDefault<scalar>("maxDeltaT", GREAT));
// Smoothing parameter (0-1) when smoothing iterations > 0
scalar rDeltaTSmoothingCoeff
(
pimpleDict.getOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.1)
);
// Damping coefficient (1-0)
scalar rDeltaTDampingCoeff
(
pimpleDict.getOrDefault<scalar>("rDeltaTDampingCoeff", 0.2)
);
// Maximum change in cell temperature per iteration
// (relative to previous value)
scalar alphaTemp(pimpleDict.getOrDefault("alphaTemp", 0.05));
Info<< "Time scales min/max:" << endl;
// Cache old reciprocal time scale field
volScalarField rDeltaT0("rDeltaT0", rDeltaT);
// Flow time scale
{
rDeltaT.ref() =
(
fvc::surfaceSum(mag(phi))()()
/((2*maxCo)*mesh.V()*rho())
);
// Limit the largest time scale
rDeltaT.max(1/maxDeltaT);
Info<< " Flow = "
<< gMin(1/rDeltaT.primitiveField()) << ", "
<< gMax(1/rDeltaT.primitiveField()) << endl;
}
// Reaction source time scale
{
volScalarField::Internal rDeltaTT
(
mag
(
parcels.hsTrans()/(mesh.V()*runTime.deltaT())
+ Qdot()
)
/(
alphaTemp
*rho()
*thermo.Cp()()()
*T()
)
);
Info<< " Temperature = "
<< gMin(1/(rDeltaTT.field() + VSMALL)) << ", "
<< gMax(1/(rDeltaTT.field() + VSMALL)) << endl;
rDeltaT.ref() = max
(
rDeltaT(),
rDeltaTT
);
}
// Update the boundary values of the reciprocal time-step
rDeltaT.correctBoundaryConditions();
// Spatially smooth the time scale field
if (rDeltaTSmoothingCoeff < 1.0)
{
fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff);
}
// Limit rate of change of time scale
// - reduce as much as required
// - only increase at a fraction of old time scale
if
(
rDeltaTDampingCoeff < 1.0
&& runTime.timeIndex() > runTime.startTimeIndex() + 1
)
{
rDeltaT = max
(
rDeltaT,
(scalar(1) - rDeltaTDampingCoeff)*rDeltaT0
);
}
Info<< " Overall = "
<< gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
}
// ************************************************************************* //

View File

@ -7,7 +7,6 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/lagrangian/coalCombustion/lnInclude \
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
@ -47,7 +46,6 @@ EXE_LIBS = \
-lsurfaceFilmModels \
-lcombustionModels \
-lsampling \
-lcoalCombustion \
-lregionFaModels \
-lfiniteArea \
-lfaOptions

View File

@ -38,11 +38,11 @@ tmp<fv::convectionScheme<scalar>> mvConvection
fvOptions.correct(Yi);
Yi.clamp_min(0);
Yi.max(0.0);
Yt += Yi;
}
}
Y[inertIndex] = scalar(1) - Yt;
Y[inertIndex].clamp_min(0);
Y[inertIndex].max(0.0);
}

View File

@ -1,9 +1,9 @@
Info<< "\nConstructing coal cloud" << endl;
coalCloud parcels
reactingMultiphaseCloud parcels
(
"reactingCloud1",
g,
rho,
U,
g,
slgThermo
);

View File

@ -37,7 +37,7 @@ Description
#include "fvCFD.H"
#include "turbulentFluidThermoModel.H"
#include "coalCloud.H"
#include "reactingMultiphaseCloud.H"
#include "rhoReactionThermo.H"
#include "CombustionModel.H"
#include "radiationModel.H"

View File

@ -35,7 +35,6 @@ EXE_LIBS = \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-llagrangianSpray \
-lspecie \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \

View File

@ -39,11 +39,11 @@ tmp<fv::convectionScheme<scalar>> mvConvection
fvOptions.correct(Yi);
Yi.clamp_min(0);
Yi.max(0.0);
Yt += Yi;
}
}
Y[inertIndex] = scalar(1) - Yt;
Y[inertIndex].clamp_min(0);
Y[inertIndex].max(0.0);
}

View File

@ -1,9 +1,9 @@
Info<< "\nConstructing reacting cloud" << endl;
basicSprayCloud parcels
sprayCloud parcels
(
"sprayCloud",
g,
rho,
U,
g,
slgThermo
);

View File

@ -39,7 +39,6 @@ EXE_LIBS = \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-llagrangianSpray \
-lspecie \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \

View File

@ -37,7 +37,7 @@ Description
#include "engineTime.H"
#include "engineMesh.H"
#include "turbulentFluidThermoModel.H"
#include "basicSprayCloud.H"
#include "sprayCloud.H"
#include "psiReactionThermo.H"
#include "CombustionModel.H"
#include "radiationModel.H"

View File

@ -34,7 +34,6 @@ EXE_LIBS = \
-lthermoTools \
-llagrangian \
-llagrangianIntermediate \
-llagrangianSpray \
-llagrangianTurbulence \
-lspecie \
-lcompressibleTransportModels \

View File

@ -35,7 +35,7 @@ Description
\*---------------------------------------------------------------------------*/
#define CLOUD_BASE_TYPE Spray
#define CLOUD_BASE_TYPE spray
#define CLOUD_BASE_TYPE_NAME "spray"
#include "simpleReactingParcelFoam.C"

View File

@ -40,7 +40,6 @@ EXE_LIBS = \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-llagrangianSpray \
-lspecie \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \

View File

@ -38,7 +38,7 @@ Description
#include "fvCFD.H"
#include "dynamicFvMesh.H"
#include "turbulenceModel.H"
#include "basicSprayCloud.H"
#include "sprayCloud.H"
#include "psiReactionThermo.H"
#include "CombustionModel.H"
#include "radiationModel.H"

View File

@ -37,7 +37,7 @@ Description
#include "fvCFD.H"
#include "turbulentFluidThermoModel.H"
#include "basicSprayCloud.H"
#include "sprayCloud.H"
#include "psiReactionThermo.H"
#include "CombustionModel.H"
#include "radiationModel.H"

View File

@ -9,6 +9,8 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \

View File

@ -55,11 +55,11 @@ const word kinematicCloudName
);
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
basicKinematicCloud kinematicCloud
kinematicCloud kCloud
(
kinematicCloudName,
g,
rho,
U,
thermo.mu(),
g
thermo.mu()
);

View File

@ -10,6 +10,8 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \

View File

@ -37,7 +37,7 @@ Description
#include "dynamicFvMesh.H"
#include "psiThermo.H"
#include "turbulentFluidThermoModel.H"
#include "basicKinematicCloud.H"
#include "kinematicCloud.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -73,14 +73,14 @@ int main(int argc, char *argv[])
{
Info<< "Time = " << runTime.timeName() << nl << endl;
kinematicCloud.storeGlobalPositions();
kCloud.storeGlobalPositions();
mesh.update();
U.correctBoundaryConditions();
Info<< "Evolving " << kinematicCloud.name() << endl;
kinematicCloud.evolve();
Info<< "Evolving " << kCloud.name() << endl;
kCloud.evolve();
runTime.write();

View File

@ -39,7 +39,7 @@ Description
#include "fvCFD.H"
#include "psiThermo.H"
#include "turbulentFluidThermoModel.H"
#include "basicKinematicCloud.H"
#include "kinematicCloud.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -75,8 +75,8 @@ int main(int argc, char *argv[])
{
Info<< "Time = " << runTime.timeName() << nl << endl;
Info<< "Evolving " << kinematicCloud.name() << endl;
kinematicCloud.evolve();
Info<< "Evolving " << kCloud.name() << endl;
kCloud.evolve();
runTime.write();

View File

@ -52,7 +52,7 @@ Description
#include "CorrectPhi.H"
#include "fvcSmooth.H"
#include "basicKinematicCloud.H"
#include "kinematicCloud.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -111,12 +111,12 @@ int main(int argc, char *argv[])
Info<< "Time = " << runTime.timeName() << nl << endl;
Info<< "Evolving " << kinematicCloud.name() << endl;
Info<< "Evolving " << kCloud.name() << endl;
kinematicCloud.evolve();
kCloud.evolve();
// Update continuous phase volume fraction field
alphac = max(1.0 - kinematicCloud.theta(), alphacMin);
alphac = max(1.0 - kCloud.theta(), alphacMin);
alphac.correctBoundaryConditions();
Info<< "Continuous phase-1 volume fraction = "
@ -130,7 +130,7 @@ int main(int argc, char *argv[])
alphaPhic = alphacf*phi;
alphacRho = alphac*rho;
fvVectorMatrix cloudSU(kinematicCloud.SU(U));
fvVectorMatrix cloudSU(kCloud.SU(U));
volVectorField cloudVolSUSu
(
IOobject

View File

@ -12,11 +12,14 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude \
-I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \

View File

@ -147,13 +147,13 @@ volScalarField alphacRho(alphac*rho);
alphacRho.oldTime();
Info<< "Constructing kinematicCloud " << endl;
basicKinematicCloud kinematicCloud
kinematicCloud kCloud
(
"kinematicCloud",
g,
rho,
U,
mu,
g
mu
);
// Particle fraction upper limit
@ -161,13 +161,13 @@ scalar alphacMin
(
1.0
- (
kinematicCloud.particleProperties().subDict("constantProperties")
kCloud.particleProperties().subDict("constantProperties")
.get<scalar>("alphaMax")
)
);
// Update alphac from the particle locations
alphac = max(1.0 - kinematicCloud.theta(), alphacMin);
alphac = max(1.0 - kCloud.theta(), alphacMin);
alphac.correctBoundaryConditions();
surfaceScalarField alphacf("alphacf", fvc::interpolate(alphac));

View File

@ -1,5 +1,14 @@
{
alphav = clamp((rho - rholSat)/(rhovSat - rholSat), zero_one{});
alphav =
max
(
min
(
(rho - rholSat)/(rhovSat - rholSat),
scalar(1)
),
scalar(0)
);
alphal = 1.0 - alphav;
Info<< "max-min alphav: " << max(alphav).value()

View File

@ -126,9 +126,9 @@ alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
void alphaContactAngleFvPatchScalarField::write(Ostream& os) const
{
fvPatchField<scalar>::write(os);
fvPatchScalarField::write(os);
os.writeEntry("thetaProperties", thetaProps_);
fvPatchField<scalar>::writeValueEntry(os);
writeEntry("value", os);
}

View File

@ -779,7 +779,7 @@ Foam::multiphaseMixtureThermo::surfaceTensionForce() const
auto sigma = sigmas_.cfind(interfacePair(alpha1, alpha2));
if (!sigma.good())
if (!sigma.found())
{
FatalErrorInFunction
<< "Cannot find interface " << interfacePair(alpha1, alpha2)
@ -907,7 +907,7 @@ void Foam::multiphaseMixtureThermo::correctContactAngle
const auto tp =
acap.thetaProps().cfind(interfacePair(alpha1, alpha2));
if (!tp.good())
if (!tp.found())
{
FatalErrorInFunction
<< "Cannot find interface " << interfacePair(alpha1, alpha2)

View File

@ -99,6 +99,17 @@ Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::mDotAlphal() const
Foam::Pair<Foam::tmp<Foam::volScalarField>>
Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::mDot() const
{
volScalarField limitedAlpha1
(
min(max(mixture_.alpha1(), scalar(0)), scalar(1))
);
volScalarField limitedAlpha2
(
min(max(mixture_.alpha2(), scalar(0)), scalar(1))
);
const volScalarField& T = mesh_.lookupObject<volScalarField>("T");
const twoPhaseMixtureEThermo& thermo =
@ -113,15 +124,11 @@ Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::mDot() const
volScalarField mDotE
(
"mDotE",
coeffE_*mixture_.rho1()*clamp(mixture_.alpha1(), zero_one{})
* max(T - TSat, T0)
"mDotE", coeffE_*mixture_.rho1()*limitedAlpha1*max(T - TSat, T0)
);
volScalarField mDotC
(
"mDotC",
coeffC_*mixture_.rho2()*clamp(mixture_.alpha2(), zero_one{})
* max(TSat - T, T0)
"mDotC", coeffC_*mixture_.rho2()*limitedAlpha2*max(TSat - T, T0)
);
if (mesh_.time().outputTime())
@ -141,6 +148,16 @@ Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::mDot() const
Foam::Pair<Foam::tmp<Foam::volScalarField>>
Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::mDotDeltaT() const
{
volScalarField limitedAlpha1
(
min(max(mixture_.alpha1(), scalar(0)), scalar(1))
);
volScalarField limitedAlpha2
(
min(max(mixture_.alpha2(), scalar(0)), scalar(1))
);
const volScalarField& T = mesh_.lookupObject<volScalarField>("T");
const twoPhaseMixtureEThermo& thermo =
@ -153,14 +170,8 @@ Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::mDotDeltaT() const
return Pair<tmp<volScalarField>>
(
(
coeffC_*mixture_.rho2()*clamp(mixture_.alpha2(), zero_one{})
* pos(TSat - T)
),
(
coeffE_*mixture_.rho1()*clamp(mixture_.alpha1(), zero_one{})
* pos(T - TSat)
)
coeffC_*mixture_.rho2()*limitedAlpha2*pos(TSat - T),
coeffE_*mixture_.rho1()*limitedAlpha1*pos(T - TSat)
);
}
@ -190,17 +201,25 @@ Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::TSource() const
const dimensionedScalar& TSat = thermo.TSat();
const dimensionedScalar L = mixture_.Hf2() - mixture_.Hf1();
dimensionedScalar L = mixture_.Hf2() - mixture_.Hf1();
volScalarField limitedAlpha1
(
min(max(mixture_.alpha1(), scalar(0)), scalar(1))
);
volScalarField limitedAlpha2
(
min(max(mixture_.alpha2(), scalar(0)), scalar(1))
);
const volScalarField Vcoeff
(
coeffE_*mixture_.rho1()*clamp(mixture_.alpha1(), zero_one{})
* L*pos(T - TSat)
coeffE_*mixture_.rho1()*limitedAlpha1*L*pos(T - TSat)
);
const volScalarField Ccoeff
(
coeffC_*mixture_.rho2()*clamp(mixture_.alpha2(), zero_one{})
* L*pos(TSat - T)
coeffC_*mixture_.rho2()*limitedAlpha2*L*pos(TSat - T)
);
TSource =

View File

@ -167,10 +167,20 @@ Foam::Pair<Foam::tmp<Foam::volScalarField>>
Foam::temperaturePhaseChangeTwoPhaseMixtures::interfaceHeatResistance::
mDotAlphal() const
{
volScalarField limitedAlpha1
(
min(max(mixture_.alpha1(), scalar(0)), scalar(1))
);
volScalarField limitedAlpha2
(
min(max(mixture_.alpha2(), scalar(0)), scalar(1))
);
return Pair<tmp<volScalarField>>
(
(mDotc_/clamp(mixture_.alpha2(), scalarMinMax(SMALL, 1))),
-(mDote_/clamp(mixture_.alpha1(), scalarMinMax(SMALL, 1)))
(mDotc_/(limitedAlpha2 + SMALL)),
-(mDote_/(limitedAlpha1 + SMALL))
);
}

Some files were not shown because too many files have changed in this diff Show More