fvModels: Added new clouds and surfaceFilm fvModels to replace specialised solvers
With the new fvModels framework it is now possible to implement complex models
and wrappers around existing complex models which can then be optionally
selected in any general solver which provides compatible fields and
thermophysical properties. This simplifies code development and maintenance by
significantly reducing complex code duplication and also provide the opportunity
of running these models in other solvers without the need for code duplication
and alteration.
The immediate advantage of this development is the replacement of the
specialised Lagrangian solvers with their general counterparts:
reactingParticleFoam -> reactingFoam
reactingParcelFoam -> reactingFoam
sprayFoam -> reactingFoam
simpleReactingParticleFoam -> reactingFoam
buoyantReactingParticleFoam -> buoyantReactingFoam
For example to run a reactingParticleFoam case in reactingFoam add the following
entries in constant/fvModels:
buoyancyForce
{
type buoyancyForce;
}
clouds
{
type clouds;
libs ("liblagrangianParcel.so");
}
which add the acceleration due to gravity needed by Lagrangian clouds and the
clouds themselves.
See the following cases for examples converted from reactingParticleFoam:
$FOAM_TUTORIALS/combustion/reactingFoam/Lagrangian
and to run a buoyantReactingParticleFoam case in buoyantReactingFoam add the
following entry constant/fvModels:
clouds
{
type clouds;
libs ("liblagrangianParcel.so");
}
to add support for Lagrangian clouds and/or
surfaceFilm
{
type surfaceFilm;
libs ("libsurfaceFilmModels.so");
}
to add support for surface film. The buoyancyForce fvModel is not required in
this case as the buoyantReactingFoam solver has built-in support for buoyancy
utilising the p_rgh formulation to provide better numerical handling for this
force for strongly buoyancy-driven flows.
See the following cases for examples converted from buoyantReactingParticleFoam:
$FOAM_TUTORIALS/combustion/buoyantReactingFoam/Lagrangian
All the tutorial cases for the redundant solvers have been updated and converted
into their new equivalents and redirection scripts replace these solvers to
provide users with prompts on which solvers have been replaced by which and
information on how to upgrade their cases.
To support this change and allow all previous Lagrangian tutorials to run as
before the special Lagrangian solver fvSolution/PIMPLE control
solvePrimaryRegion has been replaced by the more general and useful controls:
models : Enable the fvModels
thermophysics : Enable thermophysics (energy and optional composition)
flow : Enable flow (pressure/velocity system)
which also replace the fvSolution/PIMPLE control frozenFlow present in some
solvers. These three controls can be used in various combinations to allow for
example only the fvModels to be evaluated, e.g. in
$FOAM_TUTORIALS/combustion/buoyantReactingFoam/Lagrangian/rivuletPanel
PIMPLE
{
models yes;
thermophysics no;
flow no;
.
.
.
so that only the film is solved. Or during the start-up of a case it might be
beneficial to run the pressure-velocity system for a while without updating
temperature which can be achieved by switching-off thermophysics. Also the
behaviour of the previous frozenFlow switch can be reproduced by switching flow
off with the other two switches on, allowing for example reactions, temperature
and composition update without flow.
This commit is contained in:
@ -78,6 +78,8 @@ int main(int argc, char *argv[])
|
||||
Info<< "Engine time = " << runTime.theta() << runTime.unit()
|
||||
<< endl;
|
||||
|
||||
fvModels.preUpdateMesh();
|
||||
|
||||
mesh.move();
|
||||
|
||||
#include "rhoEqn.H"
|
||||
|
||||
@ -6,7 +6,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/fluidReactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
@ -14,10 +13,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/parcel/lnInclude \
|
||||
-I$(LIB_SRC)/ODE/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
@ -35,9 +30,4 @@ EXE_LIBS = \
|
||||
-lreactionThermophysicalModels \
|
||||
-lchemistryModel \
|
||||
-lcombustionModels \
|
||||
-lregionModels \
|
||||
-lsurfaceFilmModels \
|
||||
-lsurfaceFilmDerivedFvPatchFields \
|
||||
-llagrangianParcel \
|
||||
-llagrangianParcelTurbulence \
|
||||
-lODE
|
||||
|
||||
@ -6,8 +6,7 @@
|
||||
+ MRF.DDt(rho, U)
|
||||
+ turbulence->divDevTau(U)
|
||||
==
|
||||
parcels.SU(U)
|
||||
+ fvModels.source(rho, U)
|
||||
fvModels.source(rho, U)
|
||||
);
|
||||
|
||||
UEqn.relax();
|
||||
|
||||
@ -23,9 +23,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
|
||||
+ mvConvection->fvmDiv(phi, Yi)
|
||||
+ thermophysicalTransport->divj(Yi)
|
||||
==
|
||||
parcels.SYi(i, Yi)
|
||||
+ surfaceFilm.Srho(i)
|
||||
+ combustion->R(Yi)
|
||||
combustion->R(Yi)
|
||||
+ fvModels.source(rho, Yi)
|
||||
);
|
||||
|
||||
@ -60,8 +58,6 @@ tmp<fv::convectionScheme<scalar>> mvConvection
|
||||
+ thermophysicalTransport->divq(he)
|
||||
==
|
||||
combustion->Qdot()
|
||||
+ parcels.Sh(he)
|
||||
+ surfaceFilm.Sh()
|
||||
+ fvModels.source(rho, he)
|
||||
);
|
||||
|
||||
|
||||
@ -1,2 +0,0 @@
|
||||
Info<< "\nConstructing clouds" << endl;
|
||||
parcelCloudList parcels(rho, U, g, thermo);
|
||||
@ -1,3 +1,2 @@
|
||||
const volScalarField& psi = thermo.psi();
|
||||
const volScalarField& T = thermo.T();
|
||||
regionModels::surfaceFilmModel& surfaceFilm = tsurfaceFilm();
|
||||
|
||||
@ -97,23 +97,6 @@ forAll(Y, i)
|
||||
}
|
||||
fields.add(thermo.he());
|
||||
|
||||
IOdictionary additionalControlsDict
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"additionalControls",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
Switch solvePrimaryRegion
|
||||
(
|
||||
additionalControlsDict.lookup("solvePrimaryRegion")
|
||||
);
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt
|
||||
(
|
||||
@ -130,8 +113,5 @@ volScalarField dpdt
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
|
||||
#include "createClouds.H"
|
||||
#include "createSurfaceFilmModel.H"
|
||||
#include "createFvModels.H"
|
||||
#include "createFvConstraints.H"
|
||||
#include "checkRadiationModel.H"
|
||||
|
||||
@ -1,6 +0,0 @@
|
||||
Info<< "\nConstructing surface film model" << endl;
|
||||
|
||||
autoPtr<regionModels::surfaceFilmModel> tsurfaceFilm
|
||||
(
|
||||
regionModels::surfaceFilmModel::New(mesh, g)
|
||||
);
|
||||
@ -25,16 +25,14 @@ Application
|
||||
fireFoam
|
||||
|
||||
Description
|
||||
Transient solver for fires and turbulent diffusion flames with reacting
|
||||
particle clouds and surface film modelling.
|
||||
Transient solver for fires and turbulent diffusion flames with optional
|
||||
reacting particle clouds and surface film modelling via fvModels.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "fluidReactionThermophysicalTransportModel.H"
|
||||
#include "parcelCloudList.H"
|
||||
#include "surfaceFilmModel.H"
|
||||
#include "fluidReactionThermo.H"
|
||||
#include "combustionModel.H"
|
||||
#include "pimpleControl.H"
|
||||
@ -75,21 +73,39 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
parcels.evolve();
|
||||
|
||||
surfaceFilm.evolve();
|
||||
|
||||
if (solvePrimaryRegion)
|
||||
{
|
||||
#include "rhoEqn.H"
|
||||
|
||||
// --- PIMPLE loop
|
||||
while (pimple.loop())
|
||||
{
|
||||
if (!pimple.flow())
|
||||
{
|
||||
if (pimple.models())
|
||||
{
|
||||
fvModels.correct();
|
||||
}
|
||||
|
||||
if (pimple.thermophysics())
|
||||
{
|
||||
#include "YEEqn.H"
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pimple.firstPimpleIter() && !pimple.simpleRho())
|
||||
{
|
||||
#include "rhoEqn.H"
|
||||
}
|
||||
|
||||
if (pimple.models())
|
||||
{
|
||||
fvModels.correct();
|
||||
}
|
||||
|
||||
#include "UEqn.H"
|
||||
|
||||
if (pimple.thermophysics())
|
||||
{
|
||||
#include "YEEqn.H"
|
||||
}
|
||||
|
||||
// --- Pressure corrector loop
|
||||
while (pimple.correct())
|
||||
|
||||
@ -31,9 +31,7 @@ while (pimple.correctNonOrthogonal())
|
||||
+ fvc::div(phiHbyA)
|
||||
- fvm::laplacian(rhorAUf, p_rgh)
|
||||
==
|
||||
parcels.Srho()
|
||||
+ surfaceFilm.Srho()
|
||||
+ fvModels.source(psi, p_rgh, rho.name())
|
||||
fvModels.source(psi, p_rgh, rho.name())
|
||||
);
|
||||
|
||||
p_rghEqn.solve();
|
||||
|
||||
@ -35,9 +35,7 @@ Description
|
||||
fvm::ddt(rho)
|
||||
+ fvc::div(phi)
|
||||
==
|
||||
parcels.Srho(rho)
|
||||
+ surfaceFilm.Srho()
|
||||
+ fvModels.source(rho)
|
||||
fvModels.source(rho)
|
||||
);
|
||||
|
||||
rhoEqn.solve();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -39,7 +39,6 @@ if (adjustTimeStep)
|
||||
}
|
||||
|
||||
const scalar TFactorFluid = maxCo/(CoNum + small);
|
||||
const scalar TFactorFilm = maxCo/(surfaceFilm.CourantNumber() + small);
|
||||
|
||||
const scalar dt0 = runTime.deltaTValue();
|
||||
|
||||
@ -47,7 +46,7 @@ if (adjustTimeStep)
|
||||
(
|
||||
min
|
||||
(
|
||||
dt0*min(min(TFactorFluid, TFactorFilm), 1.2),
|
||||
dt0*min(TFactorFluid, 1.2),
|
||||
maxDeltaT
|
||||
)
|
||||
);
|
||||
|
||||
@ -10,11 +10,11 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||
-I$(LIB_SRC)/ODE/lnInclude \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfluidThermophysicalModels \
|
||||
@ -27,10 +27,10 @@ EXE_LIBS = \
|
||||
-lcompressibleMomentumTransportModels \
|
||||
-lthermophysicalTransportModels \
|
||||
-lfluidReactionThermophysicalTransportModels \
|
||||
-lfiniteVolume \
|
||||
-ldynamicFvMesh \
|
||||
-ltopoChangerFvMesh \
|
||||
-lmeshTools \
|
||||
-lsampling \
|
||||
-lfiniteVolume \
|
||||
-lfvModels \
|
||||
-lfvConstraints
|
||||
-lfvConstraints \
|
||||
-lmeshTools \
|
||||
-lsampling
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
EXE_INC = \
|
||||
-I. \
|
||||
-I$(FOAM_SOLVERS)/combustion/reactingFoam \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/lnInclude \
|
||||
@ -15,15 +11,14 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||
-I$(LIB_SRC)/ODE/lnInclude \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude
|
||||
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lfvModels \
|
||||
-lfvConstraints \
|
||||
-lmeshTools \
|
||||
-lsampling \
|
||||
-lmomentumTransportModels \
|
||||
-lcompressibleMomentumTransportModels \
|
||||
-lthermophysicalTransportModels \
|
||||
@ -33,4 +28,11 @@ EXE_LIBS = \
|
||||
-lfluidThermophysicalModels \
|
||||
-lchemistryModel \
|
||||
-lODE \
|
||||
-lcombustionModels
|
||||
-lcombustionModels \
|
||||
-ldynamicFvMesh \
|
||||
-ltopoChangerFvMesh \
|
||||
-lfiniteVolume \
|
||||
-lfvModels \
|
||||
-lfvConstraints \
|
||||
-lmeshTools \
|
||||
-lsampling
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
// Solve the Momentum equation
|
||||
|
||||
MRF.correctBoundaryVelocity(U);
|
||||
|
||||
tmp<fvVectorMatrix> tUEqn
|
||||
|
||||
@ -25,12 +25,17 @@ Application
|
||||
buoyantReactingFoam
|
||||
|
||||
Description
|
||||
Solver for combustion with chemical reactions with enhanced buoyancy
|
||||
treatment.
|
||||
Transient solver for turbulent flow of compressible reacting fluids with
|
||||
enhanced buoyancy treatment and optional mesh motion and mesh topology
|
||||
changes.
|
||||
|
||||
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
|
||||
pseudo-transient simulations.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "fluidReactionThermo.H"
|
||||
#include "combustionModel.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
@ -38,6 +43,7 @@ Description
|
||||
#include "multivariateScheme.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "pressureReference.H"
|
||||
#include "CorrectPhi.H"
|
||||
#include "fvModels.H"
|
||||
#include "fvConstraints.H"
|
||||
#include "localEulerDdtScheme.H"
|
||||
@ -51,12 +57,12 @@ int main(int argc, char *argv[])
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
#include "createTimeControls.H"
|
||||
#include "createDynamicFvMesh.H"
|
||||
#include "createDyMControls.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "createFields.H"
|
||||
#include "createFieldRefs.H"
|
||||
#include "createRhoUfIfPresent.H"
|
||||
|
||||
turbulence->validate();
|
||||
|
||||
@ -72,7 +78,20 @@ int main(int argc, char *argv[])
|
||||
|
||||
while (pimple.run(runTime))
|
||||
{
|
||||
#include "readTimeControls.H"
|
||||
#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 (correctPhi)
|
||||
{
|
||||
divrhoU = new volScalarField
|
||||
(
|
||||
"divrhoU",
|
||||
fvc::div(fvc::absolute(phi, rho, U))
|
||||
);
|
||||
}
|
||||
|
||||
if (LTS)
|
||||
{
|
||||
@ -88,16 +107,74 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "rhoEqn.H"
|
||||
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
while (pimple.loop())
|
||||
{
|
||||
if (!pimple.flow())
|
||||
{
|
||||
if (pimple.models())
|
||||
{
|
||||
fvModels.correct();
|
||||
}
|
||||
|
||||
#include "UEqn.H"
|
||||
if (pimple.thermophysics())
|
||||
{
|
||||
#include "YEqn.H"
|
||||
#include "EEqn.H"
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pimple.firstPimpleIter() || moveMeshOuterCorrectors)
|
||||
{
|
||||
// Store momentum to set rhoUf for introduced faces.
|
||||
autoPtr<volVectorField> rhoU;
|
||||
if (rhoUf.valid())
|
||||
{
|
||||
rhoU = new volVectorField("rhoU", rho*U);
|
||||
}
|
||||
|
||||
fvModels.preUpdateMesh();
|
||||
|
||||
// Do any mesh changes
|
||||
mesh.update();
|
||||
|
||||
if (mesh.changing())
|
||||
{
|
||||
gh = (g & mesh.C()) - ghRef;
|
||||
ghf = (g & mesh.Cf()) - ghRef;
|
||||
|
||||
MRF.update();
|
||||
|
||||
if (correctPhi)
|
||||
{
|
||||
#include "correctPhi.H"
|
||||
}
|
||||
|
||||
if (checkMeshCourantNo)
|
||||
{
|
||||
#include "meshCourantNo.H"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pimple.firstPimpleIter() && !pimple.simpleRho())
|
||||
{
|
||||
#include "rhoEqn.H"
|
||||
}
|
||||
|
||||
if (pimple.models())
|
||||
{
|
||||
fvModels.correct();
|
||||
}
|
||||
|
||||
#include "UEqn.H"
|
||||
|
||||
if (pimple.thermophysics())
|
||||
{
|
||||
#include "YEqn.H"
|
||||
#include "EEqn.H"
|
||||
}
|
||||
|
||||
// --- Pressure corrector loop
|
||||
while (pimple.correct())
|
||||
@ -111,6 +188,7 @@ int main(int argc, char *argv[])
|
||||
thermophysicalTransport->correct();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rho = thermo.rho();
|
||||
|
||||
|
||||
@ -65,10 +65,7 @@ thermophysicalTransport
|
||||
);
|
||||
|
||||
Info<< "Creating reaction model\n" << endl;
|
||||
autoPtr<combustionModel> reaction
|
||||
(
|
||||
combustionModel::New(thermo, turbulence())
|
||||
);
|
||||
autoPtr<combustionModel> reaction(combustionModel::New(thermo, turbulence()));
|
||||
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "readhRef.H"
|
||||
@ -131,8 +128,3 @@ fields.add(thermo.he());
|
||||
#include "createMRF.H"
|
||||
#include "createFvModels.H"
|
||||
#include "createFvConstraints.H"
|
||||
|
||||
|
||||
// This solver does not support moving mesh but it uses the pressure equation
|
||||
// of one which does, so we need a dummy face-momentum field
|
||||
autoPtr<surfaceVectorField> rhoUf(nullptr);
|
||||
|
||||
@ -2,6 +2,7 @@ EXE_INC = \
|
||||
-I. \
|
||||
-I.. \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
@ -9,17 +10,12 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/fluidReactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/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/chemistryModel/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/parcel/lnInclude \
|
||||
-I$(LIB_SRC)/ODE/lnInclude \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude \
|
||||
-I$(LIB_SRC)/engine/lnInclude
|
||||
@ -39,12 +35,6 @@ EXE_LIBS = \
|
||||
-lfluidThermophysicalModels \
|
||||
-lreactionThermophysicalModels \
|
||||
-lchemistryModel \
|
||||
-lregionModels \
|
||||
-lsurfaceFilmModels \
|
||||
-lsurfaceFilmDerivedFvPatchFields \
|
||||
-llagrangian \
|
||||
-llagrangianParcel \
|
||||
-llagrangianParcelTurbulence \
|
||||
-lODE \
|
||||
-lcombustionModels \
|
||||
-lengine
|
||||
@ -34,8 +34,6 @@ Description
|
||||
#include "engineMesh.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "fluidReactionThermophysicalTransportModel.H"
|
||||
#include "parcelCloudList.H"
|
||||
#include "surfaceFilmModel.H"
|
||||
#include "combustionModel.H"
|
||||
#include "fvModels.H"
|
||||
#include "fvConstraints.H"
|
||||
@ -83,7 +81,7 @@ int main(int argc, char *argv[])
|
||||
// and used in correctPhi to ensure the corrected phi has the
|
||||
// same divergence
|
||||
autoPtr<volScalarField> divrhoU;
|
||||
if (solvePrimaryRegion && correctPhi)
|
||||
if (correctPhi)
|
||||
{
|
||||
divrhoU = new volScalarField
|
||||
(
|
||||
@ -99,7 +97,7 @@ int main(int argc, char *argv[])
|
||||
else
|
||||
{
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setMultiRegionDeltaT.H"
|
||||
#include "setDeltaT.H"
|
||||
}
|
||||
|
||||
runTime++;
|
||||
@ -108,24 +106,23 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Store momentum to set rhoUf for introduced faces.
|
||||
autoPtr<volVectorField> rhoU;
|
||||
if (solvePrimaryRegion && rhoUf.valid())
|
||||
if (rhoUf.valid())
|
||||
{
|
||||
rhoU = new volVectorField("rhoU", rho*U);
|
||||
}
|
||||
|
||||
// Store the particle positions
|
||||
clouds.storeGlobalPositions();
|
||||
fvModels.preUpdateMesh();
|
||||
|
||||
// Do any mesh changes
|
||||
mesh.move();
|
||||
|
||||
if (solvePrimaryRegion && mesh.changing())
|
||||
if (mesh.changing())
|
||||
{
|
||||
MRF.update();
|
||||
|
||||
if (correctPhi)
|
||||
{
|
||||
#include "../../compressible/rhoPimpleFoam/correctPhi.H"
|
||||
#include "../../../compressible/rhoPimpleFoam/correctPhi.H"
|
||||
}
|
||||
|
||||
if (checkMeshCourantNo)
|
||||
@ -134,16 +131,13 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
clouds.evolve();
|
||||
surfaceFilm.evolve();
|
||||
|
||||
if (solvePrimaryRegion && !pimple.simpleRho())
|
||||
if (!pimple.simpleRho())
|
||||
{
|
||||
#include "rhoEqn.H"
|
||||
}
|
||||
|
||||
// --- PIMPLE loop
|
||||
while (solvePrimaryRegion && pimple.loop())
|
||||
while (pimple.loop())
|
||||
{
|
||||
fvModels.correct();
|
||||
|
||||
@ -154,7 +148,7 @@ int main(int argc, char *argv[])
|
||||
// --- Pressure corrector loop
|
||||
while (pimple.correct())
|
||||
{
|
||||
#include "pEqn.H"
|
||||
#include "../../../compressible/rhoPimpleFoam/pEqn.H"
|
||||
}
|
||||
|
||||
if (pimple.turbCorr())
|
||||
@ -25,7 +25,11 @@ Application
|
||||
reactingFoam
|
||||
|
||||
Description
|
||||
Solver for combustion with chemical reactions.
|
||||
Transient solver for turbulent flow of compressible reacting fluids with
|
||||
optional mesh motion and mesh topology changes.
|
||||
|
||||
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
|
||||
pseudo-transient simulations.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -104,14 +108,20 @@ int main(int argc, char *argv[])
|
||||
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
while (pimple.loop())
|
||||
{
|
||||
if (!pimple.flow())
|
||||
{
|
||||
if (pimple.models())
|
||||
{
|
||||
fvModels.correct();
|
||||
}
|
||||
|
||||
if (pimple.frozenFlow())
|
||||
if (pimple.thermophysics())
|
||||
{
|
||||
#include "YEqn.H"
|
||||
#include "EEqn.H"
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pimple.firstPimpleIter() || moveMeshOuterCorrectors)
|
||||
@ -123,6 +133,8 @@ int main(int argc, char *argv[])
|
||||
rhoU = new volVectorField("rhoU", rho*U);
|
||||
}
|
||||
|
||||
fvModels.preUpdateMesh();
|
||||
|
||||
// Do any mesh changes
|
||||
mesh.update();
|
||||
|
||||
@ -147,9 +159,18 @@ int main(int argc, char *argv[])
|
||||
#include "rhoEqn.H"
|
||||
}
|
||||
|
||||
if (pimple.models())
|
||||
{
|
||||
fvModels.correct();
|
||||
}
|
||||
|
||||
#include "UEqn.H"
|
||||
|
||||
if (pimple.thermophysics())
|
||||
{
|
||||
#include "YEqn.H"
|
||||
#include "EEqn.H"
|
||||
}
|
||||
|
||||
// --- Pressure corrector loop
|
||||
while (pimple.correct())
|
||||
|
||||
@ -116,6 +116,8 @@ int main(int argc, char *argv[])
|
||||
rhoU = new volVectorField("rhoU", rho*U);
|
||||
}
|
||||
|
||||
fvModels.preUpdateMesh();
|
||||
|
||||
// Do any mesh changes
|
||||
mesh.update();
|
||||
|
||||
|
||||
@ -107,6 +107,20 @@ int main(int argc, char *argv[])
|
||||
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
while (pimple.loop())
|
||||
{
|
||||
if (!pimple.flow())
|
||||
{
|
||||
if (pimple.models())
|
||||
{
|
||||
fvModels.correct();
|
||||
}
|
||||
|
||||
if (pimple.thermophysics())
|
||||
{
|
||||
#include "EEqn.H"
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pimple.firstPimpleIter() || moveMeshOuterCorrectors)
|
||||
{
|
||||
@ -117,6 +131,8 @@ int main(int argc, char *argv[])
|
||||
rhoU = new volVectorField("rhoU", rho*U);
|
||||
}
|
||||
|
||||
fvModels.preUpdateMesh();
|
||||
|
||||
// Do any mesh changes
|
||||
mesh.update();
|
||||
|
||||
@ -144,10 +160,17 @@ int main(int argc, char *argv[])
|
||||
#include "rhoEqn.H"
|
||||
}
|
||||
|
||||
if (pimple.models())
|
||||
{
|
||||
fvModels.correct();
|
||||
}
|
||||
|
||||
#include "UEqn.H"
|
||||
|
||||
if (pimple.thermophysics())
|
||||
{
|
||||
#include "EEqn.H"
|
||||
}
|
||||
|
||||
// --- Pressure corrector loop
|
||||
while (pimple.correct())
|
||||
@ -161,6 +184,7 @@ int main(int argc, char *argv[])
|
||||
thermophysicalTransport->correct();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rho = thermo.rho();
|
||||
|
||||
|
||||
@ -1,10 +1,16 @@
|
||||
if (pimple.frozenFlow())
|
||||
if (!pimple.flow())
|
||||
{
|
||||
if (pimple.models())
|
||||
{
|
||||
fvModels.correct();
|
||||
}
|
||||
|
||||
if (pimple.thermophysics())
|
||||
{
|
||||
#include "YEqn.H"
|
||||
#include "EEqn.H"
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!mesh.steady() && pimples.firstPimpleIter())
|
||||
@ -12,11 +18,18 @@ else
|
||||
#include "rhoEqn.H"
|
||||
}
|
||||
|
||||
if (pimple.models())
|
||||
{
|
||||
fvModels.correct();
|
||||
}
|
||||
|
||||
#include "UEqn.H"
|
||||
|
||||
if (pimple.thermophysics())
|
||||
{
|
||||
#include "YEqn.H"
|
||||
#include "EEqn.H"
|
||||
}
|
||||
|
||||
// --- PISO loop
|
||||
while (pimple.correct())
|
||||
|
||||
@ -93,6 +93,8 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
if (pimple.firstPimpleIter() || moveMeshOuterCorrectors)
|
||||
{
|
||||
fvModels.preUpdateMesh();
|
||||
|
||||
mesh.update();
|
||||
|
||||
if (mesh.changing())
|
||||
|
||||
@ -1,44 +0,0 @@
|
||||
{
|
||||
volScalarField& he = thermo.he();
|
||||
|
||||
fvScalarMatrix EEqn
|
||||
(
|
||||
fvm::ddt(rho, he)
|
||||
+ (
|
||||
mvConvection.valid()
|
||||
? mvConvection->fvmDiv(phi, he)
|
||||
: fvm::div(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
|
||||
)
|
||||
+ thermophysicalTransport->divq(he)
|
||||
==
|
||||
rho*(U&g)
|
||||
+ clouds.Sh(he)
|
||||
+ surfaceFilm.Sh()
|
||||
+ combustion->Qdot()
|
||||
+ fvModels.source(rho, he)
|
||||
);
|
||||
|
||||
EEqn.relax();
|
||||
|
||||
fvConstraints.constrain(EEqn);
|
||||
|
||||
EEqn.solve();
|
||||
|
||||
fvConstraints.constrain(he);
|
||||
|
||||
thermo.correct();
|
||||
|
||||
Info<< "T gas min/max = " << min(T).value() << ", "
|
||||
<< max(T).value() << endl;
|
||||
}
|
||||
@ -1,3 +0,0 @@
|
||||
reactingParticleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/reactingParticleFoam
|
||||
@ -1,47 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I. \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/fluidReactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/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/chemistryModel/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/parcel/lnInclude \
|
||||
-I$(LIB_SRC)/ODE/lnInclude \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lfvModels \
|
||||
-lfvConstraints \
|
||||
-lsampling \
|
||||
-lmeshTools \
|
||||
-ldynamicFvMesh \
|
||||
-lmomentumTransportModels \
|
||||
-lcompressibleMomentumTransportModels \
|
||||
-lthermophysicalTransportModels \
|
||||
-lfluidReactionThermophysicalTransportModels \
|
||||
-lspecie \
|
||||
-lfluidThermophysicalModels \
|
||||
-lreactionThermophysicalModels \
|
||||
-lchemistryModel \
|
||||
-lregionModels \
|
||||
-lsurfaceFilmModels \
|
||||
-lsurfaceFilmDerivedFvPatchFields \
|
||||
-llagrangian \
|
||||
-llagrangianParcel \
|
||||
-llagrangianParcelTurbulence \
|
||||
-lODE \
|
||||
-lcombustionModels
|
||||
@ -1,24 +0,0 @@
|
||||
MRF.correctBoundaryVelocity(U);
|
||||
|
||||
fvVectorMatrix UEqn
|
||||
(
|
||||
fvm::ddt(rho, U) + fvm::div(phi, U)
|
||||
+ MRF.DDt(rho, U)
|
||||
+ turbulence->divDevTau(U)
|
||||
==
|
||||
rho()*g
|
||||
+ clouds.SU(U)
|
||||
+ fvModels.source(rho, U)
|
||||
);
|
||||
|
||||
UEqn.relax();
|
||||
|
||||
fvConstraints.constrain(UEqn);
|
||||
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
|
||||
fvConstraints.constrain(U);
|
||||
K = 0.5*magSqr(U);
|
||||
}
|
||||
@ -1,49 +0,0 @@
|
||||
tmp<fv::convectionScheme<scalar>> mvConvection(nullptr);
|
||||
|
||||
if (Y.size())
|
||||
{
|
||||
mvConvection = tmp<fv::convectionScheme<scalar>>
|
||||
(
|
||||
fv::convectionScheme<scalar>::New
|
||||
(
|
||||
mesh,
|
||||
fields,
|
||||
phi,
|
||||
mesh.divScheme("div(phi,Yi_h)")
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
{
|
||||
combustion->correct();
|
||||
|
||||
forAll(Y, i)
|
||||
{
|
||||
if (composition.solve(i))
|
||||
{
|
||||
volScalarField& Yi = Y[i];
|
||||
|
||||
fvScalarMatrix YEqn
|
||||
(
|
||||
fvm::ddt(rho, Yi)
|
||||
+ mvConvection->fvmDiv(phi, Yi)
|
||||
+ thermophysicalTransport->divj(Yi)
|
||||
==
|
||||
clouds.SYi(i, Yi)
|
||||
+ fvModels.source(rho, Yi)
|
||||
+ combustion->R(Yi)
|
||||
+ surfaceFilm.Srho(i)
|
||||
);
|
||||
|
||||
YEqn.relax();
|
||||
|
||||
fvConstraints.constrain(YEqn);
|
||||
|
||||
YEqn.solve("Yi");
|
||||
|
||||
fvConstraints.constrain(Yi);
|
||||
}
|
||||
}
|
||||
|
||||
composition.normalise();
|
||||
}
|
||||
@ -1,3 +0,0 @@
|
||||
buoyantReactingParticleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/buoyantReactingParticleFoam
|
||||
@ -1,48 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I. \
|
||||
-I.. \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/fluidReactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/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/chemistryModel/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/parcel/lnInclude \
|
||||
-I$(LIB_SRC)/ODE/lnInclude \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lfvModels \
|
||||
-lfvConstraints \
|
||||
-lsampling \
|
||||
-lmeshTools \
|
||||
-ldynamicFvMesh \
|
||||
-lmomentumTransportModels \
|
||||
-lcompressibleMomentumTransportModels \
|
||||
-lthermophysicalTransportModels \
|
||||
-lfluidReactionThermophysicalTransportModels \
|
||||
-lspecie \
|
||||
-lfluidThermophysicalModels \
|
||||
-lreactionThermophysicalModels \
|
||||
-lchemistryModel \
|
||||
-lregionModels \
|
||||
-lsurfaceFilmModels \
|
||||
-lsurfaceFilmDerivedFvPatchFields \
|
||||
-llagrangian \
|
||||
-llagrangianParcel \
|
||||
-llagrangianParcelTurbulence \
|
||||
-lODE \
|
||||
-lcombustionModels
|
||||
@ -1,34 +0,0 @@
|
||||
MRF.correctBoundaryVelocity(U);
|
||||
|
||||
fvVectorMatrix UEqn
|
||||
(
|
||||
fvm::ddt(rho, U) + fvm::div(phi, U)
|
||||
+ MRF.DDt(rho, U)
|
||||
+ turbulence->divDevTau(U)
|
||||
==
|
||||
clouds.SU(U)
|
||||
+ fvModels.source(rho, U)
|
||||
);
|
||||
|
||||
UEqn.relax();
|
||||
|
||||
fvConstraints.constrain(UEqn);
|
||||
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
solve
|
||||
(
|
||||
UEqn
|
||||
==
|
||||
fvc::reconstruct
|
||||
(
|
||||
(
|
||||
- ghf*fvc::snGrad(rho)
|
||||
- fvc::snGrad(p_rgh)
|
||||
)*mesh.magSf()
|
||||
)
|
||||
);
|
||||
|
||||
fvConstraints.constrain(U);
|
||||
K = 0.5*magSqr(U);
|
||||
}
|
||||
@ -1,183 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
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
|
||||
buoyantReactingParticleFoam
|
||||
|
||||
Description
|
||||
Transient solver for buoyant, compressible, turbulent flow with a particle
|
||||
cloud and surface film modelling.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "fluidReactionThermophysicalTransportModel.H"
|
||||
#include "parcelCloudList.H"
|
||||
#include "surfaceFilmModel.H"
|
||||
#include "combustionModel.H"
|
||||
#include "fvModels.H"
|
||||
#include "fvConstraints.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "pressureReference.H"
|
||||
#include "CorrectPhi.H"
|
||||
#include "localEulerDdtScheme.H"
|
||||
#include "fvcSmooth.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "createTime.H"
|
||||
#include "createDynamicFvMesh.H"
|
||||
#include "createDyMControls.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "createFields.H"
|
||||
#include "createFieldRefs.H"
|
||||
#include "createRhoUfIfPresent.H"
|
||||
|
||||
turbulence->validate();
|
||||
|
||||
if (!LTS)
|
||||
{
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (pimple.run(runTime))
|
||||
{
|
||||
#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 (solvePrimaryRegion && correctPhi)
|
||||
{
|
||||
divrhoU = 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 (solvePrimaryRegion && rhoUf.valid())
|
||||
{
|
||||
rhoU = new volVectorField("rhoU", rho*U);
|
||||
}
|
||||
|
||||
// Store the particle positions
|
||||
clouds.storeGlobalPositions();
|
||||
|
||||
// Do any mesh changes
|
||||
mesh.update();
|
||||
|
||||
if (solvePrimaryRegion && mesh.changing())
|
||||
{
|
||||
gh = (g & mesh.C()) - ghRef;
|
||||
ghf = (g & mesh.Cf()) - ghRef;
|
||||
|
||||
|
||||
MRF.update();
|
||||
|
||||
if (correctPhi)
|
||||
{
|
||||
#include "../../compressible/rhoPimpleFoam/correctPhi.H"
|
||||
}
|
||||
|
||||
if (checkMeshCourantNo)
|
||||
{
|
||||
#include "meshCourantNo.H"
|
||||
}
|
||||
}
|
||||
|
||||
clouds.evolve();
|
||||
surfaceFilm.evolve();
|
||||
|
||||
if (solvePrimaryRegion && !pimple.simpleRho())
|
||||
{
|
||||
#include "rhoEqn.H"
|
||||
}
|
||||
|
||||
// --- PIMPLE loop
|
||||
while (solvePrimaryRegion && pimple.loop())
|
||||
{
|
||||
fvModels.correct();
|
||||
|
||||
#include "UEqn.H"
|
||||
#include "YEqn.H"
|
||||
#include "EEqn.H"
|
||||
|
||||
// --- Pressure corrector loop
|
||||
while (pimple.correct())
|
||||
{
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
if (pimple.turbCorr())
|
||||
{
|
||||
turbulence->correct();
|
||||
thermophysicalTransport->correct();
|
||||
}
|
||||
}
|
||||
|
||||
rho = thermo.rho();
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,129 +0,0 @@
|
||||
#include "createRDeltaT.H"
|
||||
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
autoPtr<fluidReactionThermo> pThermo(fluidReactionThermo::New(mesh));
|
||||
fluidReactionThermo& thermo = pThermo();
|
||||
thermo.validate(args.executable(), "h", "e");
|
||||
|
||||
basicSpecieMixture& composition = thermo.composition();
|
||||
PtrList<volScalarField>& Y = composition.Y();
|
||||
|
||||
Info<< "Creating field rho\n" << endl;
|
||||
volScalarField rho
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rho",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
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::momentumTransportModel> turbulence
|
||||
(
|
||||
compressible::momentumTransportModel::New
|
||||
(
|
||||
rho,
|
||||
U,
|
||||
phi,
|
||||
thermo
|
||||
)
|
||||
);
|
||||
|
||||
Info<< "Creating thermophysical transport model\n" << endl;
|
||||
autoPtr<fluidReactionThermophysicalTransportModel>
|
||||
thermophysicalTransport
|
||||
(
|
||||
fluidReactionThermophysicalTransportModel::New
|
||||
(
|
||||
turbulence(),
|
||||
thermo
|
||||
)
|
||||
);
|
||||
|
||||
Info<< "Creating combustion model\n" << endl;
|
||||
autoPtr<combustionModel> combustion
|
||||
(
|
||||
combustionModel::New(thermo, turbulence())
|
||||
);
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dpdt",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(p.dimensions()/dimTime, 0)
|
||||
);
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
|
||||
#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;
|
||||
|
||||
pressureReference pressureReference
|
||||
(
|
||||
p,
|
||||
p_rgh,
|
||||
pimple.dict(),
|
||||
thermo.incompressible()
|
||||
);
|
||||
|
||||
mesh.setFluxRequired(p_rgh.name());
|
||||
|
||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||
|
||||
forAll(Y, i)
|
||||
{
|
||||
fields.add(Y[i]);
|
||||
}
|
||||
fields.add(thermo.he());
|
||||
|
||||
#include "createMRF.H"
|
||||
#include "createClouds.H"
|
||||
#include "createSurfaceFilmModel.H"
|
||||
#include "createFvModels.H"
|
||||
#include "createFvConstraints.H"
|
||||
#include "checkRadiationModel.H"
|
||||
@ -1,101 +0,0 @@
|
||||
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::interpolate(rho)*fvc::flux(HbyA)
|
||||
+ MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi))
|
||||
)
|
||||
+ phig
|
||||
);
|
||||
|
||||
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)
|
||||
==
|
||||
clouds.Srho()
|
||||
+ surfaceFilm.Srho()
|
||||
+ fvModels.source(psi, p_rgh, rho.name())
|
||||
);
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix p_rghEqn
|
||||
(
|
||||
p_rghDDtEqn
|
||||
- fvm::laplacian(rhorAUf, p_rgh)
|
||||
);
|
||||
|
||||
p_rghEqn.solve();
|
||||
|
||||
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();
|
||||
fvConstraints.constrain(U);
|
||||
K = 0.5*magSqr(U);
|
||||
}
|
||||
}
|
||||
|
||||
p = p_rgh + rho*gh;
|
||||
|
||||
bool constrained = fvConstraints.constrain(p);
|
||||
|
||||
if (constrained)
|
||||
{
|
||||
p_rgh = p - rho*gh;
|
||||
}
|
||||
|
||||
// Thermodynamic density update
|
||||
thermo.correctRho(psi*p - psip0);
|
||||
|
||||
if (constrained)
|
||||
{
|
||||
rho = thermo.rho();
|
||||
}
|
||||
|
||||
#include "rhoEqn.H"
|
||||
#include "compressibleContinuityErrs.H"
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -1,2 +0,0 @@
|
||||
Info<< "\nConstructing clouds" << endl;
|
||||
parcelCloudList clouds(rho, U, g, thermo);
|
||||
@ -1,8 +0,0 @@
|
||||
const volScalarField& T = thermo.T();
|
||||
const volScalarField& psi = thermo.psi();
|
||||
regionModels::surfaceFilmModel& surfaceFilm = tsurfaceFilm();
|
||||
|
||||
Switch solvePrimaryRegion
|
||||
(
|
||||
pimple.dict().lookupOrDefault<Switch>("solvePrimaryRegion", true)
|
||||
);
|
||||
@ -1,110 +0,0 @@
|
||||
#include "createRDeltaT.H"
|
||||
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
autoPtr<fluidReactionThermo> pThermo(fluidReactionThermo::New(mesh));
|
||||
fluidReactionThermo& thermo = pThermo();
|
||||
thermo.validate(args.executable(), "h", "e");
|
||||
|
||||
basicSpecieMixture& composition = thermo.composition();
|
||||
PtrList<volScalarField>& Y = composition.Y();
|
||||
|
||||
Info<< "Creating field rho\n" << endl;
|
||||
volScalarField rho
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rho",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
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::momentumTransportModel> turbulence
|
||||
(
|
||||
compressible::momentumTransportModel::New
|
||||
(
|
||||
rho,
|
||||
U,
|
||||
phi,
|
||||
thermo
|
||||
)
|
||||
);
|
||||
|
||||
Info<< "Creating thermophysical transport model\n" << endl;
|
||||
autoPtr<fluidReactionThermophysicalTransportModel>
|
||||
thermophysicalTransport
|
||||
(
|
||||
fluidReactionThermophysicalTransportModel::New
|
||||
(
|
||||
turbulence(),
|
||||
thermo
|
||||
)
|
||||
);
|
||||
|
||||
Info<< "Creating combustion model\n" << endl;
|
||||
autoPtr<combustionModel> combustion
|
||||
(
|
||||
combustionModel::New(thermo, turbulence())
|
||||
);
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dpdt",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(p.dimensions()/dimTime, 0)
|
||||
);
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
|
||||
#include "readGravitationalAcceleration.H"
|
||||
|
||||
pressureReference pressureReference
|
||||
(
|
||||
p,
|
||||
pimple.dict(),
|
||||
thermo.incompressible()
|
||||
);
|
||||
|
||||
mesh.setFluxRequired(p.name());
|
||||
|
||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||
|
||||
forAll(Y, i)
|
||||
{
|
||||
fields.add(Y[i]);
|
||||
}
|
||||
fields.add(thermo.he());
|
||||
|
||||
#include "createMRF.H"
|
||||
#include "createClouds.H"
|
||||
#include "createSurfaceFilmModel.H"
|
||||
#include "createFvModels.H"
|
||||
#include "createFvConstraints.H"
|
||||
#include "checkRadiationModel.H"
|
||||
@ -1,6 +0,0 @@
|
||||
Info<< "\nConstructing surface film model" << endl;
|
||||
|
||||
autoPtr<regionModels::surfaceFilmModel> tsurfaceFilm
|
||||
(
|
||||
regionModels::surfaceFilmModel::New(mesh, g)
|
||||
);
|
||||
@ -1,90 +0,0 @@
|
||||
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 phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(
|
||||
fvc::interpolate(rho)*fvc::flux(HbyA)
|
||||
+ MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi, rhoUf))
|
||||
)
|
||||
);
|
||||
|
||||
fvc::makeRelative(phiHbyA, rho, U);
|
||||
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
// Update the pressure BCs to ensure flux consistency
|
||||
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
|
||||
|
||||
fvScalarMatrix pDDtEqn
|
||||
(
|
||||
fvc::ddt(rho) + psi*correction(fvm::ddt(p))
|
||||
+ fvc::div(phiHbyA)
|
||||
==
|
||||
clouds.Srho()
|
||||
+ surfaceFilm.Srho()
|
||||
+ fvModels.source(psi, p, rho.name())
|
||||
);
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
pDDtEqn
|
||||
- fvm::laplacian(rhorAUf, p)
|
||||
);
|
||||
|
||||
pEqn.solve();
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi = phiHbyA + pEqn.flux();
|
||||
}
|
||||
}
|
||||
|
||||
p.relax();
|
||||
|
||||
U = HbyA - rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
fvConstraints.constrain(U);
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
bool constrained = fvConstraints.constrain(p);
|
||||
|
||||
// Thermodynamic density update
|
||||
thermo.correctRho(psi*p - psip0);
|
||||
|
||||
if (constrained)
|
||||
{
|
||||
rho = thermo.rho();
|
||||
}
|
||||
|
||||
#include "rhoEqn.H"
|
||||
#include "compressibleContinuityErrs.H"
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -1,179 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
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
|
||||
reactingParticleFoam
|
||||
|
||||
Description
|
||||
Transient solver for compressible, turbulent flow with a particle cloud
|
||||
and surface film modelling.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "fluidReactionThermophysicalTransportModel.H"
|
||||
#include "parcelCloudList.H"
|
||||
#include "surfaceFilmModel.H"
|
||||
#include "combustionModel.H"
|
||||
#include "fvModels.H"
|
||||
#include "fvConstraints.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "pressureReference.H"
|
||||
#include "CorrectPhi.H"
|
||||
#include "localEulerDdtScheme.H"
|
||||
#include "fvcSmooth.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "createTime.H"
|
||||
#include "createDynamicFvMesh.H"
|
||||
#include "createDyMControls.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "createFields.H"
|
||||
#include "createFieldRefs.H"
|
||||
#include "createRhoUfIfPresent.H"
|
||||
|
||||
turbulence->validate();
|
||||
|
||||
if (!LTS)
|
||||
{
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (pimple.run(runTime))
|
||||
{
|
||||
#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 (solvePrimaryRegion && correctPhi)
|
||||
{
|
||||
divrhoU = 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 (solvePrimaryRegion && rhoUf.valid())
|
||||
{
|
||||
rhoU = new volVectorField("rhoU", rho*U);
|
||||
}
|
||||
|
||||
// Store the particle positions
|
||||
clouds.storeGlobalPositions();
|
||||
|
||||
// Do any mesh changes
|
||||
mesh.update();
|
||||
|
||||
if (solvePrimaryRegion && mesh.changing())
|
||||
{
|
||||
MRF.update();
|
||||
|
||||
if (correctPhi)
|
||||
{
|
||||
#include "../../compressible/rhoPimpleFoam/correctPhi.H"
|
||||
}
|
||||
|
||||
if (checkMeshCourantNo)
|
||||
{
|
||||
#include "meshCourantNo.H"
|
||||
}
|
||||
}
|
||||
|
||||
clouds.evolve();
|
||||
surfaceFilm.evolve();
|
||||
|
||||
if (solvePrimaryRegion && !pimple.simpleRho())
|
||||
{
|
||||
#include "rhoEqn.H"
|
||||
}
|
||||
|
||||
// --- PIMPLE loop
|
||||
while (solvePrimaryRegion && pimple.loop())
|
||||
{
|
||||
fvModels.correct();
|
||||
|
||||
#include "UEqn.H"
|
||||
#include "YEqn.H"
|
||||
#include "EEqn.H"
|
||||
|
||||
// --- Pressure corrector loop
|
||||
while (pimple.correct())
|
||||
{
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
if (pimple.turbCorr())
|
||||
{
|
||||
turbulence->correct();
|
||||
thermophysicalTransport->correct();
|
||||
}
|
||||
}
|
||||
|
||||
rho = thermo.rho();
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,48 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
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)
|
||||
==
|
||||
clouds.Srho(rho)
|
||||
+ surfaceFilm.Srho()
|
||||
+ fvModels.source(rho)
|
||||
);
|
||||
|
||||
rhoEqn.solve();
|
||||
|
||||
fvConstraints.constrain(rho);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,53 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
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;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,134 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
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.lookup<scalar>("maxCo"));
|
||||
|
||||
// Maximum time scale
|
||||
scalar maxDeltaT(pimpleDict.lookupOrDefault<scalar>("maxDeltaT", great));
|
||||
|
||||
// Smoothing parameter (0-1) when smoothing iterations > 0
|
||||
scalar rDeltaTSmoothingCoeff
|
||||
(
|
||||
pimpleDict.lookupOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.1)
|
||||
);
|
||||
|
||||
// Damping coefficient (1-0)
|
||||
scalar rDeltaTDampingCoeff
|
||||
(
|
||||
pimpleDict.lookupOrDefault<scalar>("rDeltaTDampingCoeff", 0.2)
|
||||
);
|
||||
|
||||
// Maximum change in cell temperature per iteration
|
||||
// (relative to previous value)
|
||||
scalar alphaTemp(pimpleDict.lookupOrDefault("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
|
||||
(
|
||||
clouds.hsTrans()/(mesh.V()*runTime.deltaT())
|
||||
+ combustion->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;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,31 +0,0 @@
|
||||
{
|
||||
volScalarField& he = thermo.he();
|
||||
|
||||
fvScalarMatrix EEqn
|
||||
(
|
||||
mvConvection->fvmDiv(phi, he)
|
||||
+ (
|
||||
he.name() == "e"
|
||||
? fvc::div(phi, volScalarField("Ekp", 0.5*magSqr(U) + p/rho))
|
||||
: fvc::div(phi, volScalarField("K", 0.5*magSqr(U)))
|
||||
)
|
||||
+ thermophysicalTransport->divq(he)
|
||||
==
|
||||
rho*(U&g)
|
||||
+ clouds.Sh(he)
|
||||
+ combustion->Qdot()
|
||||
+ fvModels.source(rho, he)
|
||||
);
|
||||
|
||||
EEqn.relax();
|
||||
|
||||
fvConstraints.constrain(EEqn);
|
||||
|
||||
EEqn.solve();
|
||||
|
||||
fvConstraints.constrain(he);
|
||||
thermo.correct();
|
||||
|
||||
Info<< "T gas min/max = " << min(T).value() << ", "
|
||||
<< max(T).value() << endl;
|
||||
}
|
||||
@ -1,3 +0,0 @@
|
||||
simpleReactingParticleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/simpleReactingParticleFoam
|
||||
@ -1,46 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I. \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/fluidReactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/parcel/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/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/chemistryModel/lnInclude \
|
||||
-I$(LIB_SRC)/ODE/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lmomentumTransportModels \
|
||||
-lcompressibleMomentumTransportModels \
|
||||
-lthermophysicalTransportModels \
|
||||
-lfluidReactionThermophysicalTransportModels \
|
||||
-llagrangian \
|
||||
-llagrangianParcel \
|
||||
-llagrangianParcelTurbulence \
|
||||
-lspecie \
|
||||
-lfluidThermophysicalModels \
|
||||
-lthermophysicalProperties \
|
||||
-lreactionThermophysicalModels \
|
||||
-lchemistryModel \
|
||||
-lODE \
|
||||
-lregionModels \
|
||||
-lsurfaceFilmModels \
|
||||
-lcombustionModels \
|
||||
-lfvModels \
|
||||
-lfvConstraints \
|
||||
-lsampling
|
||||
@ -1,21 +0,0 @@
|
||||
MRF.correctBoundaryVelocity(U);
|
||||
|
||||
tmp<fvVectorMatrix> tUEqn
|
||||
(
|
||||
fvm::div(phi, U)
|
||||
+ MRF.DDt(rho, U)
|
||||
+ turbulence->divDevTau(U)
|
||||
==
|
||||
rho()*g
|
||||
+ clouds.SU(U)
|
||||
+ fvModels.source(rho, U)
|
||||
);
|
||||
fvVectorMatrix& UEqn = tUEqn.ref();
|
||||
|
||||
UEqn.relax();
|
||||
|
||||
fvConstraints.constrain(UEqn);
|
||||
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
|
||||
fvConstraints.constrain(U);
|
||||
@ -1,42 +0,0 @@
|
||||
tmp<fv::convectionScheme<scalar>> mvConvection
|
||||
(
|
||||
fv::convectionScheme<scalar>::New
|
||||
(
|
||||
mesh,
|
||||
fields,
|
||||
phi,
|
||||
mesh.divScheme("div(phi,Yi_h)")
|
||||
)
|
||||
);
|
||||
|
||||
{
|
||||
combustion->correct();
|
||||
|
||||
forAll(Y, i)
|
||||
{
|
||||
if (composition.solve(i))
|
||||
{
|
||||
volScalarField& Yi = Y[i];
|
||||
|
||||
fvScalarMatrix YEqn
|
||||
(
|
||||
mvConvection->fvmDiv(phi, Yi)
|
||||
+ thermophysicalTransport->divj(Yi)
|
||||
==
|
||||
clouds.SYi(i, Yi)
|
||||
+ combustion->R(Yi)
|
||||
+ fvModels.source(rho, Yi)
|
||||
);
|
||||
|
||||
YEqn.relax();
|
||||
|
||||
fvConstraints.constrain(YEqn);
|
||||
|
||||
YEqn.solve("Yi");
|
||||
|
||||
fvConstraints.constrain(Yi);
|
||||
}
|
||||
}
|
||||
|
||||
composition.normalise();
|
||||
}
|
||||
@ -1,2 +0,0 @@
|
||||
Info<< "\nConstructing clouds" << endl;
|
||||
parcelCloudList clouds(rho, U, g, thermo);
|
||||
@ -1,2 +0,0 @@
|
||||
const volScalarField& psi = thermo.psi();
|
||||
const volScalarField& T = thermo.T();
|
||||
@ -1,106 +0,0 @@
|
||||
#include "readGravitationalAcceleration.H"
|
||||
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
autoPtr<fluidReactionThermo> pThermo(fluidReactionThermo::New(mesh));
|
||||
fluidReactionThermo& thermo = pThermo();
|
||||
thermo.validate(args.executable(), "h", "e");
|
||||
|
||||
basicSpecieMixture& composition = thermo.composition();
|
||||
PtrList<volScalarField>& Y = composition.Y();
|
||||
|
||||
volScalarField& p = thermo.p();
|
||||
|
||||
volScalarField rho
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rho",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
thermo.rho()
|
||||
);
|
||||
|
||||
Info<< "\nReading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
#include "compressibleCreatePhi.H"
|
||||
|
||||
mesh.setFluxRequired(p.name());
|
||||
|
||||
dimensionedScalar rhoMax
|
||||
(
|
||||
dimensionedScalar::lookupOrDefault
|
||||
(
|
||||
"rhoMax",
|
||||
simple.dict(),
|
||||
dimDensity,
|
||||
great
|
||||
)
|
||||
);
|
||||
|
||||
dimensionedScalar rhoMin
|
||||
(
|
||||
dimensionedScalar::lookupOrDefault
|
||||
(
|
||||
"rhoMin",
|
||||
simple.dict(),
|
||||
dimDensity,
|
||||
0
|
||||
)
|
||||
);
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
autoPtr<compressible::momentumTransportModel> turbulence
|
||||
(
|
||||
compressible::momentumTransportModel::New
|
||||
(
|
||||
rho,
|
||||
U,
|
||||
phi,
|
||||
thermo
|
||||
)
|
||||
);
|
||||
|
||||
Info<< "Creating thermophysical transport model\n" << endl;
|
||||
autoPtr<fluidReactionThermophysicalTransportModel>
|
||||
thermophysicalTransport
|
||||
(
|
||||
fluidReactionThermophysicalTransportModel::New
|
||||
(
|
||||
turbulence(),
|
||||
thermo
|
||||
)
|
||||
);
|
||||
|
||||
Info<< "Creating combustion model\n" << endl;
|
||||
autoPtr<combustionModel> combustion
|
||||
(
|
||||
combustionModel::New(thermo, turbulence())
|
||||
);
|
||||
|
||||
Info<< "Creating multi-variate interpolation scheme\n" << endl;
|
||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||
|
||||
forAll(Y, i)
|
||||
{
|
||||
fields.add(Y[i]);
|
||||
}
|
||||
fields.add(thermo.he());
|
||||
|
||||
#include "createMRF.H"
|
||||
#include "createClouds.H"
|
||||
#include "createFvModels.H"
|
||||
#include "createFvConstraints.H"
|
||||
#include "checkRadiationModel.H"
|
||||
@ -1,55 +0,0 @@
|
||||
// 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));
|
||||
tUEqn.clear();
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
fvc::interpolate(rho)*fvc::flux(HbyA)
|
||||
);
|
||||
|
||||
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
// Update the pressure BCs to ensure flux consistency
|
||||
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
|
||||
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvc::div(phiHbyA)
|
||||
- fvm::laplacian(rhorAUf, p)
|
||||
==
|
||||
clouds.Srho()
|
||||
+ fvModels.source(psi, p, rho.name())
|
||||
);
|
||||
|
||||
pEqn.solve();
|
||||
|
||||
if (simple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi = phiHbyA + pEqn.flux();
|
||||
}
|
||||
}
|
||||
|
||||
p.relax();
|
||||
|
||||
// Thermodynamic density update
|
||||
thermo.correctRho(psi*p - psip0);
|
||||
|
||||
#include "compressibleContinuityErrs.H"
|
||||
|
||||
U = HbyA - rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
fvConstraints.constrain(U);
|
||||
|
||||
rho = thermo.rho();
|
||||
rho = max(rho, rhoMin);
|
||||
rho = min(rho, rhoMax);
|
||||
rho.relax();
|
||||
|
||||
Info<< "p min/max = " << min(p).value() << ", " << max(p).value() << endl;
|
||||
@ -1,96 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
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
|
||||
simpleReactingParticleFoam
|
||||
|
||||
Description
|
||||
Steady state solver for compressible, turbulent flow with reacting,
|
||||
multiphase particle clouds and optional sources/constraints.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "fluidReactionThermophysicalTransportModel.H"
|
||||
#include "parcelCloudList.H"
|
||||
#include "fluidReactionThermo.H"
|
||||
#include "combustionModel.H"
|
||||
#include "IOporosityModelList.H"
|
||||
#include "fvModels.H"
|
||||
#include "fvConstraints.H"
|
||||
#include "simpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
#include "createFields.H"
|
||||
#include "createFieldRefs.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
turbulence->validate();
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (simple.loop(runTime))
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
clouds.evolve();
|
||||
|
||||
fvModels.correct();
|
||||
|
||||
// --- Pressure-velocity SIMPLE corrector loop
|
||||
{
|
||||
#include "UEqn.H"
|
||||
#include "YEqn.H"
|
||||
#include "EEqn.H"
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
turbulence->correct();
|
||||
thermophysicalTransport->correct();
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -18,6 +18,5 @@ LIB_LIBS = \
|
||||
-linterfaceProperties \
|
||||
-ltransportModels \
|
||||
-lsurfaceFilmModels \
|
||||
-lsurfaceFilmDerivedFvPatchFields \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools
|
||||
|
||||
@ -115,6 +115,8 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
}
|
||||
|
||||
fvModels.preUpdateMesh();
|
||||
|
||||
mesh.update();
|
||||
|
||||
if (mesh.changing())
|
||||
|
||||
@ -120,6 +120,8 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
}
|
||||
|
||||
fvModels.preUpdateMesh();
|
||||
|
||||
mesh.update();
|
||||
|
||||
if (mesh.changing())
|
||||
|
||||
@ -97,6 +97,8 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
if (pimple.firstPimpleIter() || moveMeshOuterCorrectors)
|
||||
{
|
||||
fvModels.preUpdateMesh();
|
||||
|
||||
mesh.update();
|
||||
|
||||
if (mesh.changing())
|
||||
|
||||
@ -105,10 +105,15 @@ int main(int argc, char *argv[])
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
while (pimple.loop())
|
||||
{
|
||||
if (pimple.frozenFlow())
|
||||
if (!pimple.flow())
|
||||
{
|
||||
if (pimple.models())
|
||||
{
|
||||
fvModels.correct();
|
||||
}
|
||||
|
||||
if (pimple.thermophysics())
|
||||
{
|
||||
fluid.solve(rAUs, rAUfs);
|
||||
fluid.correct();
|
||||
fluid.correctContinuityError();
|
||||
@ -122,6 +127,7 @@ int main(int argc, char *argv[])
|
||||
phases[phasei].divU(-pEqnComps[phasei] & p_rgh);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pimple.firstPimpleIter() || moveMeshOuterCorrectors)
|
||||
@ -147,6 +153,8 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
}
|
||||
|
||||
fvModels.preUpdateMesh();
|
||||
|
||||
mesh.update();
|
||||
|
||||
if (mesh.changing())
|
||||
@ -174,24 +182,40 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if (pimple.models())
|
||||
{
|
||||
fvModels.correct();
|
||||
}
|
||||
|
||||
fluid.solve(rAUs, rAUfs);
|
||||
fluid.correct();
|
||||
fluid.correctContinuityError();
|
||||
|
||||
if (pimple.thermophysics())
|
||||
{
|
||||
#include "YEqns.H"
|
||||
}
|
||||
|
||||
if (faceMomentum)
|
||||
{
|
||||
#include "pUf/UEqns.H"
|
||||
|
||||
if (pimple.thermophysics())
|
||||
{
|
||||
#include "EEqns.H"
|
||||
}
|
||||
|
||||
#include "pUf/pEqn.H"
|
||||
}
|
||||
else
|
||||
{
|
||||
#include "pU/UEqns.H"
|
||||
|
||||
if (pimple.thermophysics())
|
||||
{
|
||||
#include "EEqns.H"
|
||||
}
|
||||
|
||||
#include "pU/pEqn.H"
|
||||
}
|
||||
|
||||
|
||||
@ -87,6 +87,8 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime();
|
||||
|
||||
fvModels.preUpdateMesh();
|
||||
|
||||
mesh.update();
|
||||
|
||||
if (mesh.changing())
|
||||
|
||||
@ -102,6 +102,8 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime();
|
||||
|
||||
fvModels.preUpdateMesh();
|
||||
|
||||
mesh.update();
|
||||
|
||||
if (mesh.changing())
|
||||
|
||||
66
bin/buoyantReactingParticleFoam
Executable file
66
bin/buoyantReactingParticleFoam
Executable file
@ -0,0 +1,66 @@
|
||||
#!/bin/sh
|
||||
#------------------------------------------------------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration | Website: https://openfoam.org
|
||||
# \\ / A nd | Copyright (C) 2021 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# 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/>.
|
||||
#
|
||||
# Script
|
||||
# buoyantReactingParticleFoam
|
||||
#
|
||||
# Description
|
||||
# Script to inform the user that buoyantReactingParticleFoam has been
|
||||
# replaced by the more general buoyantReactingFoam solver.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cat << EOF
|
||||
|
||||
The buoyantReactingParticleFoam solver has solver has been replaced by the more
|
||||
general buoyantReactingFoam solver, which supports buoyant compressible reacting
|
||||
flow coupled to multiple run-time-selectable lagrangian clouds and surface film
|
||||
modelling.
|
||||
|
||||
To run a buoyantReactingParticleFoam case in buoyantReactingFoam add the following entry
|
||||
constant/fvModels:
|
||||
|
||||
clouds
|
||||
{
|
||||
type clouds;
|
||||
libs ("liblagrangianParcel.so");
|
||||
}
|
||||
|
||||
to add support for Lagrangian clouds and/or
|
||||
|
||||
surfaceFilm
|
||||
{
|
||||
type surfaceFilm;
|
||||
libs ("libsurfaceFilmModels.so");
|
||||
}
|
||||
|
||||
to add support for surface film.
|
||||
|
||||
See the following cases for examples converted from buoyantReactingParticleFoam:
|
||||
|
||||
\$FOAM_TUTORIALS/combustion/buoyantReactingFoam/Lagrangian
|
||||
|
||||
EOF
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration | Website: https://openfoam.org
|
||||
# \\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
|
||||
# \\ / A nd | Copyright (C) 2020-2021 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -27,14 +27,14 @@
|
||||
#
|
||||
# Description
|
||||
# Script to inform the user that coalChemistryFoam has been replaced by the
|
||||
# more general reactingParticleFoam solver.
|
||||
# more general reactingFoam solver.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cat << EOF
|
||||
|
||||
The coalChemistryFoam solver has solver has been replaced by the more general
|
||||
reactingParticleFoam solver, which supports compressible reacting flow coupled
|
||||
reactingFoam solver, which supports compressible reacting flow coupled
|
||||
to multiple run-time-selectable lagrangian clouds and surface film modelling.
|
||||
|
||||
To run with a single cloud rename the constant/*CloudProperties file to
|
||||
@ -50,7 +50,7 @@ collidingCloud, etc ...).
|
||||
|
||||
See the following case for an example converted from coalChemistryFoam:
|
||||
|
||||
\$FOAM_TUTORIALS/lagrangian/reactingParticleFoam/simplifiedSiwek
|
||||
\$FOAM_TUTORIALS/lagrangian/reactingFoam/simplifiedSiwek
|
||||
|
||||
EOF
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration | Website: https://openfoam.org
|
||||
# \\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
|
||||
# \\ / A nd | Copyright (C) 2020-2021 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -27,17 +27,34 @@
|
||||
#
|
||||
# Description
|
||||
# Script to inform the user that reactingParcelFoam has been replaced by the
|
||||
# more general buoyantReactingParticleFoam solver.
|
||||
# more general buoyantReactingFoam solver.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cat << EOF
|
||||
|
||||
The reactingParcelFoam solver has solver has been replaced by the more general
|
||||
buoyantReactingParticleFoam solver, which supports buoyant compressible
|
||||
buoyantReactingFoam solver, which supports buoyant compressible
|
||||
reacting flow coupled to multiple run-time-selectable lagrangian clouds and
|
||||
surface film modelling.
|
||||
|
||||
To run a reactingParcelFoam case in reactingFoam add the following entries in
|
||||
constant/fvModels:
|
||||
|
||||
buoyancyForce
|
||||
{
|
||||
type buoyancyForce;
|
||||
}
|
||||
|
||||
clouds
|
||||
{
|
||||
type clouds;
|
||||
libs ("liblagrangianParcel.so");
|
||||
}
|
||||
|
||||
which add the acceleration due to gravity needed by Lagrangian clouds and the
|
||||
clouds themselves.
|
||||
|
||||
To run with a single cloud rename the constant/*CloudProperties file to
|
||||
constant/cloudProperties.
|
||||
|
||||
@ -49,9 +66,9 @@ In addition, cloud properties files also now require a "type" entry to specify
|
||||
the type of cloud model used (e.g., thermoCloud, reactingMultiphaseCloud,
|
||||
collidingCloud, etc ...).
|
||||
|
||||
See the following case for an example converted from reactingParcelFoam:
|
||||
See the following cases for examples converted from reactingParcelFoam:
|
||||
|
||||
\$FOAM_TUTORIALS/lagrangian/buoyantReactingParticleFoam/splashPanel
|
||||
\$FOAM_TUTORIALS/combustion/buoyantReactingFoam/Lagrangian
|
||||
|
||||
EOF
|
||||
|
||||
|
||||
64
bin/reactingParticleFoam
Executable file
64
bin/reactingParticleFoam
Executable file
@ -0,0 +1,64 @@
|
||||
#!/bin/sh
|
||||
#------------------------------------------------------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration | Website: https://openfoam.org
|
||||
# \\ / A nd | Copyright (C) 2021 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# 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/>.
|
||||
#
|
||||
# Script
|
||||
# reactingParticleFoam
|
||||
#
|
||||
# Description
|
||||
# Script to inform the user that reactingParticleFoam has been replaced
|
||||
# by the more general reactingFoam solver.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cat << EOF
|
||||
|
||||
The reactingParticleFoam solver has solver has been replaced by the more
|
||||
general reactingFoam solver, which supports buoyant compressible
|
||||
reacting flow coupled to multiple run-time-selectable lagrangian clouds and
|
||||
surface film modelling.
|
||||
|
||||
To run a reactingParticleFoam case in reactingFoam add the following entries in
|
||||
constant/fvModels:
|
||||
|
||||
buoyancyForce
|
||||
{
|
||||
type buoyancyForce;
|
||||
}
|
||||
|
||||
clouds
|
||||
{
|
||||
type clouds;
|
||||
libs ("liblagrangianParcel.so");
|
||||
}
|
||||
|
||||
which add the acceleration due to gravity needed by Lagrangian clouds and the
|
||||
clouds themselves.
|
||||
|
||||
See the following cases for examples converted from reactingParticleFoam:
|
||||
|
||||
\$FOAM_TUTORIALS/combustion/reactingFoam/Lagrangian
|
||||
|
||||
EOF
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration | Website: https://openfoam.org
|
||||
# \\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
|
||||
# \\ / A nd | Copyright (C) 2020-2021 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -27,17 +27,34 @@
|
||||
#
|
||||
# Description
|
||||
# Script to inform the user that simpleReactingParcelFoam has been replaced
|
||||
# by the more general simpleReactingParticleFoam solver.
|
||||
# by the more general reactingFoam solver.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cat << EOF
|
||||
|
||||
The simpleReactingParcelFoam solver has solver has been replaced by the more
|
||||
general simpleReactingParticleFoam solver, which supports buoyant compressible
|
||||
general reactingFoam solver, which supports buoyant compressible
|
||||
reacting flow coupled to multiple run-time-selectable lagrangian clouds and
|
||||
surface film modelling.
|
||||
|
||||
To run a simpleReactingParcelFoam case in reactingFoam add the following entries
|
||||
in constant/fvModels:
|
||||
|
||||
buoyancyForce
|
||||
{
|
||||
type buoyancyForce;
|
||||
}
|
||||
|
||||
clouds
|
||||
{
|
||||
type clouds;
|
||||
libs ("liblagrangianParcel.so");
|
||||
}
|
||||
|
||||
which add the acceleration due to gravity needed by Lagrangian clouds and the
|
||||
clouds themselves.
|
||||
|
||||
To run with a single cloud rename the constant/*CloudProperties file to
|
||||
constant/cloudProperties.
|
||||
|
||||
@ -51,7 +68,7 @@ collidingCloud, etc ...).
|
||||
|
||||
See the following case for an example converted from simpleReactingParcelFoam:
|
||||
|
||||
\$FOAM_TUTORIALS/lagrangian/simpleReactingParticleFoam/verticalChannel
|
||||
\$FOAM_TUTORIALS/reactingFoam/Lagrangian/verticalChannelSteady
|
||||
|
||||
EOF
|
||||
|
||||
|
||||
64
bin/simpleReactingParticleFoam
Executable file
64
bin/simpleReactingParticleFoam
Executable file
@ -0,0 +1,64 @@
|
||||
#!/bin/sh
|
||||
#------------------------------------------------------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration | Website: https://openfoam.org
|
||||
# \\ / A nd | Copyright (C) 2021 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# 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/>.
|
||||
#
|
||||
# Script
|
||||
# simpleReactingParticleFoam
|
||||
#
|
||||
# Description
|
||||
# Script to inform the user that simpleReactingParticleFoam has been replaced
|
||||
# by the more general reactingFoam solver.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cat << EOF
|
||||
|
||||
The simpleReactingParticleFoam solver has solver has been replaced by the more
|
||||
general reactingFoam solver, which supports buoyant compressible
|
||||
reacting flow coupled to multiple run-time-selectable lagrangian clouds and
|
||||
surface film modelling.
|
||||
|
||||
To run a simpleReactingParticleFoam case in reactingFoam add the following entries
|
||||
in constant/fvModels:
|
||||
|
||||
buoyancyForce
|
||||
{
|
||||
type buoyancyForce;
|
||||
}
|
||||
|
||||
clouds
|
||||
{
|
||||
type clouds;
|
||||
libs ("liblagrangianParticle.so");
|
||||
}
|
||||
|
||||
which add the acceleration due to gravity needed by Lagrangian clouds and the
|
||||
clouds themselves.
|
||||
|
||||
See the following case for an example converted from simpleReactingParticleFoam:
|
||||
|
||||
\$FOAM_TUTORIALS/reactingFoam/Lagrangian/verticalChannelSteady
|
||||
|
||||
EOF
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration | Website: https://openfoam.org
|
||||
# \\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
|
||||
# \\ / A nd | Copyright (C) 2020-2021 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -27,14 +27,14 @@
|
||||
#
|
||||
# Description
|
||||
# Script to inform the user that sprayFoam has been replaced by the
|
||||
# more general reactingParticleFoam solver.
|
||||
# more general reactingFoam solver.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cat << EOF
|
||||
|
||||
The sprayFoam solver has solver has been replaced by the more general
|
||||
reactingParticleFoam solver, which supports compressible reacting flow coupled
|
||||
reactingFoam solver, which supports compressible reacting flow coupled
|
||||
to multiple run-time-selectable lagrangian clouds and surface film modelling.
|
||||
|
||||
To run with a single cloud rename the constant/*CloudProperties file to
|
||||
@ -50,7 +50,7 @@ collidingCloud, etc ...).
|
||||
|
||||
See the following case for an example converted from sprayFoam:
|
||||
|
||||
\$FOAM_TUTORIALS/lagrangian/reactingParticleFoam/aachenBomb
|
||||
\$FOAM_TUTORIALS/lagrangian/reactingFoam/aachenBomb
|
||||
|
||||
EOF
|
||||
|
||||
|
||||
@ -332,31 +332,6 @@ _buoyantReactingFoam_ ()
|
||||
}
|
||||
complete -o filenames -o nospace -F _buoyantReactingFoam_ buoyantReactingFoam
|
||||
|
||||
_buoyantReactingParticleFoam_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
local prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
local line=${COMP_LINE}
|
||||
local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ")
|
||||
|
||||
opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc"
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
-case)
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _buoyantReactingParticleFoam_ buoyantReactingParticleFoam
|
||||
|
||||
_buoyantSimpleFoam_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
@ -3022,31 +2997,6 @@ _reactingFoam_ ()
|
||||
}
|
||||
complete -o filenames -o nospace -F _reactingFoam_ reactingFoam
|
||||
|
||||
_reactingParticleFoam_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
local prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
local line=${COMP_LINE}
|
||||
local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ")
|
||||
|
||||
opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc"
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
-case)
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _reactingParticleFoam_ reactingParticleFoam
|
||||
|
||||
_reconstructPar_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
@ -3669,31 +3619,6 @@ _simpleFoam_ ()
|
||||
}
|
||||
complete -o filenames -o nospace -F _simpleFoam_ simpleFoam
|
||||
|
||||
_simpleReactingParticleFoam_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
local prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
local line=${COMP_LINE}
|
||||
local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ")
|
||||
|
||||
opts="-case -doc -fileHandler -help -hostRoots -libs -listFunctionObjects -listFvModels -listMomentumTransportModels -listScalarBCs -listSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc"
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
-case)
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-roots)
|
||||
opts="" ; extra="" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _simpleReactingParticleFoam_ simpleReactingParticleFoam
|
||||
|
||||
_singleCellMesh_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
@ -5745,25 +5670,6 @@ _paraFoam_ ()
|
||||
}
|
||||
complete -o filenames -o nospace -F _paraFoam_ paraFoam
|
||||
|
||||
_reactingMultiphaseEulerFoam_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
local prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
local line=${COMP_LINE}
|
||||
local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ")
|
||||
|
||||
opts=""
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _reactingMultiphaseEulerFoam_ reactingMultiphaseEulerFoam
|
||||
|
||||
_reactingParcelFoam_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
@ -5783,120 +5689,6 @@ _reactingParcelFoam_ ()
|
||||
}
|
||||
complete -o filenames -o nospace -F _reactingParcelFoam_ reactingParcelFoam
|
||||
|
||||
_reactingTwoPhaseEulerFoam_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
local prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
local line=${COMP_LINE}
|
||||
local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ")
|
||||
|
||||
opts=""
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _reactingTwoPhaseEulerFoam_ reactingTwoPhaseEulerFoam
|
||||
|
||||
_rhoReactingBuoyantFoam_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
local prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
local line=${COMP_LINE}
|
||||
local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ")
|
||||
|
||||
opts=""
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _rhoReactingBuoyantFoam_ rhoReactingBuoyantFoam
|
||||
|
||||
_rhoReactingFoam_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
local prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
local line=${COMP_LINE}
|
||||
local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ")
|
||||
|
||||
opts=""
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _rhoReactingFoam_ rhoReactingFoam
|
||||
|
||||
_simpleReactingParcelFoam_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
local prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
local line=${COMP_LINE}
|
||||
local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ")
|
||||
|
||||
opts=""
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _simpleReactingParcelFoam_ simpleReactingParcelFoam
|
||||
|
||||
_sprayFoam_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
local prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
local line=${COMP_LINE}
|
||||
local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ")
|
||||
|
||||
opts=""
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _sprayFoam_ sprayFoam
|
||||
|
||||
_twoPhaseEulerFoam_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
local prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
local line=${COMP_LINE}
|
||||
local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ")
|
||||
|
||||
opts=""
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _twoPhaseEulerFoam_ twoPhaseEulerFoam
|
||||
|
||||
_uncoupledKinematicParcelFoam_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
|
||||
@ -42,14 +42,15 @@ wmake $targetType genericPatchFields
|
||||
|
||||
wmake $targetType mesh/extrudeModel
|
||||
wmake $targetType dynamicMesh
|
||||
|
||||
# Compile scotchDecomp, metisDecomp etc.
|
||||
parallel/Allwmake $targetType $*
|
||||
|
||||
wmake $targetType dynamicFvMesh
|
||||
wmake $targetType topoChangerFvMesh
|
||||
wmake $targetType conversion
|
||||
wmake $targetType sampling
|
||||
|
||||
# Compile scotchDecomp, metisDecomp etc.
|
||||
parallel/Allwmake $targetType $*
|
||||
|
||||
wmake $targetType ODE
|
||||
wmake $targetType randomProcesses
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -41,6 +41,12 @@ Description
|
||||
\kappa | Von Karman constant
|
||||
\endvartable
|
||||
|
||||
Reference:
|
||||
\verbatim
|
||||
Spalding, D. B., (1961).
|
||||
A Single Formula for the "Law of the Wall".
|
||||
Journal of Applied Mechanics, 28(3), 455-458
|
||||
\endverbatim
|
||||
|
||||
Usage
|
||||
Example of the boundary condition specification:
|
||||
|
||||
@ -163,6 +163,10 @@ bool Foam::fvModel::read(const dictionary& dict)
|
||||
}
|
||||
|
||||
|
||||
void Foam::fvModel::preUpdateMesh()
|
||||
{}
|
||||
|
||||
|
||||
void Foam::fvModel::updateMesh(const mapPolyMesh& mpm)
|
||||
{}
|
||||
|
||||
|
||||
@ -323,6 +323,9 @@ public:
|
||||
|
||||
// Mesh changes
|
||||
|
||||
//- Prepare for mesh update
|
||||
virtual void preUpdateMesh();
|
||||
|
||||
//- Update for mesh changes
|
||||
virtual void updateMesh(const mapPolyMesh&);
|
||||
|
||||
|
||||
@ -237,6 +237,17 @@ bool Foam::fvModels::addsSupToField(const word& fieldName) const
|
||||
}
|
||||
|
||||
|
||||
void Foam::fvModels::preUpdateMesh()
|
||||
{
|
||||
PtrListDictionary<fvModel>& modelList(*this);
|
||||
|
||||
forAll(modelList, i)
|
||||
{
|
||||
modelList[i].preUpdateMesh();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::fvModels::updateMesh(const mapPolyMesh& mpm)
|
||||
{
|
||||
PtrListDictionary<fvModel>& modelList(*this);
|
||||
|
||||
@ -240,6 +240,9 @@ public:
|
||||
|
||||
// Mesh changes
|
||||
|
||||
//- Prepare for mesh update
|
||||
virtual void preUpdateMesh();
|
||||
|
||||
//- Update for mesh changes
|
||||
virtual void updateMesh(const mapPolyMesh&);
|
||||
|
||||
|
||||
@ -42,7 +42,9 @@ Foam::fluidSolutionControl::fluidSolutionControl
|
||||
)
|
||||
:
|
||||
nonOrthogonalSolutionControl(mesh, algorithmName),
|
||||
frozenFlow_(false),
|
||||
models_(false),
|
||||
thermophysics_(false),
|
||||
flow_(false),
|
||||
momentumPredictor_(true),
|
||||
transonic_(false),
|
||||
consistent_(false)
|
||||
@ -66,19 +68,9 @@ bool Foam::fluidSolutionControl::read()
|
||||
|
||||
const dictionary& solutionDict = dict();
|
||||
|
||||
frozenFlow_ =
|
||||
solutionDict.lookupOrDefaultBackwardsCompatible<bool>
|
||||
(
|
||||
{"frozenFlow", "solveFluid"},
|
||||
false
|
||||
);
|
||||
|
||||
// If using the old keyword, then the logic is reversed
|
||||
if (!solutionDict.found("frozenFlow") && solutionDict.found("solveFluid"))
|
||||
{
|
||||
frozenFlow_ = !frozenFlow_;
|
||||
}
|
||||
|
||||
models_ = solutionDict.lookupOrDefault<bool>("models", true);
|
||||
thermophysics_ = solutionDict.lookupOrDefault<bool>("thermophysics", true);
|
||||
flow_ = solutionDict.lookupOrDefault<bool>("flow", true);
|
||||
momentumPredictor_ =
|
||||
solutionDict.lookupOrDefault<bool>("momentumPredictor", true);
|
||||
transonic_ = solutionDict.lookupOrDefault<bool>("transonic", false);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2018-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2018-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -56,8 +56,14 @@ protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Flag to indicate not to solve for the flow
|
||||
bool frozenFlow_;
|
||||
//- Flag to indicate to solve for the optional models
|
||||
bool models_;
|
||||
|
||||
//- Flag to indicate to solve for the thermophysics
|
||||
bool thermophysics_;
|
||||
|
||||
//- Flag to indicate to solve for the flow
|
||||
bool flow_;
|
||||
|
||||
//- Flag to indicate to solve for momentum
|
||||
bool momentumPredictor_;
|
||||
@ -97,8 +103,14 @@ public:
|
||||
|
||||
// Access
|
||||
|
||||
//- Flag to indicate not to solve for the flow
|
||||
inline bool frozenFlow() const;
|
||||
//- Flag to indicate to solve for the options models
|
||||
inline bool models() const;
|
||||
|
||||
//- Flag to indicate to solve for the thermophysics
|
||||
inline bool thermophysics() const;
|
||||
|
||||
//- Flag to indicate to solve for the flow
|
||||
inline bool flow() const;
|
||||
|
||||
//- Flag to indicate to solve for momentum
|
||||
inline bool momentumPredictor() const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2018-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,9 +25,21 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
inline bool Foam::fluidSolutionControl::frozenFlow() const
|
||||
inline bool Foam::fluidSolutionControl::models() const
|
||||
{
|
||||
return frozenFlow_;
|
||||
return models_;
|
||||
}
|
||||
|
||||
|
||||
inline bool Foam::fluidSolutionControl::thermophysics() const
|
||||
{
|
||||
return thermophysics_;
|
||||
}
|
||||
|
||||
|
||||
inline bool Foam::fluidSolutionControl::flow() const
|
||||
{
|
||||
return flow_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -116,4 +116,7 @@ clouds/Templates/MomentumCloud/cloudSolution/cloudSolution.C
|
||||
# averaging methods
|
||||
submodels/MPPIC/AveragingMethods/makeAveragingMethods.C
|
||||
|
||||
# fvModels
|
||||
fvModels/clouds.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/liblagrangianParcel
|
||||
|
||||
214
src/lagrangian/parcel/fvModels/clouds.C
Normal file
214
src/lagrangian/parcel/fvModels/clouds.C
Normal file
@ -0,0 +1,214 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
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/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "clouds.H"
|
||||
#include "basicSpecieMixture.H"
|
||||
#include "fvMatrix.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
defineTypeNameAndDebug(clouds, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
fvModel,
|
||||
clouds,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::fv::clouds::clouds
|
||||
(
|
||||
const word& sourceName,
|
||||
const word& modelType,
|
||||
const dictionary& dict,
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
fvModel(sourceName, modelType, dict, mesh),
|
||||
carrierThermo_
|
||||
(
|
||||
mesh.lookupObject<fluidThermo>(basicThermo::dictName)
|
||||
),
|
||||
clouds_
|
||||
(
|
||||
mesh.lookupObject<volScalarField>("rho"),
|
||||
mesh.lookupObject<volVectorField>("U"),
|
||||
mesh.lookupObject<uniformDimensionedVectorField>("g"),
|
||||
carrierThermo_
|
||||
),
|
||||
curTimeIndex_(-1)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wordList Foam::fv::clouds::addSupFields() const
|
||||
{
|
||||
wordList fieldNames({"rho", "U", carrierThermo_.he().name()});
|
||||
|
||||
if (isA<basicSpecieMixture>(carrierThermo_))
|
||||
{
|
||||
const basicSpecieMixture& composition =
|
||||
refCast<const basicSpecieMixture>(carrierThermo_);
|
||||
|
||||
const PtrList<volScalarField>& Y = composition.Y();
|
||||
|
||||
forAll(Y, i)
|
||||
{
|
||||
if (composition.solve(i))
|
||||
{
|
||||
fieldNames.append(Y[i].name());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return fieldNames;
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::clouds::correct()
|
||||
{
|
||||
if (curTimeIndex_ == mesh().time().timeIndex())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
clouds_.evolve();
|
||||
|
||||
curTimeIndex_ = mesh().time().timeIndex();
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::clouds::addSup
|
||||
(
|
||||
fvMatrix<scalar>& eqn,
|
||||
const word& fieldName
|
||||
) const
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< type() << ": applying source to " << eqn.psi().name() << endl;
|
||||
}
|
||||
|
||||
if (fieldName == "rho")
|
||||
{
|
||||
eqn += clouds_.Srho(eqn.psi());
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Support for field " << fieldName << " is not implemented"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::clouds::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<scalar>& eqn,
|
||||
const word& fieldName
|
||||
) const
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< type() << ": applying source to " << eqn.psi().name() << endl;
|
||||
}
|
||||
|
||||
if (fieldName == "rho")
|
||||
{
|
||||
eqn += clouds_.Srho(eqn.psi());
|
||||
}
|
||||
else if (fieldName == carrierThermo_.he().name())
|
||||
{
|
||||
eqn += clouds_.Sh(eqn.psi());
|
||||
}
|
||||
else if
|
||||
(
|
||||
isA<basicSpecieMixture>(carrierThermo_)
|
||||
&& refCast<const basicSpecieMixture>(carrierThermo_).contains
|
||||
(
|
||||
eqn.psi().name()
|
||||
)
|
||||
)
|
||||
{
|
||||
eqn += clouds_.SYi
|
||||
(
|
||||
refCast<const basicSpecieMixture>(carrierThermo_).index(eqn.psi()),
|
||||
eqn.psi()
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Support for field " << fieldName << " is not implemented"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::clouds::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const word& fieldName
|
||||
) const
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< type() << ": applying source to " << eqn.psi().name() << endl;
|
||||
}
|
||||
|
||||
if (fieldName == "U")
|
||||
{
|
||||
eqn += clouds_.SU(eqn.psi());
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Support for field " << fieldName << " is not implemented"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::clouds::preUpdateMesh()
|
||||
{
|
||||
// Store the particle positions
|
||||
clouds_.storeGlobalPositions();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
163
src/lagrangian/parcel/fvModels/clouds.H
Normal file
163
src/lagrangian/parcel/fvModels/clouds.H
Normal file
@ -0,0 +1,163 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
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/>.
|
||||
|
||||
Class
|
||||
Foam::fv::clouds
|
||||
|
||||
Description
|
||||
Lagrangian clouds fvModel
|
||||
|
||||
Usage
|
||||
Example usage:
|
||||
\verbatim
|
||||
clouds
|
||||
{
|
||||
type clouds;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
clouds.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef clouds_H
|
||||
#define clouds_H
|
||||
|
||||
#include "fvModel.H"
|
||||
#include "fluidThermo.H"
|
||||
#include "uniformDimensionedFields.H"
|
||||
#include "parcelCloudList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class clouds Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class clouds
|
||||
:
|
||||
public fvModel
|
||||
{
|
||||
// Private Data
|
||||
|
||||
//- Reference to the carrier phase thermo
|
||||
const fluidThermo& carrierThermo_;
|
||||
|
||||
//- The Lagrangian cloud list
|
||||
mutable parcelCloudList clouds_;
|
||||
|
||||
//- Current time index (used for updating)
|
||||
mutable label curTimeIndex_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("clouds");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from explicit source name and mesh
|
||||
clouds
|
||||
(
|
||||
const word& sourceName,
|
||||
const word& modelType,
|
||||
const dictionary& dict,
|
||||
const fvMesh& mesh
|
||||
);
|
||||
|
||||
//- Disallow default bitwise copy construction
|
||||
clouds
|
||||
(
|
||||
const clouds&
|
||||
) = delete;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Checks
|
||||
|
||||
//- Return the list of fields for which the option adds source term
|
||||
// to the transport equation
|
||||
virtual wordList addSupFields() const;
|
||||
|
||||
|
||||
// Correct
|
||||
|
||||
//- Solve the Lagrangian clouds and update the sources
|
||||
virtual void correct();
|
||||
|
||||
//- Prepare for mesh update
|
||||
virtual void preUpdateMesh();
|
||||
|
||||
|
||||
// Add explicit and implicit contributions to compressible equation
|
||||
|
||||
//- Add source to continuity equation
|
||||
virtual void addSup
|
||||
(
|
||||
fvMatrix<scalar>& eqn,
|
||||
const word& fieldName
|
||||
) const;
|
||||
|
||||
//- Add source to pressure or enthalpy equation
|
||||
virtual void addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<scalar>& eqn,
|
||||
const word& fieldName
|
||||
) const;
|
||||
|
||||
//- Add source to momentum equation
|
||||
virtual void addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const word& fieldName
|
||||
) const;
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const clouds&) = delete;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace fv
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -6,7 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
wmake $targetType regionModel
|
||||
wmake $targetType surfaceFilmModels
|
||||
wmake $targetType surfaceFilmModels/derivedFvPatchFields/wallFunctions
|
||||
wmake $targetType thermalBaffleModels
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -72,6 +72,9 @@ PATCHFIELDS=derivedFvPatchFields
|
||||
$(PATCHFIELDS)/filmHeightInletVelocity/filmHeightInletVelocityFvPatchVectorField.C
|
||||
$(PATCHFIELDS)/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C
|
||||
$(PATCHFIELDS)/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C
|
||||
$(PATCHFIELDS)/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C
|
||||
$(PATCHFIELDS)/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C
|
||||
|
||||
fvModels/surfaceFilm.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libsurfaceFilmModels
|
||||
|
||||
@ -5,6 +5,9 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
@ -15,6 +18,9 @@ LIB_LIBS = \
|
||||
-lthermophysicalProperties \
|
||||
-lreactionThermophysicalModels \
|
||||
-ldistributionModels \
|
||||
-lmomentumTransportModels \
|
||||
-lcompressibleMomentumTransportModels \
|
||||
-lthermophysicalTransportModels \
|
||||
-lregionModels \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools
|
||||
|
||||
@ -1,4 +0,0 @@
|
||||
alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C
|
||||
nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libsurfaceFilmDerivedFvPatchFields
|
||||
@ -1,26 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude\
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
LIB_LIBS = \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lthermophysicalProperties \
|
||||
-lreactionThermophysicalModels \
|
||||
-lmomentumTransportModels \
|
||||
-lcompressibleMomentumTransportModels \
|
||||
-lthermophysicalTransportModels \
|
||||
-lregionModels \
|
||||
-lsurfaceFilmModels \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools
|
||||
207
src/regionModels/surfaceFilmModels/fvModels/surfaceFilm.C
Normal file
207
src/regionModels/surfaceFilmModels/fvModels/surfaceFilm.C
Normal file
@ -0,0 +1,207 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
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/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "surfaceFilm.H"
|
||||
#include "basicSpecieMixture.H"
|
||||
#include "fvMatrix.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
defineTypeNameAndDebug(surfaceFilm, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
fvModel,
|
||||
surfaceFilm,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::fv::surfaceFilm::surfaceFilm
|
||||
(
|
||||
const word& sourceName,
|
||||
const word& modelType,
|
||||
const dictionary& dict,
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
fvModel(sourceName, modelType, dict, mesh),
|
||||
primaryThermo_
|
||||
(
|
||||
mesh.lookupObject<fluidThermo>(basicThermo::dictName)
|
||||
),
|
||||
surfaceFilm_
|
||||
(
|
||||
regionModels::surfaceFilmModel::New
|
||||
(
|
||||
mesh,
|
||||
mesh.lookupObject<uniformDimensionedVectorField>("g")
|
||||
)
|
||||
),
|
||||
curTimeIndex_(-1)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wordList Foam::fv::surfaceFilm::addSupFields() const
|
||||
{
|
||||
wordList fieldNames({"rho", "U", primaryThermo_.he().name()});
|
||||
|
||||
if (isA<basicSpecieMixture>(primaryThermo_))
|
||||
{
|
||||
const basicSpecieMixture& composition =
|
||||
refCast<const basicSpecieMixture>(primaryThermo_);
|
||||
|
||||
const PtrList<volScalarField>& Y = composition.Y();
|
||||
|
||||
forAll(Y, i)
|
||||
{
|
||||
if (composition.solve(i))
|
||||
{
|
||||
fieldNames.append(Y[i].name());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return fieldNames;
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::surfaceFilm::correct()
|
||||
{
|
||||
if (curTimeIndex_ == mesh().time().timeIndex())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
surfaceFilm_->evolve();
|
||||
|
||||
curTimeIndex_ = mesh().time().timeIndex();
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::surfaceFilm::addSup
|
||||
(
|
||||
fvMatrix<scalar>& eqn,
|
||||
const word& fieldName
|
||||
) const
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< type() << ": applying source to " << eqn.psi().name() << endl;
|
||||
}
|
||||
|
||||
if (fieldName == "rho")
|
||||
{
|
||||
eqn += surfaceFilm_->Srho();
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Support for field " << fieldName << " is not implemented"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::surfaceFilm::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<scalar>& eqn,
|
||||
const word& fieldName
|
||||
) const
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< type() << ": applying source to " << eqn.psi().name() << endl;
|
||||
}
|
||||
|
||||
if (fieldName == "rho")
|
||||
{
|
||||
eqn += surfaceFilm_->Srho();
|
||||
}
|
||||
else if (fieldName == primaryThermo_.he().name())
|
||||
{
|
||||
eqn += surfaceFilm_->Sh();
|
||||
}
|
||||
else if
|
||||
(
|
||||
isA<basicSpecieMixture>(primaryThermo_)
|
||||
&& refCast<const basicSpecieMixture>(primaryThermo_).contains
|
||||
(
|
||||
eqn.psi().name()
|
||||
)
|
||||
)
|
||||
{
|
||||
eqn += surfaceFilm_->SYi
|
||||
(
|
||||
refCast<const basicSpecieMixture>(primaryThermo_).index(eqn.psi())
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Support for field " << fieldName << " is not implemented"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::surfaceFilm::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const word& fieldName
|
||||
) const
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< type() << ": applying source to " << eqn.psi().name() << endl;
|
||||
}
|
||||
|
||||
if (fieldName == "U")
|
||||
{
|
||||
eqn += surfaceFilm_->SU();
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Support for field " << fieldName << " is not implemented"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
160
src/regionModels/surfaceFilmModels/fvModels/surfaceFilm.H
Normal file
160
src/regionModels/surfaceFilmModels/fvModels/surfaceFilm.H
Normal file
@ -0,0 +1,160 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
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/>.
|
||||
|
||||
Class
|
||||
Foam::fv::surfaceFilm
|
||||
|
||||
Description
|
||||
surfaceFilm fvModel
|
||||
|
||||
Usage
|
||||
Example usage:
|
||||
\verbatim
|
||||
surfaceFilm
|
||||
{
|
||||
type surfaceFilm;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
surfaceFilm.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef surfaceFilm_H
|
||||
#define surfaceFilm_H
|
||||
|
||||
#include "fvModel.H"
|
||||
#include "fluidThermo.H"
|
||||
#include "uniformDimensionedFields.H"
|
||||
#include "surfaceFilmModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class surfaceFilm Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class surfaceFilm
|
||||
:
|
||||
public fvModel
|
||||
{
|
||||
// Private Data
|
||||
|
||||
//- Reference to the primary region thermo
|
||||
const fluidThermo& primaryThermo_;
|
||||
|
||||
//- The surfaceFilmModel pointer
|
||||
autoPtr<regionModels::surfaceFilmModel> surfaceFilm_;
|
||||
|
||||
//- Current time index (used for updating)
|
||||
mutable label curTimeIndex_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("surfaceFilm");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from explicit source name and mesh
|
||||
surfaceFilm
|
||||
(
|
||||
const word& sourceName,
|
||||
const word& modelType,
|
||||
const dictionary& dict,
|
||||
const fvMesh& mesh
|
||||
);
|
||||
|
||||
//- Disallow default bitwise copy construction
|
||||
surfaceFilm
|
||||
(
|
||||
const surfaceFilm&
|
||||
) = delete;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Checks
|
||||
|
||||
//- Return the list of fields for which the option adds source term
|
||||
// to the transport equation
|
||||
virtual wordList addSupFields() const;
|
||||
|
||||
|
||||
// Correct
|
||||
|
||||
//- Solve the Lagrangian surfaceFilm and update the sources
|
||||
virtual void correct();
|
||||
|
||||
|
||||
// Add explicit and implicit contributions to compressible equation
|
||||
|
||||
//- Add source to continuity equation
|
||||
virtual void addSup
|
||||
(
|
||||
fvMatrix<scalar>& eqn,
|
||||
const word& fieldName
|
||||
) const;
|
||||
|
||||
//- Add source to pressure or enthalpy equation
|
||||
virtual void addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<scalar>& eqn,
|
||||
const word& fieldName
|
||||
) const;
|
||||
|
||||
//- Add source to momentum equation
|
||||
virtual void addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const word& fieldName
|
||||
) const;
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const surfaceFilm&) = delete;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace fv
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1067,14 +1067,14 @@ tmp<volScalarField::Internal> kinematicSingleLayer::Srho() const
|
||||
}
|
||||
|
||||
|
||||
tmp<volScalarField::Internal> kinematicSingleLayer::Srho
|
||||
tmp<volScalarField::Internal> kinematicSingleLayer::SYi
|
||||
(
|
||||
const label i
|
||||
) const
|
||||
{
|
||||
return volScalarField::Internal::New
|
||||
(
|
||||
IOobject::modelName("Srho(" + Foam::name(i) + ")", typeName),
|
||||
IOobject::modelName("SY(" + Foam::name(i) + ")", typeName),
|
||||
primaryMesh(),
|
||||
dimensionedScalar(dimMass/dimVolume/dimTime, 0)
|
||||
);
|
||||
|
||||
@ -482,7 +482,7 @@ public:
|
||||
virtual tmp<volScalarField::Internal> Srho() const;
|
||||
|
||||
//- Return mass source for specie i - Eulerian phase only
|
||||
virtual tmp<volScalarField::Internal> Srho
|
||||
virtual tmp<volScalarField::Internal> SYi
|
||||
(
|
||||
const label i
|
||||
) const;
|
||||
|
||||
@ -81,11 +81,11 @@ tmp<volScalarField::Internal> noFilm::Srho() const
|
||||
}
|
||||
|
||||
|
||||
tmp<volScalarField::Internal> noFilm::Srho(const label i) const
|
||||
tmp<volScalarField::Internal> noFilm::SYi(const label i) const
|
||||
{
|
||||
return volScalarField::Internal::New
|
||||
(
|
||||
"noFilm::Srho(" + Foam::name(i) + ")",
|
||||
"noFilm::SY(" + Foam::name(i) + ")",
|
||||
mesh_,
|
||||
dimensionedScalar(dimMass/dimVolume/dimTime, 0)
|
||||
);
|
||||
|
||||
@ -100,7 +100,7 @@ public:
|
||||
virtual tmp<volScalarField::Internal> Srho() const;
|
||||
|
||||
//- Return mass source for specie i - Eulerian phase only
|
||||
virtual tmp<volScalarField::Internal> Srho
|
||||
virtual tmp<volScalarField::Internal> SYi
|
||||
(
|
||||
const label i
|
||||
) const;
|
||||
|
||||
@ -119,7 +119,7 @@ public:
|
||||
virtual tmp<volScalarField::Internal> Srho() const = 0;
|
||||
|
||||
//- Return mass source for specie i - Eulerian phase only
|
||||
virtual tmp<volScalarField::Internal> Srho
|
||||
virtual tmp<volScalarField::Internal> SYi
|
||||
(
|
||||
const label i
|
||||
) const = 0;
|
||||
|
||||
@ -581,7 +581,7 @@ void thermoSingleLayer::info()
|
||||
}
|
||||
|
||||
|
||||
tmp<volScalarField::Internal> thermoSingleLayer::Srho
|
||||
tmp<volScalarField::Internal> thermoSingleLayer::SYi
|
||||
(
|
||||
const label i
|
||||
) const
|
||||
@ -596,11 +596,11 @@ tmp<volScalarField::Internal> thermoSingleLayer::Srho
|
||||
|
||||
const label vapId = primarySpecieThermo.species()[liquidThermo.name()];
|
||||
|
||||
tmp<volScalarField::Internal> tSrho
|
||||
tmp<volScalarField::Internal> tSYi
|
||||
(
|
||||
volScalarField::Internal::New
|
||||
(
|
||||
IOobject::modelName("Srho(" + Foam::name(i) + ")", typeName),
|
||||
IOobject::modelName("SY(" + Foam::name(i) + ")", typeName),
|
||||
primaryMesh(),
|
||||
dimensionedScalar(dimMass/dimVolume/dimTime, 0)
|
||||
)
|
||||
@ -608,7 +608,7 @@ tmp<volScalarField::Internal> thermoSingleLayer::Srho
|
||||
|
||||
if (vapId == i)
|
||||
{
|
||||
scalarField& Srho = tSrho.ref();
|
||||
scalarField& SYi = tSYi.ref();
|
||||
const scalarField& V = primaryMesh().V();
|
||||
const scalar dt = time().deltaTValue();
|
||||
|
||||
@ -627,12 +627,12 @@ tmp<volScalarField::Internal> thermoSingleLayer::Srho
|
||||
|
||||
forAll(patchMass, j)
|
||||
{
|
||||
Srho[cells[j]] += patchMass[j]/(V[cells[j]]*dt);
|
||||
SYi[cells[j]] += patchMass[j]/(V[cells[j]]*dt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return tSrho;
|
||||
return tSYi;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -303,7 +303,7 @@ public:
|
||||
// Mapped into primary region
|
||||
|
||||
//- Return mass source for specie i - Eulerian phase only
|
||||
virtual tmp<volScalarField::Internal> Srho
|
||||
virtual tmp<volScalarField::Internal> SYi
|
||||
(
|
||||
const label i
|
||||
) const;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user