mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-dev-OpenCFD into develop
This commit is contained in:
@ -0,0 +1,3 @@
|
||||
simpleCoalParcelFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/simpleCoalParcelFoam
|
||||
@ -0,0 +1,57 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I${LIB_SRC}/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/coalCombustion/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||
-I$(LIB_SRC)/ODE/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(FOAM_SOLVERS)/lagrangian/reactingParcelFoam/simpleReactingParcelFoam
|
||||
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lturbulenceModels \
|
||||
-lcompressibleTurbulenceModels \
|
||||
-llagrangian \
|
||||
-llagrangianIntermediate \
|
||||
-llagrangianTurbulence \
|
||||
-lspecie \
|
||||
-lfluidThermophysicalModels \
|
||||
-lliquidProperties \
|
||||
-lliquidMixtureProperties \
|
||||
-lsolidProperties \
|
||||
-lsolidMixtureProperties \
|
||||
-lthermophysicalFunctions \
|
||||
-lreactionThermophysicalModels \
|
||||
-lSLGThermo \
|
||||
-lchemistryModel \
|
||||
-lradiationModels \
|
||||
-lODE \
|
||||
-lregionModels \
|
||||
-lsurfaceFilmModels \
|
||||
-lcombustionModels \
|
||||
-lfvOptions \
|
||||
-lsampling \
|
||||
-lcoalCombustion
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
Info<< "\nConstructing coal cloud" << endl;
|
||||
coalCloud parcels
|
||||
(
|
||||
"reactingCloud1",
|
||||
rho,
|
||||
U,
|
||||
g,
|
||||
slgThermo
|
||||
);
|
||||
@ -0,0 +1,100 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenCFD Ltd
|
||||
\\/ 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
|
||||
simpleReactingParcelFoam
|
||||
|
||||
Description
|
||||
Steady state SIMPLE solver for laminar or turbulent flow with coal
|
||||
Lagrangian parcels.
|
||||
|
||||
Note:
|
||||
- including run-time selectable finite volume options,e.g. sources,
|
||||
constraints
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "turbulentFluidThermoModel.H"
|
||||
#include "coalCloud.H"
|
||||
#include "rhoCombustionModel.H"
|
||||
#include "radiationModel.H"
|
||||
#include "IOporosityModelList.H"
|
||||
#include "fvOptions.H"
|
||||
#include "SLGThermo.H"
|
||||
#include "simpleControl.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "setRootCase.H"
|
||||
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "readGravitationalAcceleration.H"
|
||||
|
||||
simpleControl simple(mesh);
|
||||
|
||||
#include "createFields.H"
|
||||
#include "createRadiationModel.H"
|
||||
#include "createClouds.H"
|
||||
#include "createMRF.H"
|
||||
#include "createFvOptions.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (simple.loop())
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
parcels.evolve();
|
||||
|
||||
// --- Pressure-velocity SIMPLE corrector loop
|
||||
{
|
||||
#include "UEqn.H"
|
||||
#include "YEqn.H"
|
||||
#include "EEqn.H"
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
turbulence->correct();
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -175,7 +175,6 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
const CompositionModel<reactingCloudType>& composition =
|
||||
td.cloud().composition();
|
||||
|
||||
|
||||
// Define local properties at beginning of timestep
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@ -291,7 +290,6 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
Cs
|
||||
);
|
||||
|
||||
|
||||
// Surface reactions
|
||||
// ~~~~~~~~~~~~~~~~~
|
||||
|
||||
@ -324,27 +322,14 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
dhsTrans
|
||||
);
|
||||
|
||||
|
||||
// 2. Update the parcel properties due to change in mass
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
scalarField dMassGas(dMassDV + dMassSRGas);
|
||||
scalarField dMassLiquid(dMassPC + dMassSRLiquid);
|
||||
scalarField dMassSolid(dMassSRSolid);
|
||||
scalar mass1 =
|
||||
updateMassFractions(mass0, dMassGas, dMassLiquid, dMassSolid);
|
||||
|
||||
this->Cp_ = CpEff(td, pc, T0, idG, idL, idS);
|
||||
|
||||
// Update particle density or diameter
|
||||
if (td.cloud().constProps().constantVolume())
|
||||
{
|
||||
this->rho_ = mass1/this->volume();
|
||||
}
|
||||
else
|
||||
{
|
||||
this->d_ = cbrt(mass1/this->rho_*6.0/pi);
|
||||
}
|
||||
scalar mass1 = mass0 - sum(dMassGas) - sum(dMassLiquid) - sum(dMassSolid);
|
||||
|
||||
// Remove the particle when mass falls below minimum threshold
|
||||
if (np0*mass1 < td.cloud().constProps().minParcelMass())
|
||||
@ -386,6 +371,18 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
return;
|
||||
}
|
||||
|
||||
(void)updateMassFractions(mass0, dMassGas, dMassLiquid, dMassSolid);
|
||||
|
||||
// Update particle density or diameter
|
||||
if (td.cloud().constProps().constantVolume())
|
||||
{
|
||||
this->rho_ = mass1/this->volume();
|
||||
}
|
||||
else
|
||||
{
|
||||
this->d_ = cbrt(mass1/this->rho_*6.0/pi);
|
||||
}
|
||||
|
||||
// Correct surface values due to emitted species
|
||||
this->correctSurfaceValues(td, cellI, Ts, Cs, rhos, mus, Prs, kappas);
|
||||
Res = this->Re(U0, this->d_, rhos, mus);
|
||||
|
||||
@ -215,8 +215,20 @@ void Foam::patchInjectionBase::setPositionAndCell
|
||||
// first face of the cell as the tetFace and the first point after
|
||||
// the base point on the face as the tetPt. The tracking will pick
|
||||
// the cell consistent with the motion in the first tracking step
|
||||
tetFaceI = mesh.cells()[cellOwner][0];
|
||||
tetPtI = 1;
|
||||
//tetFaceI = mesh.cells()[cellOwner][0];
|
||||
//tetPtI = 1;
|
||||
|
||||
//SAF: temporary fix for patchInjection.
|
||||
// This function finds both cellOwner and tetFaceI. The particle
|
||||
// was injected in a non-boundary cell and the tracking function
|
||||
// could not find the cellOwner
|
||||
mesh.findCellFacePt
|
||||
(
|
||||
position,
|
||||
cellOwner,
|
||||
tetFaceI,
|
||||
tetPtI
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user