lagrangian: Run-time selectable clouds

The standard set of Lagrangian clouds are now selectable at run-time.
This means that a solver that supports Lagrangian modelling can now use
any type of cloud (with some restrictions). Previously, solvers were
hard-coded to use specific cloud modelling. In addition, a cloud-list
structure has been added so that solvers may select multiple clouds,
rather than just one.

The new system is controlled as follows:

- If only a single cloud is required, then the settings for the
  Lagrangian modelling should be placed in a constant/cloudProperties
  file.

- If multiple clouds are required, then a constant/clouds file should be
  created containing a list of cloud names defined by the user. Each
  named cloud then reads settings from a corresponding
  constant/<cloudName>Properties file. Clouds are evolved sequentially
  in the order in which they are listed in the constant/clouds file.

- If no clouds are required, then the constant/cloudProperties file and
  constant/clouds file should be omitted.

The constant/cloudProperties or constant/<cloudName>Properties files are
the same as previous cloud properties files; e.g.,
constant/kinematicCloudProperties or constant/reactingCloud1Properties,
except that they now also require an additional top-level "type" entry
to select which type of cloud is to be used. The available options for
this entry are:

    type    cloud;                   // A basic cloud of solid
                                     // particles. Includes forces,
                                     // patch interaction, injection,
                                     // dispersion and stochastic
                                     // collisions. Same as the cloud
                                     // previously used by
                                     // rhoParticleFoam
                                     // (uncoupledKinematicParticleFoam)

    type    collidingCloud;          // As "cloud" but with resolved
                                     // collision modelling. Same as the
                                     // cloud previously used by DPMFoam
                                     // and particleFoam
                                     // (icoUncoupledKinematicParticleFoam)

    type    MPPICCloud;              // As "cloud" but with MPPIC
                                     // collision modelling. Same as the
                                     // cloud previously used by
                                     // MPPICFoam.

    type    thermoCloud;             // As "cloud" but with
                                     // thermodynamic modelling and heat
                                     // transfer with the carrier phase.
                                     // Same as the limestone cloud
                                     // previously used by
                                     // coalChemistryFoam.

    type    reactingCloud;           // As "thermoCloud" but with phase
                                     // change and mass transfer
                                     // coupling with the carrier
                                     // phase. Same as the cloud
                                     // previously used in fireFoam.

    type    reactingMultiphaseCloud; // As "reactingCloud" but with
                                     // particles that contain multiple
                                     // phases. Same as the clouds
                                     // previously used in
                                     // reactingParcelFoam and
                                     // simpleReactingParcelFoam and the
                                     // coal cloud used in
                                     // coalChemistryFoam.

    type    sprayCloud;              // As "reactingCloud" but with
                                     // additional spray-specific
                                     // collision and breakup modelling.
                                     // Same as the cloud previously
                                     // used in sprayFoam and
                                     // engineFoam.

The first three clouds are not thermally coupled, so are available in
all Lagrangian solvers. The last four are thermally coupled and require
access to the carrier thermodynamic model, so are only available in
compressible Lagrangian solvers.

This change has reduced the number of solvers necessary to provide the
same functionality; solvers that previously differed only in their
Lagrangian modelling can now be combined. The Lagrangian solvers have
therefore been consolidated with consistent naming as follows.

    denseParticleFoam: Replaces DPMFoam and MPPICFoam

    reactingParticleFoam: Replaces sprayFoam and coalChemistryFoam

    simpleReactingParticleFoam: Replaces simpleReactingParcelFoam

    buoyantReactingParticleFoam: Replaces reactingParcelFoam

fireFoam and engineFoam remain, although fireFoam is likely to be merged
into buoyantReactingParticleFoam in the future once the additional
functionality it provides is generalised.

Some additional minor functionality has also been added to certain
solvers:

- denseParticleFoam has a "cloudForceSplit" control which can be set in
  system/fvOptions.PIMPLE. This provides three methods for handling the
  cloud momentum coupling, each of which have different trade-off-s
  regarding numerical artefacts in the velocity field. See
  denseParticleFoam.C for more information, and also bug report #3385.

- reactingParticleFoam and buoyantReactingParticleFoam now support
  moving mesh in order to permit sharing parts of their implementation
  with engineFoam.
This commit is contained in:
Will Bainbridge
2020-07-22 11:17:16 +01:00
parent 165bcee48b
commit 43d66b5e7c
1086 changed files with 5128 additions and 5360 deletions

View File

@ -79,7 +79,7 @@ int main(int argc, char *argv[])
#include "createFieldRefs.H"
#include "createRhoUf.H"
#include "initContinuityErrs.H"
#include "readEngineTimeControls.H"
#include "createEngineTimeControls.H"
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
#include "startSummary.H"

View File

@ -55,7 +55,7 @@ int main(int argc, char *argv[])
#include "createFieldRefs.H"
#include "createRhoUf.H"
#include "initContinuityErrs.H"
#include "readEngineTimeControls.H"
#include "createEngineTimeControls.H"
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
#include "startSummary.H"

View File

@ -18,7 +18,7 @@ EXE_INC = \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/lagrangian/parcel/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude
EXE_LIBS = \
@ -40,6 +40,6 @@ EXE_LIBS = \
-lradiationModels \
-lsurfaceFilmModels \
-lsurfaceFilmDerivedFvPatchFields \
-llagrangianIntermediate \
-llagrangianTurbulence \
-llagrangianParcel \
-llagrangianParcelTurbulence \
-lODE

View File

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

View File

@ -33,7 +33,7 @@ Description
#include "fvCFD.H"
#include "fluidThermoMomentumTransportModel.H"
#include "psiReactionThermophysicalTransportModel.H"
#include "basicReactingCloud.H"
#include "parcelCloudList.H"
#include "surfaceFilmModel.H"
#include "radiationModel.H"
#include "SLGThermo.H"

View File

@ -1,171 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-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/>.
Application
DPMFoam
Description
Transient solver for the coupled transport of a single kinematic particle
cloud including the effect of the volume fraction of particles on the
continuous phase, with optional mesh motion and mesh topology changes.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "dynamicFvMesh.H"
#include "singlePhaseTransportModel.H"
#include "PhaseIncompressibleMomentumTransportModel.H"
#include "pimpleControl.H"
#include "CorrectPhi.H"
#include "fvOptions.H"
#ifdef MPPIC
#include "basicKinematicMPPICCloud.H"
#define basicKinematicTypeCloud basicKinematicMPPICCloud
#else
#include "basicKinematicCollidingCloud.H"
#define basicKinematicTypeCloud basicKinematicCollidingCloud
#endif
int main(int argc, char *argv[])
{
argList::addOption
(
"cloudName",
"name",
"specify alternative cloud name. default is 'kinematicCloud'"
);
#include "postProcess.H"
#include "setRootCaseLists.H"
#include "createTime.H"
#include "createDynamicFvMesh.H"
#include "createDyMControls.H"
#include "createFields.H"
#include "createUcfIfPresent.H"
#include "initContinuityErrs.H"
Info<< "\nStarting time loop\n" << endl;
while (pimple.run(runTime))
{
#include "readDyMControls.H"
#include "CourantNo.H"
#include "setDeltaT.H"
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
// Store the particle positions
kinematicCloud.storeGlobalPositions();
mesh.update();
if (mesh.changing())
{
if (correctPhi)
{
// Calculate absolute flux from the mapped surface velocity
phic = mesh.Sf() & Ucf();
#include "correctPhic.H"
// Make the flux relative to the mesh motion
fvc::makeRelative(phic, Uc);
}
if (checkMeshCourantNo)
{
#include "meshCourantNo.H"
}
}
continuousPhaseTransport.correct();
muc = rhoc*continuousPhaseTransport.nu();
Info<< "Evolving " << kinematicCloud.name() << endl;
kinematicCloud.evolve();
// Update continuous phase volume fraction field
alphac = max(1.0 - kinematicCloud.theta(), alphacMin);
alphac.correctBoundaryConditions();
alphacf = fvc::interpolate(alphac);
alphaPhic = alphacf*phic;
fvVectorMatrix cloudSU(kinematicCloud.SU(Uc));
volVectorField cloudVolSUSu
(
IOobject
(
"cloudVolSUSu",
runTime.timeName(),
mesh
),
mesh,
dimensionedVector
(
"0",
cloudSU.dimensions()/dimVolume,
Zero
),
zeroGradientFvPatchVectorField::typeName
);
cloudVolSUSu.primitiveFieldRef() =
(cloudSU.diag()*Uc() - cloudSU.source())/mesh.V();
cloudVolSUSu.correctBoundaryConditions();
cloudSU.source() = cloudSU.diag()*Uc();
// --- Pressure-velocity PIMPLE corrector loop
while (pimple.loop())
{
#include "UcEqn.H"
// --- PISO loop
while (pimple.correct())
{
#include "pEqn.H"
}
if (pimple.turbCorr())
{
continuousPhaseTurbulence->correct();
}
}
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //

View File

@ -1,3 +0,0 @@
DPMMomentumTransportModels.C
LIB = $(FOAM_LIBBIN)/libDPMMomentumTransportModels

View File

@ -1,40 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2018 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
MPPICFoam
Description
Transient solver for the coupled transport of a single kinematic particle
cloud including the effect of the volume fraction of particles on the
continuous phase. Multi-Phase Particle In Cell (MPPIC) modeling is used to
represent collisions without resolving particle-particle interactions.
\*---------------------------------------------------------------------------*/
#define MPPIC
#include "DPMFoam.C"
// ************************************************************************* //

View File

@ -1,3 +0,0 @@
MPPICFoam.C
EXE = $(FOAM_APPBIN)/MPPICFoam

View File

@ -1,3 +0,0 @@
DPMFoam.C
EXE = $(FOAM_APPBIN)/DPMFoam

View File

@ -1,31 +0,0 @@
EXE_INC = \
-I./DPMMomentumTransportModels/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/radiationModels/lnInclude \
-I$(LIB_SRC)/transportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/incompressible/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/phaseIncompressible/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-lincompressibleTransportModels \
-lmomentumTransportModels \
-lincompressibleMomentumTransportModels \
-lDPMMomentumTransportModels \
-lfiniteVolume \
-ldynamicFvMesh \
-ltopoChangerFvMesh \
-lfvOptions \
-lmeshTools

View File

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

View File

@ -1,3 +0,0 @@
coalChemistryFoam.C
EXE = $(FOAM_APPBIN)/coalChemistryFoam

View File

@ -1,49 +0,0 @@
EXE_INC = \
-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/psiReactionThermo/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/lagrangian/coalCombustion/lnInclude \
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/radiationModels/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude \
-I$(FOAM_SOLVERS)/combustion/reactingFoam \
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lmeshTools \
-lmomentumTransportModels \
-lfluidThermoMomentumTransportModels \
-lthermophysicalTransportModels \
-lpsiReactionThermophysicalTransportModels \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-lcoalCombustion\
-lspecie \
-lfluidThermophysicalModels \
-lthermophysicalProperties \
-lreactionThermophysicalModels \
-lSLGThermo \
-lchemistryModel \
-lradiationModels \
-lregionModels \
-lsurfaceFilmModels \
-lODE \
-lcombustionModels \
-lfvOptions \
-lsampling

View File

@ -1,49 +0,0 @@
tmp<fv::convectionScheme<scalar>> mvConvection
(
fv::convectionScheme<scalar>::New
(
mesh,
fields,
phi,
mesh.divScheme("div(phi,Yi_h)")
)
);
{
combustion->correct();
volScalarField Yt(0.0*Y[0]);
forAll(Y, i)
{
if (i != inertIndex && composition.active(i))
{
volScalarField& Yi = Y[i];
fvScalarMatrix YiEqn
(
fvm::ddt(rho, Yi)
+ mvConvection->fvmDiv(phi, Yi)
+ thermophysicalTransport->divj(Yi)
==
coalParcels.SYi(i, Yi)
+ combustion->R(Yi)
+ fvOptions(rho, Yi)
);
YiEqn.relax();
fvOptions.constrain(YiEqn);
YiEqn.solve("Yi");
fvOptions.correct(Yi);
Yi.max(0.0);
Yt += Yi;
}
}
Y[inertIndex] = scalar(1) - Yt;
Y[inertIndex].max(0.0);
}

View File

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

View File

@ -1 +0,0 @@
const label inertIndex(composition.species()[inertSpecie]);

View File

@ -1,141 +0,0 @@
#include "createRDeltaT.H"
#include "readGravitationalAcceleration.H"
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<psiReactionThermo> pThermo(psiReactionThermo::New(mesh));
psiReactionThermo& thermo = pThermo();
thermo.validate(args.executable(), "h", "e");
SLGThermo slgThermo(mesh, thermo);
basicSpecieMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
const word inertSpecie(thermo.lookup("inertSpecie"));
if (!composition.species().found(inertSpecie))
{
FatalIOErrorIn(args.executable().c_str(), thermo)
<< "Inert specie " << inertSpecie << " not found in available species "
<< composition.species()
<< exit(FatalIOError);
}
volScalarField& p = thermo.p();
const volScalarField& T = thermo.T();
const volScalarField& psi = thermo.psi();
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
forAll(Y, i)
{
fields.add(Y[i]);
}
fields.add(thermo.he());
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
thermo.rho()
);
// lagrangian effective density field - used externally (optional)
volScalarField rhoEffLagrangian
(
IOobject
(
"rhoEffLagrangian",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar(dimDensity, 0)
);
// dynamic pressure field - used externally (optional)
volScalarField pDyn
(
IOobject
(
"pDyn",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar(dimPressure, 0)
);
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());
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<psiReactionThermophysicalTransportModel> thermophysicalTransport
(
psiReactionThermophysicalTransportModel::New(turbulence(), thermo)
);
Info<< "Creating combustion model\n" << endl;
autoPtr<CombustionModel<psiReactionThermo>> combustion
(
CombustionModel<psiReactionThermo>::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 "createMRF.H"
#include "createClouds.H"
#include "createRadiationModel.H"
#include "createFvOptions.H"

View File

@ -1,93 +0,0 @@
rho = thermo.rho();
volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
if (pimple.transonic())
{
surfaceScalarField phid
(
"phid",
fvc::interpolate(psi)
*(
fvc::flux(HbyA)
+ MRF.zeroFilter
(
rhorAUf*fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)
)
)
);
MRF.makeRelative(fvc::interpolate(psi), phid);
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
fvm::ddt(psi, p)
+ fvm::div(phid, p)
- fvm::laplacian(rhorAUf, p)
==
coalParcels.Srho()
+ fvOptions(psi, p, rho.name())
);
pEqn.solve();
if (pimple.finalNonOrthogonalIter())
{
phi == pEqn.flux();
}
}
}
else
{
surfaceScalarField phiHbyA
(
"phiHbyA",
(
fvc::flux(rho*HbyA)
+ MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi))
)
);
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
// Update the pressure BCs to ensure flux consistency
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
fvm::ddt(psi, p)
+ fvc::div(phiHbyA)
- fvm::laplacian(rhorAUf, p)
==
coalParcels.Srho()
+ fvOptions(psi, p, rho.name())
);
pEqn.solve();
if (pimple.finalNonOrthogonalIter())
{
phi = phiHbyA + pEqn.flux();
}
}
}
#include "rhoEqn.H"
#include "compressibleContinuityErrs.H"
U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions();
fvOptions.correct(U);
K = 0.5*magSqr(U);
if (thermo.dpdt())
{
dpdt = fvc::ddt(p);
}

View File

@ -1,47 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 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)
==
coalParcels.Srho(rho)
+ fvOptions(rho)
);
rhoEqn.solve();
fvOptions.correct(rho);
}
// ************************************************************************* //

View File

@ -1,135 +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
(
(coalParcels.hsTrans() + limestoneParcels.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;
}
// ************************************************************************* //

View File

@ -1,7 +1,7 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
wclean libso DPMMomentumTransportModels
wclean libso denseParticleMomentumTransportModels
wclean
wclean MPPICFoam

View File

@ -4,9 +4,8 @@ cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
wmake $targetType DPMMomentumTransportModels
wmake $targetType denseParticleMomentumTransportModels
wmake $targetType
wmake $targetType MPPICFoam
#------------------------------------------------------------------------------

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -0,0 +1,3 @@
denseParticleFoam.C
EXE = $(FOAM_APPBIN)/denseParticleFoam

View File

@ -1,8 +1,7 @@
EXE_INC = \
-I.. \
-I../DPMMomentumTransportModels/lnInclude \
-I./denseParticleMomentumTransportModels/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/lagrangian/parcel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
@ -19,12 +18,12 @@ EXE_INC = \
EXE_LIBS = \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-llagrangianParcel \
-llagrangianParcelTurbulence \
-lincompressibleTransportModels \
-lmomentumTransportModels \
-lincompressibleMomentumTransportModels \
-lDPMMomentumTransportModels \
-ldenseParticleMomentumTransportModels \
-lfiniteVolume \
-ldynamicFvMesh \
-ltopoChangerFvMesh \

View File

@ -12,11 +12,17 @@ UcEqn.relax();
fvOptions.constrain(UcEqn);
volScalarField rAUc(1.0/UcEqn.A());
surfaceScalarField rAUcf("Dp", fvc::interpolate(rAUc));
volScalarField rASpUc(1.0/(UcEqn.A() - cloudSUp/rhoc));
surfaceScalarField rASpUcf("Dp", fvc::interpolate(rASpUc));
surfaceScalarField phicForces
surfaceScalarField phicSUSu
(
fvc::flux(rAUc*cloudVolSUSu/rhoc) + rAUcf*(g & mesh.Sf())
fvc::flux(rASpUc*cloudSUu/rhoc)
+ rASpUcf*(g & mesh.Sf())
);
surfaceScalarField phicSUSp
(
fvc::interpolate(rASpUc*cloudSUp/rhoc)
);
if (pimple.momentumPredictor())
@ -27,8 +33,10 @@ if (pimple.momentumPredictor())
==
fvc::reconstruct
(
phicForces/rAUcf - fvc::snGrad(p)*mesh.magSf()
(phicSUSu + phicSUSp*phic)/rASpUcf
- fvc::snGrad(p)*mesh.magSf()
)
+ (1.0/rhoc)*(fvm::Sp(cloudSUp, Uc) - cloudSUp*Uc)
);
fvOptions.correct(Uc);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -122,29 +122,17 @@ volScalarField alphac
dimensionedScalar(dimless, 0)
);
word kinematicCloudName("kinematicCloud");
args.optionReadIfPresent("cloudName", kinematicCloudName);
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
basicKinematicTypeCloud kinematicCloud
(
kinematicCloudName,
rhoc,
Uc,
muc,
g
);
Info<< "Constructing clouds" << endl;
parcelCloudList clouds(rhoc, Uc, muc, g);
// Particle fraction upper limit
scalar alphacMin
(
1.0
- kinematicCloud.particleProperties().subDict("constantProperties")
.lookup<scalar>("alphaMax")
1 - mesh.solverDict(alphac.name()).lookup<scalar>("max")
);
// Update alphac from the particle locations
alphac = max(1.0 - kinematicCloud.theta(), alphacMin);
alphac = max(1.0 - clouds.theta(), alphacMin);
alphac.correctBoundaryConditions();
surfaceScalarField alphacf("alphacf", fvc::interpolate(alphac));

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -0,0 +1,241 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-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/>.
Application
denseParticleFoam
Description
Transient solver for the coupled transport of particle clouds including the
effect of the volume fraction of particles on the continuous phase, with
optional mesh motion and mesh topology changes.
\*---------------------------------------------------------------------------*/
#include "NamedEnum.H"
namespace Foam
{
enum class cloudForceSplit
{
faceExplicitCellImplicit, // Implicit part of the cloud force added to
// the cell momentum equation. Explicit part
// to the face momentum equation. This is the
// least likely to create staggering patterns
// in the velocity field, but it can create
// unphysical perturbations in cell
// velocities even when particles and flow
// have the similar velocities.
faceExplicitCellLagged, // Entire cloud force evaluated explicitly
// and added to the face momentum equation.
// Lagged correction (i.e.,
// fvm::Sp(cloudSU.diag(), Uc) -
// cloudSU.diag()*Uc) added to the cell
// momentum equation. This creates physical
// cell velocities when particles and flow
// have the same velocity, but can also
// result in staggering patterns in packed
// beds. Unsuitable for MPPIC.
faceImplicit // Implicit and explicit parts of the force
// both added to the face momentum equation.
// Behaves somewhere between the other two.
};
template<>
const char* NamedEnum<cloudForceSplit, 3>::names[] =
{
"faceExplicitCellImplicit",
"faceExplicitCellLagged",
"faceImplicit"
};
const NamedEnum<cloudForceSplit, 3> cloudForceSplitNames;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "fvCFD.H"
#include "dynamicFvMesh.H"
#include "singlePhaseTransportModel.H"
#include "PhaseIncompressibleMomentumTransportModel.H"
#include "pimpleControl.H"
#include "CorrectPhi.H"
#include "fvOptions.H"
#include "parcelCloudList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "setRootCaseLists.H"
#include "createTime.H"
#include "createDynamicFvMesh.H"
#include "createDyMControls.H"
#include "createFields.H"
#include "createUcfIfPresent.H"
#include "initContinuityErrs.H"
Info<< "\nStarting time loop\n" << endl;
while (pimple.run(runTime))
{
#include "readDyMControls.H"
#include "CourantNo.H"
#include "setDeltaT.H"
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
// Store the particle positions
clouds.storeGlobalPositions();
mesh.update();
if (mesh.changing())
{
if (correctPhi)
{
// Calculate absolute flux from the mapped surface velocity
phic = mesh.Sf() & Ucf();
#include "correctPhic.H"
// Make the flux relative to the mesh motion
fvc::makeRelative(phic, Uc);
}
if (checkMeshCourantNo)
{
#include "meshCourantNo.H"
}
}
continuousPhaseTransport.correct();
muc = rhoc*continuousPhaseTransport.nu();
clouds.evolve();
// Update continuous phase volume fraction field
alphac = max(1.0 - clouds.theta(), alphacMin);
alphac.correctBoundaryConditions();
alphacf = fvc::interpolate(alphac);
alphaPhic = alphacf*phic;
// Cloud forces
fvVectorMatrix cloudSU(clouds.SU(Uc));
volVectorField cloudSUu
(
IOobject
(
"cloudSUu",
runTime.timeName(),
mesh
),
mesh,
dimensionedVector(dimForce/dimVolume, Zero),
zeroGradientFvPatchVectorField::typeName
);
volScalarField cloudSUp
(
IOobject
(
"cloudSUp",
runTime.timeName(),
mesh
),
mesh,
dimensionedScalar(dimForce/dimVelocity/dimVolume, Zero),
zeroGradientFvPatchVectorField::typeName
);
const cloudForceSplit cloudSUSplit =
pimple.dict().found("cloudForceSplit")
? cloudForceSplitNames.read(pimple.dict().lookup("cloudForceSplit"))
: cloudForceSplit::faceExplicitCellImplicit;
switch (cloudSUSplit)
{
case cloudForceSplit::faceExplicitCellImplicit:
cloudSUu.primitiveFieldRef() = -cloudSU.source()/mesh.V();
cloudSUu.correctBoundaryConditions();
cloudSUp.primitiveFieldRef() = Zero;
cloudSUp.correctBoundaryConditions();
//cloudSU.diag() = cloudSU.diag();
cloudSU.source() = Zero;
break;
case cloudForceSplit::faceExplicitCellLagged:
cloudSUu.primitiveFieldRef() =
(cloudSU.diag()*Uc() - cloudSU.source())/mesh.V();
cloudSUu.correctBoundaryConditions();
cloudSUp.primitiveFieldRef() = Zero;
cloudSUp.correctBoundaryConditions();
//cloudSU.diag() = cloudSU.diag();
cloudSU.source() = cloudSU.diag()*Uc();
break;
case cloudForceSplit::faceImplicit:
cloudSUu.primitiveFieldRef() = -cloudSU.source()/mesh.V();
cloudSUu.correctBoundaryConditions();
cloudSUp.primitiveFieldRef() = cloudSU.diag()/mesh.V();
cloudSUp.correctBoundaryConditions();
cloudSU.diag() = Zero;
cloudSU.source() = Zero;
break;
}
// --- Pressure-velocity PIMPLE corrector loop
while (pimple.loop())
{
#include "UcEqn.H"
// --- PISO loop
while (pimple.correct())
{
#include "pEqn.H"
}
if (pimple.turbCorr())
{
continuousPhaseTurbulence->correct();
}
}
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //

View File

@ -0,0 +1,3 @@
denseParticleMomentumTransportModels.C
LIB = $(FOAM_LIBBIN)/libdenseParticleMomentumTransportModels

View File

@ -1,35 +1,37 @@
{
volVectorField HbyA(constrainHbyA(rAUc*UcEqn.H(), Uc, p));
volVectorField HbyASp(rASpUc/rAUc*HbyA);
surfaceScalarField phiHbyA
surfaceScalarField phiHbyASp
(
"phiHbyA",
"phiHbyASp",
(
fvc::flux(HbyA)
+ alphacf*rAUcf*fvc::ddtCorr(Uc, phic, Ucf)
fvc::flux(HbyASp)
+ alphacf*rASpUcf*fvc::ddtCorr(Uc, phic, Ucf)
)
);
if (p.needReference())
{
fvc::makeRelative(phiHbyA, Uc);
adjustPhi(phiHbyA, Uc, p);
fvc::makeAbsolute(phiHbyA, Uc);
fvc::makeRelative(phiHbyASp, Uc);
adjustPhi(phiHbyASp, Uc, p);
fvc::makeAbsolute(phiHbyASp, Uc);
}
phiHbyA += phicForces;
phiHbyASp += phicSUSu;
// Update the pressure BCs to ensure flux consistency
constrainPressure(p, Uc, phiHbyA, rAUcf);
constrainPressure(p, Uc, phiHbyASp, rASpUcf);
// Non-orthogonal pressure corrector loop
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
fvm::laplacian(alphacf*rAUcf, p)
fvm::laplacian(alphacf*rASpUcf, p)
==
fvc::ddt(alphac) + fvc::div(alphacf*phiHbyA)
fvc::ddt(alphac)
+ fvc::div(alphacf*phiHbyASp)
);
pEqn.setReference(pRefCell, pRefValue);
@ -38,13 +40,18 @@
if (pimple.finalNonOrthogonalIter())
{
phic = phiHbyA - pEqn.flux()/alphacf;
phic = phiHbyASp - pEqn.flux()/alphacf;
// Explicitly relax pressure for momentum corrector
p.relax();
Uc = HbyA
+ rAUc
*fvc::reconstruct((phicForces - pEqn.flux()/alphacf)/rAUcf);
Uc =
HbyA
+ rAUc
*fvc::reconstruct
(
(phicSUSu + phicSUSp*phic - pEqn.flux()/alphacf)/rASpUcf
);
Uc.correctBoundaryConditions();
fvOptions.correct(Uc);

View File

@ -1,6 +1,6 @@
EXE_INC = \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/lagrangian/parcel/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/lnInclude \
@ -12,8 +12,8 @@ EXE_INC = \
EXE_LIBS = \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-llagrangianParcel \
-llagrangianParcelTurbulence \
-lmomentumTransportModels \
-lincompressibleMomentumTransportModels \
-lincompressibleTransportModels \

View File

@ -57,18 +57,8 @@ volScalarField mu
laminarTransport.nu()*rhoInfValue
);
word kinematicCloudName("kinematicCloud");
args.optionReadIfPresent("cloudName", kinematicCloudName);
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
basicKinematicCollidingCloud kinematicCloud
(
kinematicCloudName,
rhoInf,
U,
mu,
g
);
Info<< "Constructing clouds" << endl;
parcelCloudList clouds(rhoInf, U, mu, g);
IOobject Hheader
(

View File

@ -36,19 +36,12 @@ Description
#include "dynamicFvMesh.H"
#include "singlePhaseTransportModel.H"
#include "kinematicMomentumTransportModel.H"
#include "basicKinematicCollidingCloud.H"
#include "parcelCloudList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
argList::addOption
(
"cloudName",
"name",
"specify alternative cloud name. default is 'kinematicCloud'"
);
#define NO_CONTROL
#include "postProcess.H"
@ -66,7 +59,7 @@ int main(int argc, char *argv[])
{
Info<< "Time = " << runTime.timeName() << nl << endl;
kinematicCloud.storeGlobalPositions();
clouds.storeGlobalPositions();
mesh.update();
@ -76,11 +69,9 @@ int main(int argc, char *argv[])
}
laminarTransport.correct();
Info<< "Evolving " << kinematicCloud.name() << endl;
mu = laminarTransport.nu()*rhoInfValue;
kinematicCloud.evolve();
clouds.evolve();
runTime.write();

View File

@ -1,3 +0,0 @@
reactingParcelFoam.C
EXE = $(FOAM_APPBIN)/reactingParcelFoam

View File

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

View File

@ -1,139 +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/>.
Application
reactingParcelFoam
Description
Transient solver for compressible, turbulent flow with a reacting,
multiphase particle cloud, and surface film modelling.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "fluidThermoMomentumTransportModel.H"
#include "rhoReactionThermophysicalTransportModel.H"
#include "basicReactingMultiphaseCloud.H"
#include "surfaceFilmModel.H"
#include "rhoReactionThermo.H"
#include "CombustionModel.H"
#include "radiationModel.H"
#include "SLGThermo.H"
#include "fvOptions.H"
#include "pimpleControl.H"
#include "pressureControl.H"
#include "localEulerDdtScheme.H"
#include "fvcSmooth.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "setRootCaseLists.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
#include "createTimeControls.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "initContinuityErrs.H"
turbulence->validate();
if (!LTS)
{
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (pimple.run(runTime))
{
#include "readTimeControls.H"
if (LTS)
{
#include "setRDeltaT.H"
}
else
{
#include "compressibleCourantNo.H"
#include "setMultiRegionDeltaT.H"
}
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
parcels.evolve();
surfaceFilm.evolve();
if (solvePrimaryRegion)
{
if (pimple.firstPimpleIter() && !pimple.simpleRho())
{
#include "rhoEqn.H"
}
// --- PIMPLE loop
while (pimple.loop())
{
#include "UEqn.H"
#include "YEqn.H"
#include "EEqn.H"
// --- Pressure corrector loop
while (pimple.correct())
{
#include "pEqn.H"
}
if (pimple.turbCorr())
{
turbulence->correct();
thermophysicalTransport->correct();
}
}
}
rho = thermo.rho();
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End" << endl;
return 0;
}
// ************************************************************************* //

View File

@ -1,3 +0,0 @@
simpleReactingParcelFoam.C
EXE = $(FOAM_APPBIN)/simpleReactingParcelFoam

View File

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

View File

@ -18,7 +18,7 @@
+ thermophysicalTransport->divq(he)
==
rho*(U&g)
+ parcels.Sh(he)
+ clouds.Sh(he)
+ surfaceFilm.Sh()
+ radiation->Sh(thermo, he)
+ combustion->Qdot()

View File

@ -0,0 +1,3 @@
reactingParticleFoam.C
EXE = $(FOAM_APPBIN)/reactingParticleFoam

View File

@ -1,9 +1,9 @@
EXE_INC = \
-I. \
-I../reactingParcelFoam \
-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 \
@ -19,16 +19,16 @@ EXE_INC = \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/lagrangian/parcel/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude \
-I$(FOAM_SOLVERS)/combustion/reactingFoam
-I$(LIB_SRC)/combustionModels/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lsampling \
-lmeshTools \
-ldynamicFvMesh \
-lmomentumTransportModels \
-lfluidThermoMomentumTransportModels \
-lthermophysicalTransportModels \
@ -43,7 +43,7 @@ EXE_LIBS = \
-lsurfaceFilmModels \
-lsurfaceFilmDerivedFvPatchFields \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-llagrangianParcel \
-llagrangianParcelTurbulence \
-lODE \
-lcombustionModels

View File

@ -7,8 +7,7 @@
+ turbulence->divDevTau(U)
==
rho()*g
+ coalParcels.SU(U)
+ limestoneParcels.SU(U)
+ clouds.SU(U)
+ fvOptions(rho, U)
);

View File

@ -9,7 +9,6 @@ tmp<fv::convectionScheme<scalar>> mvConvection
)
);
{
combustion->correct();
volScalarField Yt(0.0*Y[0]);
@ -26,7 +25,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
+ mvConvection->fvmDiv(phi, Yi)
+ thermophysicalTransport->divj(Yi)
==
parcels.SYi(i, Yi)
clouds.SYi(i, Yi)
+ fvOptions(rho, Yi)
+ combustion->R(Yi)
+ surfaceFilm.Srho(i)

View File

@ -0,0 +1,3 @@
buoyantReactingParticleFoam.C
EXE = $(FOAM_APPBIN)/buoyantReactingParticleFoam

View File

@ -1,17 +1,14 @@
EXE_INC = \
-I. \
-I.. \
-I../../reactingParcelFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/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/psiReactionThermo/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/lagrangian/spray/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/rhoReactionThermo/lnInclude \
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
@ -20,35 +17,34 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/radiationModels/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude \
-I$(LIB_SRC)/engine/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 \
-lmeshTools \
-lfvOptions \
-lsampling \
-lmeshTools \
-ldynamicFvMesh \
-lmomentumTransportModels \
-lfluidThermoMomentumTransportModels \
-lthermophysicalTransportModels \
-lpsiReactionThermophysicalTransportModels \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-llagrangianSpray \
-lrhoReactionThermophysicalTransportModels \
-lspecie \
-lfluidThermophysicalModels \
-lthermophysicalProperties \
-lreactionThermophysicalModels \
-lSLGThermo \
-lchemistryModel \
-lradiationModels \
-lODE \
-lengine \
-lregionModels \
-lradiationModels \
-lsurfaceFilmModels \
-lfvOptions \
-lsurfaceFilmDerivedFvPatchFields \
-llagrangian \
-llagrangianParcel \
-llagrangianParcelTurbulence \
-lODE \
-lcombustionModels

View File

@ -6,7 +6,7 @@
+ MRF.DDt(rho, U)
+ turbulence->divDevTau(U)
==
parcels.SU(U)
clouds.SU(U)
+ fvOptions(rho, U)
);

View File

@ -22,26 +22,27 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
coalChemistryFoam
buoyantReactingParticleFoam
Description
Transient solver for compressible, turbulent flow, with coal and limestone
particle clouds, an energy source, and combustion.
Transient solver for buoyant, compressible, turbulent flow with a particle
cloud and surface film modelling.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "dynamicFvMesh.H"
#include "fluidThermoMomentumTransportModel.H"
#include "psiReactionThermophysicalTransportModel.H"
#include "basicThermoCloud.H"
#include "coalCloud.H"
#include "psiReactionThermo.H"
#include "rhoReactionThermophysicalTransportModel.H"
#include "parcelCloudList.H"
#include "surfaceFilmModel.H"
#include "CombustionModel.H"
#include "fvOptions.H"
#include "radiationModel.H"
#include "SLGThermo.H"
#include "fvOptions.H"
#include "pimpleControl.H"
#include "pressureControl.H"
#include "CorrectPhi.H"
#include "localEulerDdtScheme.H"
#include "fvcSmooth.H"
@ -53,12 +54,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 "initContinuityErrs.H"
#include "createRhoUfIfPresent.H"
turbulence->validate();
@ -74,7 +75,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 (solvePrimaryRegion && correctPhi)
{
divrhoU = new volScalarField
(
"divrhoU",
fvc::div(fvc::absolute(phi, rho, U))
);
}
if (LTS)
{
@ -83,24 +97,62 @@ int main(int argc, char *argv[])
else
{
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
#include "setMultiRegionDeltaT.H"
}
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
rhoEffLagrangian = coalParcels.rhoEff() + limestoneParcels.rhoEff();
pDyn = 0.5*rho*magSqr(U);
// Store momentum to set rhoUf for introduced faces.
autoPtr<volVectorField> rhoU;
if (solvePrimaryRegion && rhoUf.valid())
{
rhoU = new volVectorField("rhoU", rho*U);
}
coalParcels.evolve();
// Store the particle positions
clouds.storeGlobalPositions();
limestoneParcels.evolve();
// Do any mesh changes
mesh.update();
#include "rhoEqn.H"
if (solvePrimaryRegion && mesh.changing())
{
gh = (g & mesh.C()) - ghRef;
ghf = (g & mesh.Cf()) - ghRef;
// --- Pressure-velocity PIMPLE corrector loop
while (pimple.loop())
MRF.update();
if (correctPhi)
{
// Calculate absolute flux
// from the mapped surface velocity
phi = mesh.Sf() & rhoUf();
#include "../../compressible/rhoPimpleFoam/correctPhi.H"
// Make the fluxes relative to the mesh-motion
fvc::makeRelative(phi, rho, U);
}
if (checkMeshCourantNo)
{
#include "meshCourantNo.H"
}
}
clouds.evolve();
surfaceFilm.evolve();
if (solvePrimaryRegion && !pimple.simpleRho())
{
#include "rhoEqn.H"
}
// --- PIMPLE loop
while (solvePrimaryRegion && pimple.loop())
{
#include "UEqn.H"
#include "YEqn.H"
@ -128,7 +180,7 @@ int main(int argc, char *argv[])
<< nl << endl;
}
Info<< "End\n" << endl;
Info<< "End" << endl;
return 0;
}

View File

@ -94,12 +94,10 @@ volScalarField dpdt
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
@ -116,7 +114,14 @@ volScalarField p_rgh
// Force p_rgh to be consistent with p
p_rgh = p - rho*gh;
pressureControl pressureControl(p, rho, pimple.dict(), false);
pressureControl pressureControl
(
p,
p_rgh,
rho,
pimple.dict(),
thermo.incompressible()
);
mesh.setFluxRequired(p_rgh.name());

View File

@ -33,7 +33,7 @@ fvScalarMatrix p_rghDDtEqn
fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh))
+ fvc::div(phiHbyA)
==
parcels.Srho()
clouds.Srho()
+ surfaceFilm.Srho()
+ fvOptions(psi, p_rgh, rho.name())
);
@ -87,7 +87,15 @@ if (pimple.simpleRho())
rho = thermo.rho();
}
// Correct rhoUf if the mesh is moving
fvc::correctRhoUf(rhoUf, rho, U, phi);
if (thermo.dpdt())
{
dpdt = fvc::ddt(p);
if (mesh.moving())
{
dpdt -= fvc::div(fvc::meshPhi(rho, U), p);
}
}

View File

@ -0,0 +1,2 @@
Info<< "\nConstructing clouds" << endl;
parcelCloudList clouds(rho, U, g, slgThermo);

View File

@ -1,8 +1,8 @@
#include "readGravitationalAcceleration.H"
#include "createRDeltaT.H"
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<psiReactionThermo> pThermo(psiReactionThermo::New(mesh));
psiReactionThermo& thermo = pThermo();
autoPtr<rhoReactionThermo> pThermo(rhoReactionThermo::New(mesh));
rhoReactionThermo& thermo = pThermo();
thermo.validate(args.executable(), "h", "e");
SLGThermo slgThermo(mesh, thermo);
@ -19,21 +19,20 @@ if (!composition.species().found(inertSpecie))
<< exit(FatalIOError);
}
volScalarField& p = thermo.p();
Info<< "Creating field rho\n" << endl;
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
mesh
),
thermo.rho()
);
volScalarField& p = thermo.p();
Info<< "\nReading field U\n" << endl;
volVectorField U
(
@ -50,30 +49,6 @@ volVectorField U
#include "compressibleCreatePhi.H"
mesh.setFluxRequired(p.name());
dimensionedScalar rhoMax
(
dimensionedScalar::lookupOrDefault
(
"rhoMax",
pimple.dict(),
dimDensity,
great
)
);
dimensionedScalar rhoMin
(
dimensionedScalar::lookupOrDefault
(
"rhoMin",
pimple.dict(),
dimDensity,
0
)
);
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::momentumTransportModel> turbulence
(
@ -87,15 +62,20 @@ autoPtr<compressible::momentumTransportModel> turbulence
);
Info<< "Creating thermophysical transport model\n" << endl;
autoPtr<psiReactionThermophysicalTransportModel> thermophysicalTransport
autoPtr<rhoReactionThermophysicalTransportModel>
thermophysicalTransport
(
psiReactionThermophysicalTransportModel::New(turbulence(), thermo)
rhoReactionThermophysicalTransportModel::New
(
turbulence(),
thermo
)
);
Info<< "Creating combustion model\n" << endl;
autoPtr<CombustionModel<psiReactionThermo>> combustion
autoPtr<CombustionModel<rhoReactionThermo>> combustion
(
CombustionModel<psiReactionThermo>::New(thermo, turbulence())
CombustionModel<rhoReactionThermo>::New(thermo, turbulence())
);
Info<< "Creating field dpdt\n" << endl;
@ -113,6 +93,19 @@ volScalarField dpdt
Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U));
#include "readGravitationalAcceleration.H"
pressureControl pressureControl
(
p,
rho,
pimple.dict(),
thermo.incompressible()
);
mesh.setFluxRequired(p.name());
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
forAll(Y, i)
@ -122,6 +115,7 @@ forAll(Y, i)
fields.add(thermo.he());
#include "createMRF.H"
#include "createClouds.H"
#include "createRadiationModel.H"
#include "createClouds.H"
#include "createSurfaceFilmModel.H"
#include "createFvOptions.H"

View File

@ -1,17 +1,14 @@
EXE_INC = \
-I. \
-I../reactingParcelFoam \
-I../../compressible/rhoPimpleFoam \
-I.. \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/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/psiReactionThermo/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/lagrangian/spray/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/rhoReactionThermo/lnInclude \
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
@ -20,36 +17,36 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/radiationModels/lnInclude \
-I$(LIB_SRC)/ODE/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)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
-I$(LIB_SRC)/engine/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lsampling \
-lmeshTools \
-ldynamicFvMesh \
-lmomentumTransportModels \
-lfluidThermoMomentumTransportModels \
-lthermophysicalTransportModels \
-lpsiReactionThermophysicalTransportModels \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-llagrangianSpray \
-lrhoReactionThermophysicalTransportModels \
-lspecie \
-lfluidThermophysicalModels \
-lthermophysicalProperties \
-lreactionThermophysicalModels \
-lSLGThermo \
-lchemistryModel \
-lradiationModels \
-lODE \
-lregionModels \
-lradiationModels \
-lsurfaceFilmModels \
-lsurfaceFilmDerivedFvPatchFields \
-llagrangian \
-llagrangianParcel \
-llagrangianParcelTurbulence \
-lODE \
-lcombustionModels \
-lfiniteVolume \
-ldynamicFvMesh \
-ltopoChangerFvMesh \
-lfvOptions \
-lmeshTools \
-lsampling
-lengine

View File

@ -31,17 +31,20 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "engineTime.H"
#include "engineMesh.H"
#include "fluidThermoMomentumTransportModel.H"
#include "psiReactionThermophysicalTransportModel.H"
#include "basicSprayCloud.H"
#include "psiReactionThermo.H"
#include "rhoReactionThermophysicalTransportModel.H"
#include "parcelCloudList.H"
#include "surfaceFilmModel.H"
#include "CombustionModel.H"
#include "radiationModel.H"
#include "SLGThermo.H"
#include "pimpleControl.H"
#include "fvOptions.H"
#include "pimpleControl.H"
#include "pressureControl.H"
#include "CorrectPhi.H"
#include "localEulerDdtScheme.H"
#include "fvcSmooth.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -54,40 +57,101 @@ int main(int argc, char *argv[])
#include "setRootCaseLists.H"
#include "createEngineTime.H"
#include "createEngineMesh.H"
#include "createControl.H"
#include "readEngineTimeControls.H"
#include "createEngineControls.H"
#include "initContinuityErrs.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
#include "initContinuityErrs.H"
#include "createRhoUfIfPresent.H"
#include "startSummary.H"
turbulence->validate();
if (!LTS)
{
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (pimple.run(runTime))
{
#include "readEngineTimeControls.H"
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
#include "readEngineControls.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<< "Engine time = " << runTime.theta() << runTime.unit() << 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.move();
parcels.evolve();
if (solvePrimaryRegion && mesh.changing())
{
MRF.update();
#include "rhoEqn.H"
if (correctPhi)
{
// Calculate absolute flux
// from the mapped surface velocity
phi = mesh.Sf() & rhoUf();
// --- Pressure-velocity PIMPLE corrector loop
while (pimple.loop())
#include "../../compressible/rhoPimpleFoam/correctPhi.H"
// Make the fluxes relative to the mesh-motion
fvc::makeRelative(phi, rho, U);
}
if (checkMeshCourantNo)
{
#include "meshCourantNo.H"
}
}
clouds.evolve();
surfaceFilm.evolve();
if (solvePrimaryRegion && !pimple.simpleRho())
{
#include "rhoEqn.H"
}
// --- PIMPLE loop
while (solvePrimaryRegion && pimple.loop())
{
#include "UEqn.H"
#include "YEqn.H"
@ -117,7 +181,7 @@ int main(int argc, char *argv[])
<< nl << endl;
}
Info<< "End\n" << endl;
Info<< "End" << endl;
return 0;
}

View File

@ -0,0 +1,90 @@
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()
+ fvOptions(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();
fvOptions.correct(U);
K = 0.5*magSqr(U);
bool limitedp = pressureControl.limit(p);
// Thermodynamic density update
thermo.correctRho(psi*p - psip0);
if (limitedp)
{
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);
}
}

View File

@ -22,27 +22,29 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
sprayFoam
reactingParticleFoam
Description
Transient solver for compressible, turbulent flow with a spray particle
cloud, with optional mesh motion and mesh topology changes.
Transient solver for compressible, turbulent flow with a particle cloud
and surface film modelling.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "dynamicFvMesh.H"
#include "momentumTransportModel.H"
#include "fluidThermophysicalTransportModel.H"
#include "psiReactionThermophysicalTransportModel.H"
#include "basicSprayCloud.H"
#include "psiReactionThermo.H"
#include "fluidThermoMomentumTransportModel.H"
#include "rhoReactionThermophysicalTransportModel.H"
#include "parcelCloudList.H"
#include "surfaceFilmModel.H"
#include "CombustionModel.H"
#include "radiationModel.H"
#include "SLGThermo.H"
#include "pimpleControl.H"
#include "CorrectPhi.H"
#include "fvOptions.H"
#include "pimpleControl.H"
#include "pressureControl.H"
#include "CorrectPhi.H"
#include "localEulerDdtScheme.H"
#include "fvcSmooth.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -54,15 +56,19 @@ int main(int argc, char *argv[])
#include "createTime.H"
#include "createDynamicFvMesh.H"
#include "createDyMControls.H"
#include "initContinuityErrs.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
#include "initContinuityErrs.H"
#include "createRhoUfIfPresent.H"
turbulence->validate();
if (!LTS)
{
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
@ -75,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 (correctPhi)
if (solvePrimaryRegion && correctPhi)
{
divrhoU = new volScalarField
(
@ -84,8 +90,15 @@ int main(int argc, char *argv[])
);
}
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
if (LTS)
{
#include "setRDeltaT.H"
}
else
{
#include "compressibleCourantNo.H"
#include "setMultiRegionDeltaT.H"
}
runTime++;
@ -93,27 +106,28 @@ int main(int argc, char *argv[])
// Store momentum to set rhoUf for introduced faces.
autoPtr<volVectorField> rhoU;
if (rhoUf.valid())
if (solvePrimaryRegion && rhoUf.valid())
{
rhoU = new volVectorField("rhoU", rho*U);
}
// Store the particle positions
parcels.storeGlobalPositions();
clouds.storeGlobalPositions();
// Do any mesh changes
mesh.update();
if (mesh.changing())
if (solvePrimaryRegion && mesh.changing())
{
MRF.update();
if (correctPhi)
{
// Calculate absolute flux from the mapped surface velocity
// Calculate absolute flux
// from the mapped surface velocity
phi = mesh.Sf() & rhoUf();
#include "correctPhi.H"
#include "../../compressible/rhoPimpleFoam/correctPhi.H"
// Make the fluxes relative to the mesh-motion
fvc::makeRelative(phi, rho, U);
@ -125,12 +139,16 @@ int main(int argc, char *argv[])
}
}
parcels.evolve();
clouds.evolve();
surfaceFilm.evolve();
#include "rhoEqn.H"
if (solvePrimaryRegion && !pimple.simpleRho())
{
#include "rhoEqn.H"
}
// --- Pressure-velocity PIMPLE corrector loop
while (pimple.loop())
// --- PIMPLE loop
while (solvePrimaryRegion && pimple.loop())
{
#include "UEqn.H"
#include "YEqn.H"
@ -158,7 +176,7 @@ int main(int argc, char *argv[])
<< nl << endl;
}
Info<< "End\n" << endl;
Info<< "End" << endl;
return 0;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -35,7 +35,7 @@ Description
fvm::ddt(rho)
+ fvc::div(phi)
==
parcels.Srho(rho)
clouds.Srho(rho)
+ surfaceFilm.Srho()
+ fvOptions(rho)
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -78,7 +78,7 @@ License
(
mag
(
parcels.hsTrans()/(mesh.V()*runTime.deltaT())
clouds.hsTrans()/(mesh.V()*runTime.deltaT())
+ combustion->Qdot()()
)
/(

View File

@ -1,6 +1,6 @@
EXE_INC = \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/lagrangian/parcel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
@ -15,8 +15,8 @@ EXE_INC = \
EXE_LIBS = \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-llagrangianParcel \
-llagrangianParcelTurbulence \
-lfluidThermophysicalModels \
-lspecie \
-lradiationModels \

View File

@ -49,17 +49,5 @@ autoPtr<compressible::momentumTransportModel> turbulence
)
);
const word kinematicCloudName
(
args.optionLookupOrDefault<word>("cloudName", "kinematicCloud")
);
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
basicKinematicCloud kinematicCloud
(
kinematicCloudName,
rho,
U,
thermo.mu(),
g
);
Info<< "Constructing clouds" << endl;
parcelCloudList clouds(rho, U, thermo.mu(), g);

View File

@ -35,19 +35,12 @@ Description
#include "dynamicFvMesh.H"
#include "psiThermo.H"
#include "fluidThermoMomentumTransportModel.H"
#include "basicKinematicCloud.H"
#include "parcelCloudList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
argList::addOption
(
"cloudName",
"name",
"specify alternative cloud name. default is 'kinematicCloud'"
);
#define NO_CONTROL
#include "postProcess.H"
@ -65,7 +58,7 @@ int main(int argc, char *argv[])
{
Info<< "Time = " << runTime.timeName() << nl << endl;
kinematicCloud.storeGlobalPositions();
clouds.storeGlobalPositions();
mesh.update();
@ -74,8 +67,7 @@ int main(int argc, char *argv[])
U.correctBoundaryConditions();
}
Info<< "Evolving " << kinematicCloud.name() << endl;
kinematicCloud.evolve();
clouds.evolve();
runTime.write();

View File

@ -12,7 +12,7 @@
+ thermophysicalTransport->divq(he)
==
rho*(U&g)
+ parcels.Sh(he)
+ clouds.Sh(he)
+ radiation->Sh(thermo, he)
+ combustion->Qdot()
+ fvOptions(rho, he)

View File

@ -0,0 +1,3 @@
simpleReactingParticleFoam.C
EXE = $(FOAM_APPBIN)/simpleReactingParticleFoam

View File

@ -7,8 +7,7 @@ EXE_INC = \
-I$(LIB_SRC)/ThermophysicalTransportModels/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/rhoReactionThermo/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/lagrangian/coalCombustion/lnInclude \
-I$(LIB_SRC)/lagrangian/parcel/lnInclude \
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
@ -21,8 +20,7 @@ EXE_INC = \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(FOAM_SOLVERS)/combustion/reactingFoam
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \
@ -33,8 +31,8 @@ EXE_LIBS = \
-lthermophysicalTransportModels \
-lrhoReactionThermophysicalTransportModels \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-llagrangianParcel \
-llagrangianParcelTurbulence \
-lspecie \
-lfluidThermophysicalModels \
-lthermophysicalProperties \

View File

@ -7,7 +7,7 @@
+ turbulence->divDevTau(U)
==
rho()*g
+ parcels.SU(U)
+ clouds.SU(U)
+ fvOptions(rho, U)
);
fvVectorMatrix& UEqn = tUEqn.ref();

View File

@ -24,7 +24,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
mvConvection->fvmDiv(phi, Yi)
+ thermophysicalTransport->divj(Yi)
==
parcels.SYi(i, Yi)
clouds.SYi(i, Yi)
+ combustion->R(Yi)
+ fvOptions(rho, Yi)
);

View File

@ -0,0 +1,2 @@
Info<< "\nConstructing clouds" << endl;
parcelCloudList clouds(rho, U, g, slgThermo);

View File

@ -1,3 +1,3 @@
const volScalarField& T = thermo.T();
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
const label inertIndex(composition.species()[inertSpecie]);

View File

@ -24,7 +24,7 @@ while (simple.correctNonOrthogonal())
fvc::div(phiHbyA)
- fvm::laplacian(rhorAUf, p)
==
parcels.Srho()
clouds.Srho()
+ fvOptions(psi, p, rho.name())
);

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
simpleReactingParcelFoam
simpleReactingParticleFoam
Description
Steady state solver for compressible, turbulent flow with reacting,
@ -33,7 +33,7 @@ Description
#include "fvCFD.H"
#include "fluidThermoMomentumTransportModel.H"
#include "rhoReactionThermophysicalTransportModel.H"
#include "basicReactingMultiphaseCloud.H"
#include "parcelCloudList.H"
#include "rhoReactionThermo.H"
#include "CombustionModel.H"
#include "radiationModel.H"
@ -66,7 +66,7 @@ int main(int argc, char *argv[])
{
Info<< "Time = " << runTime.timeName() << nl << endl;
parcels.evolve();
clouds.evolve();
// --- Pressure-velocity SIMPLE corrector loop
{

View File

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

View File

@ -1,3 +0,0 @@
sprayFoam.C
EXE = $(FOAM_APPBIN)/sprayFoam

View File

@ -1,27 +0,0 @@
// Solve the Momentum equation
MRF.correctBoundaryVelocity(U);
tmp<fvVectorMatrix> tUEqn
(
fvm::ddt(rho, U) + fvm::div(phi, U)
+ MRF.DDt(rho, U)
+ turbulence->divDevTau(U)
==
rho()*g
+ parcels.SU(U)
+ fvOptions(rho, U)
);
fvVectorMatrix& UEqn = tUEqn.ref();
UEqn.relax();
fvOptions.constrain(UEqn);
if (pimple.momentumPredictor())
{
solve(UEqn == -fvc::grad(p));
fvOptions.correct(U);
K = 0.5*magSqr(U);
}

View File

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

View File

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

View File

@ -1,119 +0,0 @@
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.relax();
volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
if (pimple.nCorrPiso() <= 1)
{
tUEqn.clear();
}
if (pimple.transonic())
{
surfaceScalarField phid
(
"phid",
fvc::interpolate(psi)
*(
fvc::flux(HbyA)
+ MRF.zeroFilter
(
rhorAUf*fvc::ddtCorr(rho, U, phi, rhoUf)/fvc::interpolate(rho)
)
)
);
fvc::makeRelative(phid, psi, U);
MRF.makeRelative(fvc::interpolate(psi), phid);
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
fvm::ddt(psi, p)
+ fvm::div(phid, p)
- fvm::laplacian(rhorAUf, p)
==
parcels.Srho()
+ fvOptions(psi, p, rho.name())
);
pEqn.solve();
if (pimple.finalNonOrthogonalIter())
{
phi == pEqn.flux();
}
}
}
else
{
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);
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
fvm::ddt(psi, p)
+ fvc::div(phiHbyA)
- fvm::laplacian(rhorAUf, p)
==
parcels.Srho()
+ fvOptions(psi, p, rho.name())
);
pEqn.solve();
if (pimple.finalNonOrthogonalIter())
{
phi = phiHbyA + pEqn.flux();
}
}
}
#include "rhoEqn.H"
#include "compressibleContinuityErrs.H"
// Explicitly relax pressure for momentum corrector
p.relax();
// Recalculate density from the relaxed pressure
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.relax();
Info<< "rho max/min : " << max(rho).value()
<< " " << min(rho).value() << endl;
U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions();
fvOptions.correct(U);
K = 0.5*magSqr(U);
// Correct rhoUf if the mesh is moving
fvc::correctRhoUf(rhoUf, rho, U, phi);
if (thermo.dpdt())
{
dpdt = fvc::ddt(p);
if (mesh.moving())
{
dpdt -= fvc::div(fvc::meshPhi(rho, U), p);
}
}

View File

@ -1,47 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 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)
==
parcels.Srho(rho)
+ fvOptions(rho)
);
rhoEqn.solve();
fvOptions.correct(rho);
}
// ************************************************************************* //

View File

@ -1,14 +0,0 @@
EXE_INC = \
-DFULLDEBUG -g -O0 \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/radiationModels/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
-llagrangianIntermediate \
-lradiationModels \
-lregionModels \
-lfiniteVolume \
-lmeshTools \
-lsampling

58
bin/DPMFoam Executable file
View File

@ -0,0 +1,58 @@
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | Website: https://openfoam.org
# \\ / A nd | Copyright (C) 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/>.
#
# Script
# DPMFoam
#
# Description
# Script to inform the user that DPMFoam has been replaced by the more
# general denseParticleFoam solver.
#
#------------------------------------------------------------------------------
cat << EOF
The DPMFoam solver has solver has been replaced by the more general
denseParticleFoam solver, which supports incompressible flow, including the
effect of the volume fraction of particles on the continuous phase, coupled to
multiple run-time-selectable lagrangian clouds.
To run with a single cloud rename the constant/*CloudProperties file to
constant/cloudProperties.
To run with a multiple clouds create a constant/clouds file with a list of the
names of clouds in it. Each cloud then has a corresponding
constant/<cloudName>Properties file.
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 DPMFoam:
\$FOAM_TUTORIALS/lagrangian/denseParticleFoam/Goldschmidt
EOF
#------------------------------------------------------------------------------

58
bin/MPPICFoam Executable file
View File

@ -0,0 +1,58 @@
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | Website: https://openfoam.org
# \\ / A nd | Copyright (C) 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/>.
#
# Script
# MPPICFoam
#
# Description
# Script to inform the user that MPPICFoam has been replaced by the more
# general denseParticleFoam solver.
#
#------------------------------------------------------------------------------
cat << EOF
The MPPICFoam solver has solver has been replaced by the more general
denseParticleFoam solver, which supports incompressible flow, including the
effect of the volume fraction of particles on the continuous phase, coupled to
multiple run-time-selectable lagrangian clouds.
To run with a single cloud rename the constant/*CloudProperties file to
constant/cloudProperties.
To run with a multiple clouds create a constant/clouds file with a list of the
names of clouds in it. Each cloud then has a corresponding
constant/<cloudName>Properties file.
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 MPPICFoam:
\$FOAM_TUTORIALS/lagrangian/denseParticleFoam/GoldschmidtMPPIC
EOF
#------------------------------------------------------------------------------

57
bin/coalChemistryFoam Executable file
View File

@ -0,0 +1,57 @@
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | Website: https://openfoam.org
# \\ / A nd | Copyright (C) 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/>.
#
# Script
# coalChemistryFoam
#
# Description
# Script to inform the user that coalChemistryFoam has been replaced by the
# more general reactingParticleFoam solver.
#
#------------------------------------------------------------------------------
cat << EOF
The coalChemistryFoam solver has solver has been replaced by the more general
reactingParticleFoam 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
constant/cloudProperties.
To run with a multiple clouds create a constant/clouds file with a list of the
names of clouds in it. Each cloud then has a corresponding
constant/<cloudName>Properties file.
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 coalChemistryFoam:
\$FOAM_TUTORIALS/lagrangian/reactingParticleFoam/simplifiedSiwek
EOF
#------------------------------------------------------------------------------

58
bin/reactingParcelFoam Executable file
View File

@ -0,0 +1,58 @@
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | Website: https://openfoam.org
# \\ / A nd | Copyright (C) 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/>.
#
# Script
# reactingParcelFoam
#
# Description
# Script to inform the user that reactingParcelFoam has been replaced by the
# more general buoyantReactingParticleFoam solver.
#
#------------------------------------------------------------------------------
cat << EOF
The reactingParcelFoam solver has solver has been replaced by the more general
buoyantReactingParticleFoam solver, which supports buoyant 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
constant/cloudProperties.
To run with a multiple clouds create a constant/clouds file with a list of the
names of clouds in it. Each cloud then has a corresponding
constant/<cloudName>Properties file.
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:
\$FOAM_TUTORIALS/lagrangian/buoyantReactingParticleFoam/splashPanel
EOF
#------------------------------------------------------------------------------

58
bin/simpleReactingParcelFoam Executable file
View File

@ -0,0 +1,58 @@
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | Website: https://openfoam.org
# \\ / A nd | Copyright (C) 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/>.
#
# Script
# simpleReactingParcelFoam
#
# Description
# Script to inform the user that simpleReactingParcelFoam has been replaced
# by the more general simpleReactingParticleFoam solver.
#
#------------------------------------------------------------------------------
cat << EOF
The simpleReactingParcelFoam solver has solver has been replaced by the more
general simpleReactingParticleFoam solver, which supports buoyant 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
constant/cloudProperties.
To run with a multiple clouds create a constant/clouds file with a list of the
names of clouds in it. Each cloud then has a corresponding
constant/<cloudName>Properties file.
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 simpleReactingParcelFoam:
\$FOAM_TUTORIALS/lagrangian/simpleReactingParticleFoam/verticalChannel
EOF
#------------------------------------------------------------------------------

57
bin/sprayFoam Executable file
View File

@ -0,0 +1,57 @@
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | Website: https://openfoam.org
# \\ / A nd | Copyright (C) 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/>.
#
# Script
# sprayFoam
#
# Description
# Script to inform the user that sprayFoam has been replaced by the
# more general reactingParticleFoam solver.
#
#------------------------------------------------------------------------------
cat << EOF
The sprayFoam solver has solver has been replaced by the more general
reactingParticleFoam 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
constant/cloudProperties.
To run with a multiple clouds create a constant/clouds file with a list of the
names of clouds in it. Each cloud then has a corresponding
constant/<cloudName>Properties file.
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 sprayFoam:
\$FOAM_TUTORIALS/lagrangian/reactingParticleFoam/aachenBomb
EOF
#------------------------------------------------------------------------------

View File

@ -8,9 +8,8 @@
Description
Tracks a cloud of particles driven by the flow of the continuous phase.
The cloud is specified by a kinematicCloudProperties file in the constant
directory. A template file is provided in:
$FOAM_ETC/caseDicts/solvers/lagrangian
The cloud is specified by a cloudProperties file in the constant directory.
A template file is provided in: $FOAM_ETC/caseDicts/solvers/lagrangian
\*---------------------------------------------------------------------------*/

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class dictionary;
object kinematicCloudProperties;
object cloudProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,6 +53,10 @@ Description
//- Map 'name' to 'Name' via the predefined macro CAPITALIZE_name
#define CAPITALIZE(name) CAPITALIZE_##name
//- Convert macro expression to a string
#define STR_(x) #x
#define STR(x) STR_(x)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif

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