Compare commits
15 Commits
feature-ne
...
develop-fe
| Author | SHA1 | Date | |
|---|---|---|---|
| 3cc0f809dc | |||
| 32dbc380ea | |||
| 2e5c590db6 | |||
| 5c924f6cf9 | |||
| 536bb445fb | |||
| 1cac9ab826 | |||
| ba8e26f4fd | |||
| 3c863d3fa3 | |||
| d2e6ff64c9 | |||
| 9e55fec128 | |||
| f36629cf40 | |||
| 371ce8a89e | |||
| 45e8754ec3 | |||
| ba7034cc8f | |||
| 6acaf99580 |
@ -1,2 +1,2 @@
|
|||||||
api=2206
|
api=2206
|
||||||
patch=220907
|
patch=0
|
||||||
|
|||||||
@ -11,5 +11,4 @@ EXE_LIBS = \
|
|||||||
-lfvOptions \
|
-lfvOptions \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-lsampling \
|
-lsampling \
|
||||||
-lregionFaModels \
|
-lregionFaModels
|
||||||
-lfiniteArea
|
|
||||||
|
|||||||
@ -116,7 +116,7 @@ int main(int argc, char *argv[])
|
|||||||
"normalisedGradP",
|
"normalisedGradP",
|
||||||
tmagGradP()/max(tmagGradP())
|
tmagGradP()/max(tmagGradP())
|
||||||
);
|
);
|
||||||
normalisedGradP.writeOpt(IOobject::AUTO_WRITE);
|
normalisedGradP.writeOpt() = IOobject::AUTO_WRITE;
|
||||||
tmagGradP.clear();
|
tmagGradP.clear();
|
||||||
|
|
||||||
++runTime;
|
++runTime;
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteArea/lnInclude \
|
-I$(LIB_SRC)/finiteArea/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I${LIB_SRC}/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/sampling/lnInclude \
|
-I${LIB_SRC}/sampling/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
Info<< "\nConstructing reacting cloud" << endl;
|
Info<< "\nConstructing reacting cloud" << endl;
|
||||||
basicReactingCloud parcels
|
reactingCloud parcels
|
||||||
(
|
(
|
||||||
"reactingCloud1",
|
"reactingCloud1",
|
||||||
|
g,
|
||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
g,
|
|
||||||
slgThermo
|
slgThermo
|
||||||
);
|
);
|
||||||
|
|||||||
@ -37,7 +37,7 @@ Description
|
|||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "turbulentFluidThermoModel.H"
|
#include "turbulentFluidThermoModel.H"
|
||||||
#include "basicReactingCloud.H"
|
#include "reactingCloud.H"
|
||||||
#include "surfaceFilmModel.H"
|
#include "surfaceFilmModel.H"
|
||||||
#include "pyrolysisModelCollection.H"
|
#include "pyrolysisModelCollection.H"
|
||||||
#include "radiationModel.H"
|
#include "radiationModel.H"
|
||||||
|
|||||||
@ -26,5 +26,4 @@ EXE_LIBS = \
|
|||||||
-ltopoChangerFvMesh \
|
-ltopoChangerFvMesh \
|
||||||
-lsampling \
|
-lsampling \
|
||||||
-latmosphericModels \
|
-latmosphericModels \
|
||||||
-lregionFaModels \
|
-lregionFaModels
|
||||||
-lfiniteArea
|
|
||||||
|
|||||||
@ -21,5 +21,4 @@ EXE_LIBS = \
|
|||||||
-lcompressibleTurbulenceModels \
|
-lcompressibleTurbulenceModels \
|
||||||
-lthermoTools \
|
-lthermoTools \
|
||||||
-latmosphericModels \
|
-latmosphericModels \
|
||||||
-lregionFaModels \
|
-lregionFaModels
|
||||||
-lfiniteArea
|
|
||||||
|
|||||||
@ -28,5 +28,4 @@ EXE_LIBS = \
|
|||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
-ldynamicFvMesh \
|
-ldynamicFvMesh \
|
||||||
-ltopoChangerFvMesh \
|
-ltopoChangerFvMesh \
|
||||||
-lregionFaModels \
|
-lregionFaModels
|
||||||
-lfiniteArea
|
|
||||||
|
|||||||
@ -22,5 +22,4 @@ EXE_LIBS = \
|
|||||||
-lcompressibleTurbulenceModels \
|
-lcompressibleTurbulenceModels \
|
||||||
-lthermoTools \
|
-lthermoTools \
|
||||||
-latmosphericModels \
|
-latmosphericModels \
|
||||||
-lregionFaModels \
|
-lregionFaModels
|
||||||
-lfiniteArea
|
|
||||||
|
|||||||
@ -40,5 +40,4 @@ EXE_LIBS = \
|
|||||||
-lthermoTools \
|
-lthermoTools \
|
||||||
-lradiationModels \
|
-lradiationModels \
|
||||||
-lregionModels \
|
-lregionModels \
|
||||||
-lregionFaModels \
|
-lregionFaModels
|
||||||
-lfiniteArea
|
|
||||||
|
|||||||
@ -36,5 +36,5 @@ EXE_LIBS = \
|
|||||||
-lfaOptions \
|
-lfaOptions \
|
||||||
-lregionModels \
|
-lregionModels \
|
||||||
-lsampling \
|
-lsampling \
|
||||||
-lregionFaModels \
|
-lregionFaModels
|
||||||
-lfiniteArea
|
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
(
|
(
|
||||||
solidRegions[i],
|
solidRegions[i],
|
||||||
thermos[i],
|
thermos[i],
|
||||||
coordinateSystem::typeName
|
coordinateSystem::typeName_()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@ if (!thermo.isotropic())
|
|||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
thermo,
|
thermo,
|
||||||
coordinateSystem::typeName
|
coordinateSystem::typeName_()
|
||||||
);
|
);
|
||||||
|
|
||||||
tmp<volVectorField> tkappaByCp = thermo.Kappa()/thermo.Cp();
|
tmp<volVectorField> tkappaByCp = thermo.Kappa()/thermo.Cp();
|
||||||
|
|||||||
@ -22,5 +22,4 @@ EXE_LIBS = \
|
|||||||
-ldynamicFvMesh \
|
-ldynamicFvMesh \
|
||||||
-ltopoChangerFvMesh \
|
-ltopoChangerFvMesh \
|
||||||
-latmosphericModels \
|
-latmosphericModels \
|
||||||
-lregionFaModels \
|
-lregionFaModels
|
||||||
-lfiniteArea
|
|
||||||
|
|||||||
@ -42,11 +42,11 @@ Description
|
|||||||
#include "CorrectPhi.H"
|
#include "CorrectPhi.H"
|
||||||
|
|
||||||
#ifdef MPPIC
|
#ifdef MPPIC
|
||||||
#include "basicKinematicCloud.H"
|
#include "kinematicCloud.H"
|
||||||
#define basicKinematicTypeCloud basicKinematicCloud
|
#define kinematicTypeCloud kinematicCloud
|
||||||
#else
|
#else
|
||||||
#include "basicKinematicCollidingCloud.H"
|
#include "kinematicCollidingCloud.H"
|
||||||
#define basicKinematicTypeCloud basicKinematicCollidingCloud
|
#define kinematicTypeCloud kinematicCollidingCloud
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
@ -88,7 +88,7 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
// Store the particle positions
|
// Store the particle positions
|
||||||
kinematicCloud.storeGlobalPositions();
|
kCloud.storeGlobalPositions();
|
||||||
|
|
||||||
mesh.update();
|
mesh.update();
|
||||||
|
|
||||||
@ -111,15 +111,15 @@ int main(int argc, char *argv[])
|
|||||||
continuousPhaseTransport.correct();
|
continuousPhaseTransport.correct();
|
||||||
muc = rhoc*continuousPhaseTransport.nu();
|
muc = rhoc*continuousPhaseTransport.nu();
|
||||||
|
|
||||||
kinematicCloud.evolve();
|
kCloud.evolve();
|
||||||
|
|
||||||
// Update continuous phase volume fraction field
|
// Update continuous phase volume fraction field
|
||||||
alphac = max(1.0 - kinematicCloud.theta(), alphacMin);
|
alphac = max(1.0 - kCloud.theta(), alphacMin);
|
||||||
alphac.correctBoundaryConditions();
|
alphac.correctBoundaryConditions();
|
||||||
alphacf = fvc::interpolate(alphac);
|
alphacf = fvc::interpolate(alphac);
|
||||||
alphaPhic = alphacf*phic;
|
alphaPhic = alphacf*phic;
|
||||||
|
|
||||||
fvVectorMatrix cloudSU(kinematicCloud.SU(Uc));
|
fvVectorMatrix cloudSU(kCloud.SU(Uc));
|
||||||
volVectorField cloudVolSUSu
|
volVectorField cloudVolSUSu
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
|
|||||||
@ -12,6 +12,8 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels \
|
-I$(LIB_SRC)/transportModels \
|
||||||
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||||
|
|||||||
@ -11,8 +11,11 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels \
|
-I$(LIB_SRC)/transportModels \
|
||||||
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||||
|
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/phaseIncompressible/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/phaseIncompressible/lnInclude \
|
||||||
|
|||||||
@ -43,11 +43,11 @@ Description
|
|||||||
#include "pimpleControl.H"
|
#include "pimpleControl.H"
|
||||||
|
|
||||||
#ifdef MPPIC
|
#ifdef MPPIC
|
||||||
#include "basicKinematicCloud.H"
|
#include "kinematicCloud.H"
|
||||||
#define basicKinematicTypeCloud basicKinematicCloud
|
#define kinematicTypeCloud kinematicCloud
|
||||||
#else
|
#else
|
||||||
#include "basicKinematicCollidingCloud.H"
|
#include "kinematicCollidingCloud.H"
|
||||||
#define basicKinematicTypeCloud basicKinematicCollidingCloud
|
#define kinematicTypeCloud kinematicCollidingCloud
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
@ -91,16 +91,16 @@ int main(int argc, char *argv[])
|
|||||||
continuousPhaseTransport.correct();
|
continuousPhaseTransport.correct();
|
||||||
muc = rhoc*continuousPhaseTransport.nu();
|
muc = rhoc*continuousPhaseTransport.nu();
|
||||||
|
|
||||||
Info<< "Evolving " << kinematicCloud.name() << endl;
|
Info<< "Evolving " << kCloud.name() << endl;
|
||||||
kinematicCloud.evolve();
|
kCloud.evolve();
|
||||||
|
|
||||||
// Update continuous phase volume fraction field
|
// Update continuous phase volume fraction field
|
||||||
alphac = max(1.0 - kinematicCloud.theta(), alphacMin);
|
alphac = max(1.0 - kCloud.theta(), alphacMin);
|
||||||
alphac.correctBoundaryConditions();
|
alphac.correctBoundaryConditions();
|
||||||
alphacf = fvc::interpolate(alphac);
|
alphacf = fvc::interpolate(alphac);
|
||||||
alphaPhic = alphacf*phic;
|
alphaPhic = alphacf*phic;
|
||||||
|
|
||||||
fvVectorMatrix cloudSU(kinematicCloud.SU(Uc));
|
fvVectorMatrix cloudSU(kCloud.SU(Uc));
|
||||||
volVectorField cloudVolSUSu
|
volVectorField cloudVolSUSu
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
|
|||||||
@ -10,6 +10,8 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels \
|
-I$(LIB_SRC)/transportModels \
|
||||||
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||||
|
|||||||
@ -10,8 +10,11 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels \
|
-I$(LIB_SRC)/transportModels \
|
||||||
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||||
|
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
||||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||||
|
|||||||
@ -125,13 +125,13 @@ const word kinematicCloudName
|
|||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
|
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
|
||||||
basicKinematicTypeCloud kinematicCloud
|
kinematicTypeCloud kCloud
|
||||||
(
|
(
|
||||||
kinematicCloudName,
|
kinematicCloudName,
|
||||||
|
g,
|
||||||
rhoc,
|
rhoc,
|
||||||
Uc,
|
Uc,
|
||||||
muc,
|
muc
|
||||||
g
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// Particle fraction upper limit
|
// Particle fraction upper limit
|
||||||
@ -139,13 +139,13 @@ scalar alphacMin
|
|||||||
(
|
(
|
||||||
1.0
|
1.0
|
||||||
- (
|
- (
|
||||||
kinematicCloud.particleProperties().subDict("constantProperties")
|
kCloud.particleProperties().subDict("constantProperties")
|
||||||
.get<scalar>("alphaMax")
|
.get<scalar>("alphaMax")
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Update alphac from the particle locations
|
// Update alphac from the particle locations
|
||||||
alphac = max(1.0 - kinematicCloud.theta(), alphacMin);
|
alphac = max(1.0 - kCloud.theta(), alphacMin);
|
||||||
alphac.correctBoundaryConditions();
|
alphac.correctBoundaryConditions();
|
||||||
|
|
||||||
surfaceScalarField alphacf("alphacf", fvc::interpolate(alphac));
|
surfaceScalarField alphacf("alphacf", fvc::interpolate(alphac));
|
||||||
|
|||||||
@ -1,12 +1,11 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteArea/lnInclude \
|
-I$(LIB_SRC)/finiteArea/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I${LIB_SRC}/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/coalCombustion/lnInclude \
|
|
||||||
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||||
@ -35,7 +34,6 @@ EXE_LIBS = \
|
|||||||
-llagrangian \
|
-llagrangian \
|
||||||
-llagrangianIntermediate \
|
-llagrangianIntermediate \
|
||||||
-llagrangianTurbulence \
|
-llagrangianTurbulence \
|
||||||
-lcoalCombustion\
|
|
||||||
-lspecie \
|
-lspecie \
|
||||||
-lcompressibleTransportModels \
|
-lcompressibleTransportModels \
|
||||||
-lfluidThermophysicalModels \
|
-lfluidThermophysicalModels \
|
||||||
|
|||||||
@ -37,8 +37,8 @@ Description
|
|||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "turbulentFluidThermoModel.H"
|
#include "turbulentFluidThermoModel.H"
|
||||||
#include "basicThermoCloud.H"
|
#include "thermoCloud.H"
|
||||||
#include "coalCloud.H"
|
#include "reactingMultiphaseCloud.H"
|
||||||
#include "psiReactionThermo.H"
|
#include "psiReactionThermo.H"
|
||||||
#include "CombustionModel.H"
|
#include "CombustionModel.H"
|
||||||
#include "fvOptions.H"
|
#include "fvOptions.H"
|
||||||
|
|||||||
@ -1,19 +1,19 @@
|
|||||||
Info<< "\nConstructing coal cloud" << endl;
|
Info<< "\nConstructing coal cloud" << endl;
|
||||||
coalCloud coalParcels
|
reactingMultiphaseCloud coalParcels
|
||||||
(
|
(
|
||||||
"coalCloud1",
|
"coalCloud1",
|
||||||
|
g,
|
||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
g,
|
|
||||||
slgThermo
|
slgThermo
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "\nConstructing limestone cloud" << endl;
|
Info<< "\nConstructing limestone cloud" << endl;
|
||||||
basicThermoCloud limestoneParcels
|
thermoCloud limestoneParcels
|
||||||
(
|
(
|
||||||
"limestoneCloud1",
|
"limestoneCloud1",
|
||||||
|
g,
|
||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
g,
|
|
||||||
slgThermo
|
slgThermo
|
||||||
);
|
);
|
||||||
|
|||||||
@ -9,6 +9,8 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels \
|
-I$(LIB_SRC)/transportModels \
|
||||||
|
|||||||
@ -63,13 +63,13 @@ const word kinematicCloudName
|
|||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
|
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
|
||||||
basicKinematicCollidingCloud kinematicCloud
|
kinematicCollidingCloud kCloud
|
||||||
(
|
(
|
||||||
kinematicCloudName,
|
kinematicCloudName,
|
||||||
|
g,
|
||||||
rhoInf,
|
rhoInf,
|
||||||
U,
|
U,
|
||||||
mu,
|
mu
|
||||||
g
|
|
||||||
);
|
);
|
||||||
|
|
||||||
IOobject Hheader
|
IOobject Hheader
|
||||||
|
|||||||
@ -10,6 +10,8 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels \
|
-I$(LIB_SRC)/transportModels \
|
||||||
|
|||||||
@ -41,7 +41,7 @@ Description
|
|||||||
#include "dynamicFvMesh.H"
|
#include "dynamicFvMesh.H"
|
||||||
#include "singlePhaseTransportModel.H"
|
#include "singlePhaseTransportModel.H"
|
||||||
#include "turbulentTransportModel.H"
|
#include "turbulentTransportModel.H"
|
||||||
#include "basicKinematicCollidingCloud.H"
|
#include "kinematicCollidingCloud.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -76,19 +76,19 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
kinematicCloud.storeGlobalPositions();
|
kCloud.storeGlobalPositions();
|
||||||
|
|
||||||
mesh.update();
|
mesh.update();
|
||||||
|
|
||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
|
|
||||||
Info<< "Evolving " << kinematicCloud.name() << endl;
|
Info<< "Evolving " << kCloud.name() << endl;
|
||||||
|
|
||||||
laminarTransport.correct();
|
laminarTransport.correct();
|
||||||
|
|
||||||
mu = laminarTransport.nu()*rhoInfValue;
|
mu = laminarTransport.nu()*rhoInfValue;
|
||||||
|
|
||||||
kinematicCloud.evolve();
|
kCloud.evolve();
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,7 @@ Description
|
|||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "singlePhaseTransportModel.H"
|
#include "singlePhaseTransportModel.H"
|
||||||
#include "turbulentTransportModel.H"
|
#include "turbulentTransportModel.H"
|
||||||
#include "basicKinematicCollidingCloud.H"
|
#include "kinematicCollidingCloud.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -75,13 +75,13 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
Info<< "Evolving " << kinematicCloud.name() << endl;
|
Info<< "Evolving " << kCloud.name() << endl;
|
||||||
|
|
||||||
laminarTransport.correct();
|
laminarTransport.correct();
|
||||||
|
|
||||||
mu = laminarTransport.nu()*rhoInfValue;
|
mu = laminarTransport.nu()*rhoInfValue;
|
||||||
|
|
||||||
kinematicCloud.evolve();
|
kCloud.evolve();
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,12 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels \
|
-I$(LIB_SRC)/transportModels \
|
||||||
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||||
|
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
+ MRF.DDt(U)
|
+ MRF.DDt(U)
|
||||||
+ turbulence->divDevReff(U)
|
+ turbulence->divDevReff(U)
|
||||||
==
|
==
|
||||||
parcels.SU(U, true)
|
scalar(1)/rhoInfValue*parcels.SU(U)
|
||||||
+ fvOptions(U)
|
+ fvOptions(U)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -4,13 +4,12 @@ const word kinematicCloudName
|
|||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
|
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
|
||||||
|
kinematicCloud parcels
|
||||||
basicKinematicCloud parcels
|
|
||||||
(
|
(
|
||||||
kinematicCloudName,
|
kinematicCloudName,
|
||||||
|
g,
|
||||||
rhoInf,
|
rhoInf,
|
||||||
U,
|
U,
|
||||||
muc,
|
muc
|
||||||
g
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,7 @@ Description
|
|||||||
#include "singlePhaseTransportModel.H"
|
#include "singlePhaseTransportModel.H"
|
||||||
#include "turbulentTransportModel.H"
|
#include "turbulentTransportModel.H"
|
||||||
#include "surfaceFilmModel.H"
|
#include "surfaceFilmModel.H"
|
||||||
#include "basicKinematicCloud.H"
|
#include "kinematicCloud.H"
|
||||||
#include "fvOptions.H"
|
#include "fvOptions.H"
|
||||||
#include "pimpleControl.H"
|
#include "pimpleControl.H"
|
||||||
#include "CorrectPhi.H"
|
#include "CorrectPhi.H"
|
||||||
@ -67,7 +67,6 @@ int main(int argc, char *argv[])
|
|||||||
#include "createDyMControls.H"
|
#include "createDyMControls.H"
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
#include "createFieldRefs.H"
|
#include "createFieldRefs.H"
|
||||||
#include "createRegionControls.H"
|
|
||||||
#include "createUfIfPresent.H"
|
#include "createUfIfPresent.H"
|
||||||
|
|
||||||
turbulence->validate();
|
turbulence->validate();
|
||||||
@ -95,7 +94,7 @@ int main(int argc, char *argv[])
|
|||||||
// Do any mesh changes
|
// Do any mesh changes
|
||||||
mesh.update();
|
mesh.update();
|
||||||
|
|
||||||
if (solvePrimaryRegion && mesh.changing())
|
if (pimple.solveFlow() && mesh.changing())
|
||||||
{
|
{
|
||||||
MRF.update();
|
MRF.update();
|
||||||
|
|
||||||
@ -120,7 +119,7 @@ int main(int argc, char *argv[])
|
|||||||
parcels.evolve();
|
parcels.evolve();
|
||||||
surfaceFilm.evolve();
|
surfaceFilm.evolve();
|
||||||
|
|
||||||
if (solvePrimaryRegion)
|
if (pimple.solveFlow())
|
||||||
{
|
{
|
||||||
// --- PIMPLE loop
|
// --- PIMPLE loop
|
||||||
while (pimple.loop())
|
while (pimple.loop())
|
||||||
|
|||||||
3
applications/solvers/lagrangian/parcelFoam/Make/files
Normal file
3
applications/solvers/lagrangian/parcelFoam/Make/files
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
parcelFoam.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_USER_APPBIN)/parcelFoam
|
||||||
@ -1,49 +1,48 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
|
-I$(FOAM_SOLVERS)/lagrangian/reactingParcelFoam \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
|
-I$(LIB_SRC)/finiteArea/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
-I$(LIB_SRC)/sampling/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
|
||||||
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
|
||||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
|
||||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
|
||||||
-I$(LIB_SRC)/transportModels \
|
-I$(LIB_SRC)/transportModels \
|
||||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||||
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||||
|
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
||||||
|
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||||
|
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
||||||
-I$(LIB_SRC)/regionFaModels/lnInclude \
|
-I$(LIB_SRC)/regionFaModels/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteArea/lnInclude \
|
-I$(LIB_SRC)/faOptions/lnInclude \
|
||||||
-I$(LIB_SRC)/faOptions/lnInclude
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||||
|
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
|
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude
|
||||||
|
|
||||||
LIB_LIBS = \
|
|
||||||
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
|
-lfvOptions \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
|
-lsampling \
|
||||||
|
-lturbulenceModels \
|
||||||
|
-lincompressibleTurbulenceModels \
|
||||||
|
-lincompressibleTransportModels \
|
||||||
|
-ldynamicMesh \
|
||||||
|
-ldynamicFvMesh \
|
||||||
|
-ltopoChangerFvMesh \
|
||||||
|
-latmosphericModels \
|
||||||
|
-lregionModels \
|
||||||
|
-lsurfaceFilmModels \
|
||||||
|
-lsurfaceFilmDerivedFvPatchFields \
|
||||||
-llagrangian \
|
-llagrangian \
|
||||||
-llagrangianIntermediate \
|
-llagrangianIntermediate \
|
||||||
-llagrangianTurbulence \
|
-llagrangianTurbulence \
|
||||||
-ldistributionModels \
|
|
||||||
-lspecie \
|
|
||||||
-lcompressibleTransportModels \
|
|
||||||
-lfluidThermophysicalModels \
|
|
||||||
-lthermophysicalProperties \
|
|
||||||
-lreactionThermophysicalModels \
|
|
||||||
-lSLGThermo \
|
|
||||||
-lradiationModels \
|
|
||||||
-lturbulenceModels \
|
|
||||||
-lincompressibleTurbulenceModels \
|
|
||||||
-lcompressibleTurbulenceModels \
|
|
||||||
-lincompressibleTransportModels \
|
|
||||||
-lregionModels \
|
|
||||||
-lsurfaceFilmModels \
|
|
||||||
-ldynamicMesh \
|
|
||||||
-ldynamicFvMesh \
|
|
||||||
-lregionFaModels \
|
-lregionFaModels \
|
||||||
-lfiniteArea
|
-lfiniteArea \
|
||||||
|
-lfaOptions
|
||||||
22
applications/solvers/lagrangian/parcelFoam/UEqn.H
Normal file
22
applications/solvers/lagrangian/parcelFoam/UEqn.H
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
MRF.correctBoundaryVelocity(U);
|
||||||
|
|
||||||
|
fvVectorMatrix UEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(U) + fvm::div(phi, U)
|
||||||
|
+ MRF.DDt(U)
|
||||||
|
+ turbulence->divDevReff(U)
|
||||||
|
==
|
||||||
|
scalar(1)/rhoInfValue*parcels.SU(U)
|
||||||
|
+ fvOptions(U)
|
||||||
|
);
|
||||||
|
|
||||||
|
UEqn.relax();
|
||||||
|
|
||||||
|
fvOptions.constrain(UEqn);
|
||||||
|
|
||||||
|
if (pimple.momentumPredictor())
|
||||||
|
{
|
||||||
|
solve(UEqn == -fvc::grad(p));
|
||||||
|
|
||||||
|
fvOptions.correct(U);
|
||||||
|
}
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
auto parcels = parcelCloudModelList(g, rhoInf, U, muc);
|
||||||
|
|
||||||
@ -0,0 +1 @@
|
|||||||
|
regionModels::surfaceFilmModel& surfaceFilm = tsurfaceFilm();
|
||||||
85
applications/solvers/lagrangian/parcelFoam/createFields.H
Normal file
85
applications/solvers/lagrangian/parcelFoam/createFields.H
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
#include "readGravitationalAcceleration.H"
|
||||||
|
|
||||||
|
Info<< "Reading field p\n" << endl;
|
||||||
|
volScalarField p
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"p",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
Info<< "\nReading field U\n" << endl;
|
||||||
|
volVectorField U
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"U",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "createPhi.H"
|
||||||
|
|
||||||
|
singlePhaseTransportModel laminarTransport(U, phi);
|
||||||
|
|
||||||
|
dimensionedScalar rhoInfValue
|
||||||
|
(
|
||||||
|
"rhoInf",
|
||||||
|
dimDensity,
|
||||||
|
laminarTransport
|
||||||
|
);
|
||||||
|
|
||||||
|
volScalarField rhoInf
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"rho",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
rhoInfValue
|
||||||
|
);
|
||||||
|
|
||||||
|
volScalarField muc
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"muc",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
rhoInf*laminarTransport.nu()
|
||||||
|
);
|
||||||
|
|
||||||
|
Info<< "Creating turbulence model\n" << endl;
|
||||||
|
autoPtr<incompressible::turbulenceModel> turbulence
|
||||||
|
(
|
||||||
|
incompressible::turbulenceModel::New(U, phi, laminarTransport)
|
||||||
|
);
|
||||||
|
|
||||||
|
label pRefCell = 0;
|
||||||
|
scalar pRefValue = 0.0;
|
||||||
|
setRefCell(p, pimple.dict(), pRefCell, pRefValue);
|
||||||
|
mesh.setFluxRequired(p.name());
|
||||||
|
|
||||||
|
#include "createMRF.H"
|
||||||
|
#include "createClouds.H"
|
||||||
|
#include "createSurfaceFilmModel.H"
|
||||||
|
#include "createFvOptions.H"
|
||||||
|
|
||||||
|
|
||||||
58
applications/solvers/lagrangian/parcelFoam/pEqn.H
Normal file
58
applications/solvers/lagrangian/parcelFoam/pEqn.H
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
|
||||||
|
volScalarField rAU(1.0/UEqn.A());
|
||||||
|
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
|
||||||
|
|
||||||
|
surfaceScalarField phiHbyA("phiHbyA", fvc::flux(HbyA));
|
||||||
|
|
||||||
|
if (pimple.ddtCorr())
|
||||||
|
{
|
||||||
|
phiHbyA += MRF.zeroFilter(fvc::interpolate(rAU)*fvc::ddtCorr(U, phi, Uf));
|
||||||
|
}
|
||||||
|
|
||||||
|
MRF.makeRelative(phiHbyA);
|
||||||
|
|
||||||
|
if (p.needReference())
|
||||||
|
{
|
||||||
|
fvc::makeRelative(phiHbyA, U);
|
||||||
|
adjustPhi(phiHbyA, U, p);
|
||||||
|
fvc::makeAbsolute(phiHbyA, U);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Update the pressure BCs to ensure flux consistency
|
||||||
|
constrainPressure(p, U, phiHbyA, rAU, MRF);
|
||||||
|
|
||||||
|
// Non-orthogonal pressure corrector loop
|
||||||
|
while (pimple.correctNonOrthogonal())
|
||||||
|
{
|
||||||
|
fvScalarMatrix pEqn
|
||||||
|
(
|
||||||
|
fvm::laplacian(rAU, p)
|
||||||
|
==
|
||||||
|
fvc::div(phiHbyA)
|
||||||
|
);
|
||||||
|
|
||||||
|
pEqn.setReference(pRefCell, pRefValue);
|
||||||
|
|
||||||
|
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||||
|
|
||||||
|
if (pimple.finalNonOrthogonalIter())
|
||||||
|
{
|
||||||
|
phi = phiHbyA - pEqn.flux();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "continuityErrs.H"
|
||||||
|
|
||||||
|
p.relax();
|
||||||
|
|
||||||
|
U = HbyA - rAU*fvc::grad(p);
|
||||||
|
U.correctBoundaryConditions();
|
||||||
|
fvOptions.correct(U);
|
||||||
|
|
||||||
|
// Correct rhoUf if the mesh is moving
|
||||||
|
fvc::correctUf(Uf, U, phi);
|
||||||
|
|
||||||
|
// Make the fluxes relative to the mesh motion
|
||||||
|
fvc::makeRelative(phi, U);
|
||||||
|
|
||||||
154
applications/solvers/lagrangian/parcelFoam/parcelFoam.C
Normal file
154
applications/solvers/lagrangian/parcelFoam/parcelFoam.C
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | www.openfoam.com
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Application
|
||||||
|
parcelFoam
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpLagrangianSolvers
|
||||||
|
|
||||||
|
Description
|
||||||
|
Transient solver for incompressible, turbulent flow with kinematic,
|
||||||
|
particle cloud, and surface film modelling.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "fvCFD.H"
|
||||||
|
#include "dynamicFvMesh.H"
|
||||||
|
#include "singlePhaseTransportModel.H"
|
||||||
|
#include "turbulentTransportModel.H"
|
||||||
|
#include "surfaceFilmModel.H"
|
||||||
|
#include "parcelCloudModelList.H"
|
||||||
|
#include "fvOptions.H"
|
||||||
|
#include "pimpleControl.H"
|
||||||
|
#include "CorrectPhi.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Transient solver for incompressible, turbulent flow"
|
||||||
|
" with kinematic particle clouds"
|
||||||
|
" and surface film modelling."
|
||||||
|
);
|
||||||
|
|
||||||
|
#define CREATE_MESH createMeshesPostProcess.H
|
||||||
|
#include "postProcess.H"
|
||||||
|
|
||||||
|
#include "addCheckCaseOptions.H"
|
||||||
|
#include "setRootCaseLists.H"
|
||||||
|
#include "createTime.H"
|
||||||
|
#include "createDynamicFvMesh.H"
|
||||||
|
#include "initContinuityErrs.H"
|
||||||
|
#include "createDyMControls.H"
|
||||||
|
#include "createFields.H"
|
||||||
|
#include "createFieldRefs.H"
|
||||||
|
#include "createUfIfPresent.H"
|
||||||
|
|
||||||
|
turbulence->validate();
|
||||||
|
|
||||||
|
#include "CourantNo.H"
|
||||||
|
#include "setInitialDeltaT.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
|
while (runTime.run())
|
||||||
|
{
|
||||||
|
#include "readDyMControls.H"
|
||||||
|
#include "CourantNo.H"
|
||||||
|
#include "setMultiRegionDeltaT.H"
|
||||||
|
|
||||||
|
++runTime;
|
||||||
|
|
||||||
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
|
// Store the particle positions
|
||||||
|
parcels.storeGlobalPositions();
|
||||||
|
|
||||||
|
// Do any mesh changes
|
||||||
|
mesh.update();
|
||||||
|
|
||||||
|
if (pimple.solveFlow() && mesh.changing())
|
||||||
|
{
|
||||||
|
MRF.update();
|
||||||
|
|
||||||
|
if (correctPhi)
|
||||||
|
{
|
||||||
|
// Calculate absolute flux
|
||||||
|
// from the mapped surface velocity
|
||||||
|
phi = mesh.Sf() & Uf();
|
||||||
|
|
||||||
|
#include "../../incompressible/pimpleFoam/correctPhi.H"
|
||||||
|
|
||||||
|
// Make the fluxes relative to the mesh-motion
|
||||||
|
fvc::makeRelative(phi, U);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (checkMeshCourantNo)
|
||||||
|
{
|
||||||
|
#include "meshCourantNo.H"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
parcels.evolve();
|
||||||
|
surfaceFilm.evolve();
|
||||||
|
|
||||||
|
if (pimple.solveFlow())
|
||||||
|
{
|
||||||
|
// --- PIMPLE loop
|
||||||
|
while (pimple.loop())
|
||||||
|
{
|
||||||
|
#include "UEqn.H"
|
||||||
|
|
||||||
|
// --- Pressure corrector loop
|
||||||
|
while (pimple.correct())
|
||||||
|
{
|
||||||
|
#include "pEqn.H"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pimple.turbCorr())
|
||||||
|
{
|
||||||
|
laminarTransport.correct();
|
||||||
|
turbulence->correct();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
runTime.write();
|
||||||
|
|
||||||
|
runTime.printExecutionTime(Info);
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -2,10 +2,10 @@ EXE_INC = \
|
|||||||
-I../reactingParcelFoam \
|
-I../reactingParcelFoam \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteArea/lnInclude \
|
-I$(LIB_SRC)/finiteArea/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I${LIB_SRC}/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/sampling/lnInclude \
|
-I${LIB_SRC}/sampling/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
Info<< "\nConstructing reacting cloud" << endl;
|
Info<< "\nConstructing reacting cloud" << endl;
|
||||||
basicReactingTypeCloud parcels
|
reactingTypeCloud parcels
|
||||||
(
|
(
|
||||||
"reactingCloud1",
|
"reactingCloud1",
|
||||||
|
g,
|
||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
g,
|
|
||||||
slgThermo
|
slgThermo
|
||||||
);
|
);
|
||||||
|
|||||||
@ -2,8 +2,8 @@ EXE_INC = \
|
|||||||
-I.. \
|
-I.. \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteArea/lnInclude \
|
-I$(LIB_SRC)/finiteArea/lnInclude \
|
||||||
-I$(LIB_SRC)/sampling/lnInclude \
|
-I${LIB_SRC}/sampling/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I${LIB_SRC}/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||||
|
|||||||
@ -37,8 +37,8 @@ Description
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#define CLOUD_BASE_TYPE HeterogeneousReacting
|
#define CLOUD_BASE_TYPE heterogeneousReacting
|
||||||
#define CLOUD_BASE_TYPE_NAME "HeterogeneousReacting"
|
#define CLOUD_BASE_TYPE_NAME "heterogeneousReacting"
|
||||||
|
|
||||||
#include "reactingParcelFoam.C"
|
#include "reactingParcelFoam.C"
|
||||||
|
|
||||||
|
|||||||
@ -53,12 +53,12 @@ Description
|
|||||||
#include "cloudMacros.H"
|
#include "cloudMacros.H"
|
||||||
|
|
||||||
#ifndef CLOUD_BASE_TYPE
|
#ifndef CLOUD_BASE_TYPE
|
||||||
#define CLOUD_BASE_TYPE ReactingMultiphase
|
#define CLOUD_BASE_TYPE reactingMultiphase
|
||||||
#define CLOUD_BASE_TYPE_NAME "reacting"
|
#define CLOUD_BASE_TYPE_NAME "reacting"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include CLOUD_INCLUDE_FILE(CLOUD_BASE_TYPE)
|
#include CLOUD_INCLUDE_FILE(CLOUD_BASE_TYPE)
|
||||||
#define basicReactingTypeCloud CLOUD_TYPE(CLOUD_BASE_TYPE)
|
#define reactingTypeCloud CLOUD_TYPE(CLOUD_BASE_TYPE)
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -81,7 +81,6 @@ int main(int argc, char *argv[])
|
|||||||
#include "createDyMControls.H"
|
#include "createDyMControls.H"
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
#include "createFieldRefs.H"
|
#include "createFieldRefs.H"
|
||||||
#include "createRegionControls.H"
|
|
||||||
#include "initContinuityErrs.H"
|
#include "initContinuityErrs.H"
|
||||||
#include "createRhoUfIfPresent.H"
|
#include "createRhoUfIfPresent.H"
|
||||||
|
|
||||||
@ -105,7 +104,7 @@ int main(int argc, char *argv[])
|
|||||||
// so that it can be mapped and used in correctPhi
|
// so that it can be mapped and used in correctPhi
|
||||||
// to ensure the corrected phi has the same divergence
|
// to ensure the corrected phi has the same divergence
|
||||||
autoPtr<volScalarField> divrhoU;
|
autoPtr<volScalarField> divrhoU;
|
||||||
if (solvePrimaryRegion && correctPhi)
|
if (pimple.solveFlow() && correctPhi)
|
||||||
{
|
{
|
||||||
divrhoU.reset
|
divrhoU.reset
|
||||||
(
|
(
|
||||||
@ -133,7 +132,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// Store momentum to set rhoUf for introduced faces.
|
// Store momentum to set rhoUf for introduced faces.
|
||||||
autoPtr<volVectorField> rhoU;
|
autoPtr<volVectorField> rhoU;
|
||||||
if (solvePrimaryRegion && rhoUf.valid())
|
if (pimple.solveFlow() && rhoUf.valid())
|
||||||
{
|
{
|
||||||
rhoU.reset(new volVectorField("rhoU", rho*U));
|
rhoU.reset(new volVectorField("rhoU", rho*U));
|
||||||
}
|
}
|
||||||
@ -144,7 +143,7 @@ int main(int argc, char *argv[])
|
|||||||
// Do any mesh changes
|
// Do any mesh changes
|
||||||
mesh.update();
|
mesh.update();
|
||||||
|
|
||||||
if (solvePrimaryRegion && mesh.changing())
|
if (pimple.solveFlow() && mesh.changing())
|
||||||
{
|
{
|
||||||
gh = (g & mesh.C()) - ghRef;
|
gh = (g & mesh.C()) - ghRef;
|
||||||
ghf = (g & mesh.Cf()) - ghRef;
|
ghf = (g & mesh.Cf()) - ghRef;
|
||||||
@ -172,7 +171,7 @@ int main(int argc, char *argv[])
|
|||||||
parcels.evolve();
|
parcels.evolve();
|
||||||
surfaceFilm.evolve();
|
surfaceFilm.evolve();
|
||||||
|
|
||||||
if (solvePrimaryRegion)
|
if (pimple.solveFlow())
|
||||||
{
|
{
|
||||||
if (pimple.nCorrPIMPLE() <= 1)
|
if (pimple.nCorrPIMPLE() <= 1)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,13 +1,12 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteArea/lnInclude \
|
-I$(LIB_SRC)/finiteArea/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I${LIB_SRC}/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/sampling/lnInclude \
|
-I$(LIB_SRC)/sampling/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/coalCombustion/lnInclude \
|
|
||||||
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
Info<< "\nConstructing " << CLOUD_BASE_TYPE_NAME << " cloud" << endl;
|
Info<< "\nConstructing " << CLOUD_BASE_TYPE_NAME << " cloud" << endl;
|
||||||
basicReactingTypeCloud parcels
|
reactingTypeCloud parcels
|
||||||
(
|
(
|
||||||
word(CLOUD_BASE_TYPE_NAME) & "Cloud1",
|
word(CLOUD_BASE_TYPE_NAME) & "Cloud1",
|
||||||
|
g,
|
||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
g,
|
|
||||||
slgThermo
|
slgThermo
|
||||||
);
|
);
|
||||||
|
|||||||
@ -45,13 +45,13 @@ Description
|
|||||||
#include "cloudMacros.H"
|
#include "cloudMacros.H"
|
||||||
|
|
||||||
#ifndef CLOUD_BASE_TYPE
|
#ifndef CLOUD_BASE_TYPE
|
||||||
#define CLOUD_BASE_TYPE ReactingMultiphase
|
#define CLOUD_BASE_TYPE reactingMultiphase
|
||||||
//#define CLOUD_BASE_TYPE_NAME "reactingMultiphase" Backwards compat
|
//#define CLOUD_BASE_TYPE_NAME "reactingMultiphase" Backwards compat
|
||||||
#define CLOUD_BASE_TYPE_NAME "reacting"
|
#define CLOUD_BASE_TYPE_NAME "reacting"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include CLOUD_INCLUDE_FILE(CLOUD_BASE_TYPE)
|
#include CLOUD_INCLUDE_FILE(CLOUD_BASE_TYPE)
|
||||||
#define basicReactingTypeCloud CLOUD_TYPE(CLOUD_BASE_TYPE)
|
#define reactingTypeCloud CLOUD_TYPE(CLOUD_BASE_TYPE)
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
41
applications/solvers/lagrangian/rhoParcelFoam/EEqn.H
Normal file
41
applications/solvers/lagrangian/rhoParcelFoam/EEqn.H
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
volScalarField& he = thermo.he();
|
||||||
|
|
||||||
|
fvScalarMatrix EEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(rho, he) + mvConvection->fvmDiv(phi, he)
|
||||||
|
+ fvc::ddt(rho, K) + fvc::div(phi, K)
|
||||||
|
+ (
|
||||||
|
he.name() == "e"
|
||||||
|
? fvc::div
|
||||||
|
(
|
||||||
|
fvc::absolute(phi/fvc::interpolate(rho), U),
|
||||||
|
p,
|
||||||
|
"div(phiv,p)"
|
||||||
|
)
|
||||||
|
: -dpdt
|
||||||
|
)
|
||||||
|
- fvm::laplacian(turbulence->alphaEff(), he)
|
||||||
|
==
|
||||||
|
rho*(U&g)
|
||||||
|
+ parcels.Sh(he)
|
||||||
|
+ surfaceFilm.Sh()
|
||||||
|
+ radiation->Sh(thermo, he)
|
||||||
|
+ Qdot
|
||||||
|
+ fvOptions(rho, he)
|
||||||
|
);
|
||||||
|
|
||||||
|
EEqn.relax();
|
||||||
|
|
||||||
|
fvOptions.constrain(EEqn);
|
||||||
|
|
||||||
|
EEqn.solve();
|
||||||
|
|
||||||
|
fvOptions.correct(he);
|
||||||
|
|
||||||
|
thermo.correct();
|
||||||
|
radiation->correct();
|
||||||
|
|
||||||
|
Info<< "T gas min/max = " << min(T).value() << ", "
|
||||||
|
<< max(T).value() << endl;
|
||||||
|
}
|
||||||
3
applications/solvers/lagrangian/rhoParcelFoam/Make/files
Normal file
3
applications/solvers/lagrangian/rhoParcelFoam/Make/files
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
rhoParcelFoam.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_USER_APPBIN)/rhoParcelFoam
|
||||||
@ -1,52 +1,58 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
|
-I../reactingParcelFoam \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/surfMesh/lnInclude \
|
-I$(LIB_SRC)/finiteArea/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I${LIB_SRC}/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||||
|
-I${LIB_SRC}/sampling/lnInclude \
|
||||||
|
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||||
|
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/turbulence/lnInclude \
|
|
||||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
|
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
|
||||||
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
|
||||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
|
||||||
-I$(LIB_SRC)/transportModels \
|
|
||||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||||
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
|
||||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
|
||||||
-I$(LIB_SRC)/regionFaModels/lnInclude \
|
-I$(LIB_SRC)/regionFaModels/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteArea/lnInclude \
|
-I$(LIB_SRC)/faOptions/lnInclude \
|
||||||
-I$(LIB_SRC)/faOptions/lnInclude
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||||
|
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
||||||
|
-I$(LIB_SRC)/ODE/lnInclude \
|
||||||
|
-I$(LIB_SRC)/combustionModels/lnInclude \
|
||||||
|
-I$(FOAM_SOLVERS)/combustion/reactingFoam
|
||||||
|
|
||||||
LIB_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lsurfMesh \
|
-lfvOptions \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-llagrangian \
|
-ldynamicMesh \
|
||||||
-llagrangianIntermediate \
|
-ldynamicFvMesh \
|
||||||
-llagrangianTurbulence \
|
-lsampling \
|
||||||
-ldistributionModels \
|
-lturbulenceModels \
|
||||||
|
-lcompressibleTurbulenceModels \
|
||||||
|
-lthermoTools \
|
||||||
-lspecie \
|
-lspecie \
|
||||||
-lcompressibleTransportModels \
|
-lcompressibleTransportModels \
|
||||||
-lfluidThermophysicalModels \
|
-lfluidThermophysicalModels \
|
||||||
-lthermophysicalProperties \
|
|
||||||
-lreactionThermophysicalModels \
|
-lreactionThermophysicalModels \
|
||||||
|
-lthermophysicalProperties \
|
||||||
-lSLGThermo \
|
-lSLGThermo \
|
||||||
-lradiationModels \
|
-lchemistryModel \
|
||||||
-lturbulenceModels \
|
|
||||||
-lincompressibleTurbulenceModels \
|
|
||||||
-lcompressibleTurbulenceModels \
|
|
||||||
-lincompressibleTransportModels \
|
|
||||||
-lregionModels \
|
-lregionModels \
|
||||||
|
-lradiationModels \
|
||||||
-lsurfaceFilmModels \
|
-lsurfaceFilmModels \
|
||||||
-ldynamicMesh \
|
-lsurfaceFilmDerivedFvPatchFields \
|
||||||
-ldynamicFvMesh \
|
-llagrangian \
|
||||||
|
-llagrangianIntermediate \
|
||||||
|
-llagrangianTurbulence \
|
||||||
|
-lODE \
|
||||||
|
-lcombustionModels \
|
||||||
-lregionFaModels \
|
-lregionFaModels \
|
||||||
-lfiniteArea
|
-lfiniteArea \
|
||||||
|
-lfaOptions
|
||||||
34
applications/solvers/lagrangian/rhoParcelFoam/UEqn.H
Normal file
34
applications/solvers/lagrangian/rhoParcelFoam/UEqn.H
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
MRF.correctBoundaryVelocity(U);
|
||||||
|
|
||||||
|
fvVectorMatrix UEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(rho, U) + fvm::div(phi, U)
|
||||||
|
+ MRF.DDt(rho, U)
|
||||||
|
+ turbulence->divDevRhoReff(U)
|
||||||
|
==
|
||||||
|
parcels.SU(U)
|
||||||
|
+ fvOptions(rho, U)
|
||||||
|
);
|
||||||
|
|
||||||
|
UEqn.relax();
|
||||||
|
|
||||||
|
fvOptions.constrain(UEqn);
|
||||||
|
|
||||||
|
if (pimple.momentumPredictor())
|
||||||
|
{
|
||||||
|
solve
|
||||||
|
(
|
||||||
|
UEqn
|
||||||
|
==
|
||||||
|
fvc::reconstruct
|
||||||
|
(
|
||||||
|
(
|
||||||
|
- ghf*fvc::snGrad(rho)
|
||||||
|
- fvc::snGrad(p_rgh)
|
||||||
|
)*mesh.magSf()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
fvOptions.correct(U);
|
||||||
|
K = 0.5*magSqr(U);
|
||||||
|
}
|
||||||
51
applications/solvers/lagrangian/rhoParcelFoam/YEqn.H
Normal file
51
applications/solvers/lagrangian/rhoParcelFoam/YEqn.H
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
tmp<fv::convectionScheme<scalar>> mvConvection
|
||||||
|
(
|
||||||
|
fv::convectionScheme<scalar>::New
|
||||||
|
(
|
||||||
|
mesh,
|
||||||
|
fields,
|
||||||
|
phi,
|
||||||
|
mesh.divScheme("div(phi,Yi_h)")
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
combustion->correct();
|
||||||
|
Qdot = combustion->Qdot();
|
||||||
|
volScalarField Yt(0.0*Y[0]);
|
||||||
|
|
||||||
|
forAll(Y, i)
|
||||||
|
{
|
||||||
|
if (i != inertIndex && composition.active(i))
|
||||||
|
{
|
||||||
|
volScalarField& Yi = Y[i];
|
||||||
|
|
||||||
|
fvScalarMatrix YEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(rho, Yi)
|
||||||
|
+ mvConvection->fvmDiv(phi, Yi)
|
||||||
|
- fvm::laplacian(turbulence->muEff(), Yi)
|
||||||
|
==
|
||||||
|
parcels.SYi(i, Yi)
|
||||||
|
+ fvOptions(rho, Yi)
|
||||||
|
+ combustion->R(Yi)
|
||||||
|
+ surfaceFilm.Srho(i)
|
||||||
|
);
|
||||||
|
|
||||||
|
YEqn.relax();
|
||||||
|
|
||||||
|
fvOptions.constrain(YEqn);
|
||||||
|
|
||||||
|
YEqn.solve(mesh.solver("Yi"));
|
||||||
|
|
||||||
|
fvOptions.correct(Yi);
|
||||||
|
|
||||||
|
Yi.max(0.0);
|
||||||
|
Yt += Yi;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Y[inertIndex] = scalar(1) - Yt;
|
||||||
|
Y[inertIndex].max(0.0);
|
||||||
|
}
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
Info<< "\nConstructing cloud" << endl;
|
||||||
|
|
||||||
|
auto parcels = parcelCloudModelList(g, rho, U, slgThermo);
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
const volScalarField& T = thermo.T();
|
||||||
|
const volScalarField& psi = thermo.psi();
|
||||||
|
const label inertIndex(composition.species().find(inertSpecie));
|
||||||
|
|
||||||
|
regionModels::surfaceFilmModel& surfaceFilm = tsurfaceFilm();
|
||||||
132
applications/solvers/lagrangian/rhoParcelFoam/createFields.H
Normal file
132
applications/solvers/lagrangian/rhoParcelFoam/createFields.H
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
#include "createRDeltaT.H"
|
||||||
|
|
||||||
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
|
autoPtr<rhoReactionThermo> pThermo(rhoReactionThermo::New(mesh));
|
||||||
|
rhoReactionThermo& thermo = pThermo();
|
||||||
|
thermo.validate(args.executable(), "h", "e");
|
||||||
|
|
||||||
|
SLGThermo slgThermo(mesh, thermo);
|
||||||
|
|
||||||
|
basicSpecieMixture& composition = thermo.composition();
|
||||||
|
PtrList<volScalarField>& Y = composition.Y();
|
||||||
|
|
||||||
|
const word inertSpecie(thermo.get<word>("inertSpecie"));
|
||||||
|
if
|
||||||
|
(
|
||||||
|
!composition.species().found(inertSpecie)
|
||||||
|
&& composition.species().size() > 0
|
||||||
|
)
|
||||||
|
{
|
||||||
|
FatalIOErrorIn(args.executable().c_str(), thermo)
|
||||||
|
<< "Inert specie " << inertSpecie << " not found in available species "
|
||||||
|
<< composition.species()
|
||||||
|
<< exit(FatalIOError);
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "Creating field rho\n" << endl;
|
||||||
|
volScalarField rho
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"rho",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
thermo.rho()
|
||||||
|
);
|
||||||
|
|
||||||
|
volScalarField& p = thermo.p();
|
||||||
|
|
||||||
|
Info<< "\nReading field U\n" << endl;
|
||||||
|
volVectorField U
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"U",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "compressibleCreatePhi.H"
|
||||||
|
|
||||||
|
Info<< "Creating turbulence model\n" << endl;
|
||||||
|
autoPtr<compressible::turbulenceModel> turbulence
|
||||||
|
(
|
||||||
|
compressible::turbulenceModel::New
|
||||||
|
(
|
||||||
|
rho,
|
||||||
|
U,
|
||||||
|
phi,
|
||||||
|
thermo
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
Info<< "Creating combustion model\n" << endl;
|
||||||
|
autoPtr<CombustionModel<rhoReactionThermo>> combustion
|
||||||
|
(
|
||||||
|
CombustionModel<rhoReactionThermo>::New(thermo, turbulence())
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "readGravitationalAcceleration.H"
|
||||||
|
#include "readhRef.H"
|
||||||
|
#include "gh.H"
|
||||||
|
|
||||||
|
|
||||||
|
volScalarField p_rgh
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"p_rgh",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
// Force p_rgh to be consistent with p
|
||||||
|
p_rgh = p - rho*gh;
|
||||||
|
|
||||||
|
pressureControl pressureControl(p, rho, pimple.dict(), false);
|
||||||
|
|
||||||
|
mesh.setFluxRequired(p_rgh.name());
|
||||||
|
|
||||||
|
Info<< "Creating multi-variate interpolation scheme\n" << endl;
|
||||||
|
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||||
|
|
||||||
|
forAll(Y, i)
|
||||||
|
{
|
||||||
|
fields.add(Y[i]);
|
||||||
|
}
|
||||||
|
fields.add(thermo.he());
|
||||||
|
|
||||||
|
volScalarField Qdot
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"Qdot",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::READ_IF_PRESENT,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero)
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "createDpdt.H"
|
||||||
|
|
||||||
|
#include "createK.H"
|
||||||
|
|
||||||
|
#include "createMRF.H"
|
||||||
|
#include "createRadiationModel.H"
|
||||||
|
#include "createClouds.H"
|
||||||
|
#include "createSurfaceFilmModel.H"
|
||||||
|
#include "createFvOptions.H"
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
#include "createMesh.H"
|
||||||
|
|
||||||
|
dictionary filmDict;
|
||||||
|
|
||||||
|
IOobject io
|
||||||
|
(
|
||||||
|
"surfaceFilmProperties",
|
||||||
|
mesh.time().constant(),
|
||||||
|
mesh,
|
||||||
|
IOobject::READ_IF_PRESENT,
|
||||||
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
|
||||||
|
if (io.typeHeaderOk<IOdictionary>())
|
||||||
|
{
|
||||||
|
IOdictionary propDict(io);
|
||||||
|
|
||||||
|
filmDict = std::move(propDict);
|
||||||
|
|
||||||
|
const word filmRegionName = filmDict.get<word>("region");
|
||||||
|
|
||||||
|
fvMesh filmMesh
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
filmRegionName,
|
||||||
|
runTime.timeName(),
|
||||||
|
runTime,
|
||||||
|
IOobject::MUST_READ
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
Info<< "\nConstructing surface film model" << endl;
|
||||||
|
|
||||||
|
autoPtr<regionModels::surfaceFilmModel> tsurfaceFilm
|
||||||
|
(
|
||||||
|
regionModels::surfaceFilmModel::New(mesh, g)
|
||||||
|
);
|
||||||
96
applications/solvers/lagrangian/rhoParcelFoam/pEqn.H
Normal file
96
applications/solvers/lagrangian/rhoParcelFoam/pEqn.H
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
if (!pimple.SIMPLErho())
|
||||||
|
{
|
||||||
|
rho = thermo.rho();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Thermodynamic density needs to be updated by psi*d(p) after the
|
||||||
|
// pressure solution
|
||||||
|
const volScalarField psip0(psi*p);
|
||||||
|
|
||||||
|
volScalarField rAU(1.0/UEqn.A());
|
||||||
|
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
|
||||||
|
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
|
||||||
|
|
||||||
|
surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
|
||||||
|
|
||||||
|
surfaceScalarField phiHbyA
|
||||||
|
(
|
||||||
|
"phiHbyA",
|
||||||
|
(
|
||||||
|
fvc::flux(rho*HbyA)
|
||||||
|
+ MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi))
|
||||||
|
)
|
||||||
|
+ phig
|
||||||
|
);
|
||||||
|
|
||||||
|
fvc::makeRelative(phiHbyA, rho, U);
|
||||||
|
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
||||||
|
|
||||||
|
// Update the pressure BCs to ensure flux consistency
|
||||||
|
constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF);
|
||||||
|
|
||||||
|
fvScalarMatrix p_rghDDtEqn
|
||||||
|
(
|
||||||
|
fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh))
|
||||||
|
+ fvc::div(phiHbyA)
|
||||||
|
==
|
||||||
|
parcels.Srho()
|
||||||
|
+ surfaceFilm.Srho()
|
||||||
|
+ fvOptions(psi, p_rgh, rho.name())
|
||||||
|
);
|
||||||
|
|
||||||
|
while (pimple.correctNonOrthogonal())
|
||||||
|
{
|
||||||
|
fvScalarMatrix p_rghEqn
|
||||||
|
(
|
||||||
|
p_rghDDtEqn
|
||||||
|
- fvm::laplacian(rhorAUf, p_rgh)
|
||||||
|
);
|
||||||
|
|
||||||
|
p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
|
||||||
|
|
||||||
|
if (pimple.finalNonOrthogonalIter())
|
||||||
|
{
|
||||||
|
phi = phiHbyA + p_rghEqn.flux();
|
||||||
|
|
||||||
|
// Explicitly relax pressure for momentum corrector
|
||||||
|
p_rgh.relax();
|
||||||
|
|
||||||
|
U = HbyA + rAU*fvc::reconstruct((p_rghEqn.flux() + phig)/rhorAUf);
|
||||||
|
U.correctBoundaryConditions();
|
||||||
|
fvOptions.correct(U);
|
||||||
|
K = 0.5*magSqr(U);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
p = p_rgh + rho*gh;
|
||||||
|
|
||||||
|
// Thermodynamic density update
|
||||||
|
thermo.correctRho(psi*p - psip0);
|
||||||
|
|
||||||
|
#include "rhoEqn.H"
|
||||||
|
#include "compressibleContinuityErrs.H"
|
||||||
|
|
||||||
|
if (pressureControl.limit(p))
|
||||||
|
{
|
||||||
|
p.correctBoundaryConditions();
|
||||||
|
rho = thermo.rho();
|
||||||
|
p_rgh = p - rho*gh;
|
||||||
|
}
|
||||||
|
else if (pimple.SIMPLErho())
|
||||||
|
{
|
||||||
|
rho = thermo.rho();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Correct rhoUf if the mesh is moving
|
||||||
|
fvc::correctRhoUf(rhoUf, rho, U, phi);
|
||||||
|
|
||||||
|
if (thermo.dpdt())
|
||||||
|
{
|
||||||
|
dpdt = fvc::ddt(p);
|
||||||
|
|
||||||
|
if (mesh.moving())
|
||||||
|
{
|
||||||
|
dpdt -= fvc::div(fvc::meshPhi(rho, U), p);
|
||||||
|
}
|
||||||
|
}
|
||||||
50
applications/solvers/lagrangian/rhoParcelFoam/rhoEqn.H
Normal file
50
applications/solvers/lagrangian/rhoParcelFoam/rhoEqn.H
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | www.openfoam.com
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Global
|
||||||
|
rhoEqn
|
||||||
|
|
||||||
|
Description
|
||||||
|
Solve the continuity for density.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
{
|
||||||
|
fvScalarMatrix rhoEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(rho)
|
||||||
|
+ fvc::div(phi)
|
||||||
|
==
|
||||||
|
parcels.Srho(rho)
|
||||||
|
+ surfaceFilm.Srho()
|
||||||
|
+ fvOptions(rho)
|
||||||
|
);
|
||||||
|
|
||||||
|
rhoEqn.solve();
|
||||||
|
|
||||||
|
fvOptions.correct(rho);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
206
applications/solvers/lagrangian/rhoParcelFoam/rhoParcelFoam.C
Normal file
206
applications/solvers/lagrangian/rhoParcelFoam/rhoParcelFoam.C
Normal file
@ -0,0 +1,206 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | www.openfoam.com
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Application
|
||||||
|
rhoParcelFoam
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpLagrangianSolvers
|
||||||
|
|
||||||
|
Description
|
||||||
|
Transient solver for compressible, turbulent flow with a reacting,
|
||||||
|
multiphase particle cloud, and surface film modelling.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "fvCFD.H"
|
||||||
|
#include "dynamicFvMesh.H"
|
||||||
|
#include "turbulentFluidThermoModel.H"
|
||||||
|
#include "surfaceFilmModel.H"
|
||||||
|
#include "rhoReactionThermo.H"
|
||||||
|
#include "CombustionModel.H"
|
||||||
|
#include "radiationModel.H"
|
||||||
|
#include "SLGThermo.H"
|
||||||
|
#include "fvOptions.H"
|
||||||
|
#include "pimpleControl.H"
|
||||||
|
#include "pressureControl.H"
|
||||||
|
#include "CorrectPhi.H"
|
||||||
|
#include "localEulerDdtScheme.H"
|
||||||
|
#include "fvcSmooth.H"
|
||||||
|
|
||||||
|
#include "parcelCloudModelList.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Transient solver for compressible, turbulent flow"
|
||||||
|
" with lagrangian parcel clouds and surface film modelling."
|
||||||
|
);
|
||||||
|
|
||||||
|
#define CREATE_MESH createMeshesPostProcess.H
|
||||||
|
#include "postProcess.H"
|
||||||
|
|
||||||
|
#include "addCheckCaseOptions.H"
|
||||||
|
#include "setRootCaseLists.H"
|
||||||
|
#include "createTime.H"
|
||||||
|
#include "createDynamicFvMesh.H"
|
||||||
|
#include "createDyMControls.H"
|
||||||
|
#include "createFields.H"
|
||||||
|
#include "createFieldRefs.H"
|
||||||
|
#include "initContinuityErrs.H"
|
||||||
|
#include "createRhoUfIfPresent.H"
|
||||||
|
|
||||||
|
turbulence->validate();
|
||||||
|
|
||||||
|
if (!LTS)
|
||||||
|
{
|
||||||
|
#include "compressibleCourantNo.H"
|
||||||
|
#include "setInitialDeltaT.H"
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
|
while (runTime.run())
|
||||||
|
{
|
||||||
|
#include "readDyMControls.H"
|
||||||
|
|
||||||
|
// Store divrhoU from the previous mesh
|
||||||
|
// so that it can be mapped and used in correctPhi
|
||||||
|
// to ensure the corrected phi has the same divergence
|
||||||
|
autoPtr<volScalarField> divrhoU;
|
||||||
|
if (pimple.solveFlow() && correctPhi)
|
||||||
|
{
|
||||||
|
divrhoU.reset
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
"divrhoU",
|
||||||
|
fvc::div(fvc::absolute(phi, rho, U))
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (LTS)
|
||||||
|
{
|
||||||
|
#include "setRDeltaT.H"
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
#include "compressibleCourantNo.H"
|
||||||
|
#include "setMultiRegionDeltaT.H"
|
||||||
|
}
|
||||||
|
|
||||||
|
++runTime;
|
||||||
|
|
||||||
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
|
// Store momentum to set rhoUf for introduced faces.
|
||||||
|
autoPtr<volVectorField> rhoU;
|
||||||
|
if (pimple.solveFlow() && rhoUf.valid())
|
||||||
|
{
|
||||||
|
rhoU.reset(new volVectorField("rhoU", rho*U));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Store the particle positions
|
||||||
|
parcels.storeGlobalPositions();
|
||||||
|
|
||||||
|
// Do any mesh changes
|
||||||
|
mesh.update();
|
||||||
|
|
||||||
|
if (pimple.solveFlow() && mesh.changing())
|
||||||
|
{
|
||||||
|
gh = (g & mesh.C()) - ghRef;
|
||||||
|
ghf = (g & mesh.Cf()) - ghRef;
|
||||||
|
|
||||||
|
MRF.update();
|
||||||
|
|
||||||
|
if (correctPhi)
|
||||||
|
{
|
||||||
|
// Calculate absolute flux
|
||||||
|
// from the mapped surface velocity
|
||||||
|
phi = mesh.Sf() & rhoUf();
|
||||||
|
|
||||||
|
#include "../../compressible/rhoPimpleFoam/correctPhi.H"
|
||||||
|
|
||||||
|
// Make the fluxes relative to the mesh-motion
|
||||||
|
fvc::makeRelative(phi, rho, U);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (checkMeshCourantNo)
|
||||||
|
{
|
||||||
|
#include "meshCourantNo.H"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
parcels.evolve();
|
||||||
|
surfaceFilm.evolve();
|
||||||
|
|
||||||
|
if (pimple.solveFlow())
|
||||||
|
{
|
||||||
|
if (pimple.nCorrPIMPLE() <= 1)
|
||||||
|
{
|
||||||
|
#include "rhoEqn.H"
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- PIMPLE loop
|
||||||
|
while (pimple.loop())
|
||||||
|
{
|
||||||
|
#include "UEqn.H"
|
||||||
|
#include "YEqn.H"
|
||||||
|
#include "EEqn.H"
|
||||||
|
|
||||||
|
// --- Pressure corrector loop
|
||||||
|
while (pimple.correct())
|
||||||
|
{
|
||||||
|
#include "pEqn.H"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pimple.turbCorr())
|
||||||
|
{
|
||||||
|
turbulence->correct();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rho = thermo.rho();
|
||||||
|
}
|
||||||
|
|
||||||
|
runTime.write();
|
||||||
|
|
||||||
|
runTime.printExecutionTime(Info);
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2013 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -23,38 +23,33 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Global
|
||||||
Foam::basicThermoCloud
|
setMultiRegionDeltaT
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Cloud class to introduce thermodynamic parcels
|
Reset the timestep to maintain a constant maximum Courant numbers.
|
||||||
|
Reduction of time-step is immediate, but increase is damped to avoid
|
||||||
|
unstable oscillations.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef basicThermoCloud_H
|
if (adjustTimeStep)
|
||||||
#define basicThermoCloud_H
|
|
||||||
|
|
||||||
#include "ThermoCloud.H"
|
|
||||||
#include "basicThermoParcel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
{
|
||||||
typedef ThermoCloud
|
const scalar maxDeltaTFact =
|
||||||
<
|
min(maxCo/(CoNum + SMALL), maxCo/(surfaceFilm.CourantNumber() + SMALL));
|
||||||
KinematicCloud
|
const scalar deltaTFact =
|
||||||
<
|
min(min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2);
|
||||||
Cloud
|
|
||||||
<
|
runTime.setDeltaT
|
||||||
basicThermoParcel
|
(
|
||||||
>
|
min
|
||||||
>
|
(
|
||||||
> basicThermoCloud;
|
deltaTFact*runTime.deltaTValue(),
|
||||||
|
maxDeltaT
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
Info<< "deltaT = " << runTime.deltaTValue() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
137
applications/solvers/lagrangian/rhoParcelFoam/setRDeltaT.H
Normal file
137
applications/solvers/lagrangian/rhoParcelFoam/setRDeltaT.H
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | www.openfoam.com
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
{
|
||||||
|
volScalarField& rDeltaT = trDeltaT.ref();
|
||||||
|
|
||||||
|
const dictionary& pimpleDict = pimple.dict();
|
||||||
|
|
||||||
|
// Maximum flow Courant number
|
||||||
|
scalar maxCo(pimpleDict.get<scalar>("maxCo"));
|
||||||
|
|
||||||
|
// Maximum time scale
|
||||||
|
scalar maxDeltaT(pimpleDict.getOrDefault<scalar>("maxDeltaT", GREAT));
|
||||||
|
|
||||||
|
// Smoothing parameter (0-1) when smoothing iterations > 0
|
||||||
|
scalar rDeltaTSmoothingCoeff
|
||||||
|
(
|
||||||
|
pimpleDict.getOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.1)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Damping coefficient (1-0)
|
||||||
|
scalar rDeltaTDampingCoeff
|
||||||
|
(
|
||||||
|
pimpleDict.getOrDefault<scalar>("rDeltaTDampingCoeff", 0.2)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Maximum change in cell temperature per iteration
|
||||||
|
// (relative to previous value)
|
||||||
|
scalar alphaTemp(pimpleDict.getOrDefault("alphaTemp", 0.05));
|
||||||
|
|
||||||
|
|
||||||
|
Info<< "Time scales min/max:" << endl;
|
||||||
|
|
||||||
|
// Cache old reciprocal time scale field
|
||||||
|
volScalarField rDeltaT0("rDeltaT0", rDeltaT);
|
||||||
|
|
||||||
|
// Flow time scale
|
||||||
|
{
|
||||||
|
rDeltaT.ref() =
|
||||||
|
(
|
||||||
|
fvc::surfaceSum(mag(phi))()()
|
||||||
|
/((2*maxCo)*mesh.V()*rho())
|
||||||
|
);
|
||||||
|
|
||||||
|
// Limit the largest time scale
|
||||||
|
rDeltaT.max(1/maxDeltaT);
|
||||||
|
|
||||||
|
Info<< " Flow = "
|
||||||
|
<< gMin(1/rDeltaT.primitiveField()) << ", "
|
||||||
|
<< gMax(1/rDeltaT.primitiveField()) << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reaction source time scale
|
||||||
|
{
|
||||||
|
volScalarField::Internal rDeltaTT
|
||||||
|
(
|
||||||
|
mag
|
||||||
|
(
|
||||||
|
parcels.hsTrans()/(mesh.V()*runTime.deltaT())
|
||||||
|
+ Qdot()
|
||||||
|
)
|
||||||
|
/(
|
||||||
|
alphaTemp
|
||||||
|
*rho()
|
||||||
|
*thermo.Cp()()()
|
||||||
|
*T()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
Info<< " Temperature = "
|
||||||
|
<< gMin(1/(rDeltaTT.field() + VSMALL)) << ", "
|
||||||
|
<< gMax(1/(rDeltaTT.field() + VSMALL)) << endl;
|
||||||
|
|
||||||
|
rDeltaT.ref() = max
|
||||||
|
(
|
||||||
|
rDeltaT(),
|
||||||
|
rDeltaTT
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update the boundary values of the reciprocal time-step
|
||||||
|
rDeltaT.correctBoundaryConditions();
|
||||||
|
|
||||||
|
// Spatially smooth the time scale field
|
||||||
|
if (rDeltaTSmoothingCoeff < 1.0)
|
||||||
|
{
|
||||||
|
fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Limit rate of change of time scale
|
||||||
|
// - reduce as much as required
|
||||||
|
// - only increase at a fraction of old time scale
|
||||||
|
if
|
||||||
|
(
|
||||||
|
rDeltaTDampingCoeff < 1.0
|
||||||
|
&& runTime.timeIndex() > runTime.startTimeIndex() + 1
|
||||||
|
)
|
||||||
|
{
|
||||||
|
rDeltaT = max
|
||||||
|
(
|
||||||
|
rDeltaT,
|
||||||
|
(scalar(1) - rDeltaTDampingCoeff)*rDeltaT0
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< " Overall = "
|
||||||
|
<< gMin(1/rDeltaT.primitiveField())
|
||||||
|
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -2,12 +2,11 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteArea/lnInclude \
|
-I$(LIB_SRC)/finiteArea/lnInclude \
|
||||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I${LIB_SRC}/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/coalCombustion/lnInclude \
|
|
||||||
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||||
@ -47,7 +46,6 @@ EXE_LIBS = \
|
|||||||
-lsurfaceFilmModels \
|
-lsurfaceFilmModels \
|
||||||
-lcombustionModels \
|
-lcombustionModels \
|
||||||
-lsampling \
|
-lsampling \
|
||||||
-lcoalCombustion \
|
|
||||||
-lregionFaModels \
|
-lregionFaModels \
|
||||||
-lfiniteArea \
|
-lfiniteArea \
|
||||||
-lfaOptions
|
-lfaOptions
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
Info<< "\nConstructing coal cloud" << endl;
|
Info<< "\nConstructing coal cloud" << endl;
|
||||||
coalCloud parcels
|
reactingMultiphaseCloud parcels
|
||||||
(
|
(
|
||||||
"reactingCloud1",
|
"reactingCloud1",
|
||||||
|
g,
|
||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
g,
|
|
||||||
slgThermo
|
slgThermo
|
||||||
);
|
);
|
||||||
|
|||||||
@ -37,7 +37,7 @@ Description
|
|||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "turbulentFluidThermoModel.H"
|
#include "turbulentFluidThermoModel.H"
|
||||||
#include "coalCloud.H"
|
#include "reactingMultiphaseCloud.H"
|
||||||
#include "rhoReactionThermo.H"
|
#include "rhoReactionThermo.H"
|
||||||
#include "CombustionModel.H"
|
#include "CombustionModel.H"
|
||||||
#include "radiationModel.H"
|
#include "radiationModel.H"
|
||||||
|
|||||||
@ -2,8 +2,8 @@ EXE_INC = \
|
|||||||
-I../reactingParcelFoam \
|
-I../reactingParcelFoam \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteArea/lnInclude \
|
-I$(LIB_SRC)/finiteArea/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I${LIB_SRC}/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/sampling/lnInclude \
|
-I${LIB_SRC}/sampling/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||||
@ -35,7 +35,6 @@ EXE_LIBS = \
|
|||||||
-llagrangian \
|
-llagrangian \
|
||||||
-llagrangianIntermediate \
|
-llagrangianIntermediate \
|
||||||
-llagrangianTurbulence \
|
-llagrangianTurbulence \
|
||||||
-llagrangianSpray \
|
|
||||||
-lspecie \
|
-lspecie \
|
||||||
-lcompressibleTransportModels \
|
-lcompressibleTransportModels \
|
||||||
-lfluidThermophysicalModels \
|
-lfluidThermophysicalModels \
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
Info<< "\nConstructing reacting cloud" << endl;
|
Info<< "\nConstructing reacting cloud" << endl;
|
||||||
basicSprayCloud parcels
|
sprayCloud parcels
|
||||||
(
|
(
|
||||||
"sprayCloud",
|
"sprayCloud",
|
||||||
|
g,
|
||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
g,
|
|
||||||
slgThermo
|
slgThermo
|
||||||
);
|
);
|
||||||
|
|||||||
@ -4,8 +4,8 @@ EXE_INC = \
|
|||||||
-I../../reactingParcelFoam \
|
-I../../reactingParcelFoam \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteArea/lnInclude \
|
-I$(LIB_SRC)/finiteArea/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I${LIB_SRC}/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/sampling/lnInclude \
|
-I${LIB_SRC}/sampling/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||||
@ -39,7 +39,6 @@ EXE_LIBS = \
|
|||||||
-llagrangian \
|
-llagrangian \
|
||||||
-llagrangianIntermediate \
|
-llagrangianIntermediate \
|
||||||
-llagrangianTurbulence \
|
-llagrangianTurbulence \
|
||||||
-llagrangianSpray \
|
|
||||||
-lspecie \
|
-lspecie \
|
||||||
-lcompressibleTransportModels \
|
-lcompressibleTransportModels \
|
||||||
-lfluidThermophysicalModels \
|
-lfluidThermophysicalModels \
|
||||||
|
|||||||
@ -37,7 +37,7 @@ Description
|
|||||||
#include "engineTime.H"
|
#include "engineTime.H"
|
||||||
#include "engineMesh.H"
|
#include "engineMesh.H"
|
||||||
#include "turbulentFluidThermoModel.H"
|
#include "turbulentFluidThermoModel.H"
|
||||||
#include "basicSprayCloud.H"
|
#include "sprayCloud.H"
|
||||||
#include "psiReactionThermo.H"
|
#include "psiReactionThermo.H"
|
||||||
#include "CombustionModel.H"
|
#include "CombustionModel.H"
|
||||||
#include "radiationModel.H"
|
#include "radiationModel.H"
|
||||||
|
|||||||
@ -2,7 +2,7 @@ EXE_INC = \
|
|||||||
-I$(FOAM_SOLVERS)/lagrangian/reactingParcelFoam/simpleReactingParcelFoam \
|
-I$(FOAM_SOLVERS)/lagrangian/reactingParcelFoam/simpleReactingParcelFoam \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteArea/lnInclude \
|
-I$(LIB_SRC)/finiteArea/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I${LIB_SRC}/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/sampling/lnInclude \
|
-I$(LIB_SRC)/sampling/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||||
@ -34,7 +34,6 @@ EXE_LIBS = \
|
|||||||
-lthermoTools \
|
-lthermoTools \
|
||||||
-llagrangian \
|
-llagrangian \
|
||||||
-llagrangianIntermediate \
|
-llagrangianIntermediate \
|
||||||
-llagrangianSpray \
|
|
||||||
-llagrangianTurbulence \
|
-llagrangianTurbulence \
|
||||||
-lspecie \
|
-lspecie \
|
||||||
-lcompressibleTransportModels \
|
-lcompressibleTransportModels \
|
||||||
|
|||||||
@ -35,7 +35,7 @@ Description
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#define CLOUD_BASE_TYPE Spray
|
#define CLOUD_BASE_TYPE spray
|
||||||
#define CLOUD_BASE_TYPE_NAME "spray"
|
#define CLOUD_BASE_TYPE_NAME "spray"
|
||||||
|
|
||||||
#include "simpleReactingParcelFoam.C"
|
#include "simpleReactingParcelFoam.C"
|
||||||
|
|||||||
@ -4,8 +4,8 @@ EXE_INC = \
|
|||||||
-I../../../compressible/rhoPimpleFoam \
|
-I../../../compressible/rhoPimpleFoam \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteArea/lnInclude \
|
-I$(LIB_SRC)/finiteArea/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I${LIB_SRC}/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/sampling/lnInclude \
|
-I${LIB_SRC}/sampling/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||||
@ -40,7 +40,6 @@ EXE_LIBS = \
|
|||||||
-llagrangian \
|
-llagrangian \
|
||||||
-llagrangianIntermediate \
|
-llagrangianIntermediate \
|
||||||
-llagrangianTurbulence \
|
-llagrangianTurbulence \
|
||||||
-llagrangianSpray \
|
|
||||||
-lspecie \
|
-lspecie \
|
||||||
-lcompressibleTransportModels \
|
-lcompressibleTransportModels \
|
||||||
-lfluidThermophysicalModels \
|
-lfluidThermophysicalModels \
|
||||||
|
|||||||
@ -38,7 +38,7 @@ Description
|
|||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "dynamicFvMesh.H"
|
#include "dynamicFvMesh.H"
|
||||||
#include "turbulenceModel.H"
|
#include "turbulenceModel.H"
|
||||||
#include "basicSprayCloud.H"
|
#include "sprayCloud.H"
|
||||||
#include "psiReactionThermo.H"
|
#include "psiReactionThermo.H"
|
||||||
#include "CombustionModel.H"
|
#include "CombustionModel.H"
|
||||||
#include "radiationModel.H"
|
#include "radiationModel.H"
|
||||||
|
|||||||
@ -37,7 +37,7 @@ Description
|
|||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "turbulentFluidThermoModel.H"
|
#include "turbulentFluidThermoModel.H"
|
||||||
#include "basicSprayCloud.H"
|
#include "sprayCloud.H"
|
||||||
#include "psiReactionThermo.H"
|
#include "psiReactionThermo.H"
|
||||||
#include "CombustionModel.H"
|
#include "CombustionModel.H"
|
||||||
#include "radiationModel.H"
|
#include "radiationModel.H"
|
||||||
|
|||||||
@ -9,6 +9,8 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||||
|
|||||||
@ -55,11 +55,11 @@ const word kinematicCloudName
|
|||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
|
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
|
||||||
basicKinematicCloud kinematicCloud
|
kinematicCloud kCloud
|
||||||
(
|
(
|
||||||
kinematicCloudName,
|
kinematicCloudName,
|
||||||
|
g,
|
||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
thermo.mu(),
|
thermo.mu()
|
||||||
g
|
|
||||||
);
|
);
|
||||||
|
|||||||
@ -10,6 +10,8 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||||
|
|||||||
@ -37,7 +37,7 @@ Description
|
|||||||
#include "dynamicFvMesh.H"
|
#include "dynamicFvMesh.H"
|
||||||
#include "psiThermo.H"
|
#include "psiThermo.H"
|
||||||
#include "turbulentFluidThermoModel.H"
|
#include "turbulentFluidThermoModel.H"
|
||||||
#include "basicKinematicCloud.H"
|
#include "kinematicCloud.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -73,14 +73,14 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
kinematicCloud.storeGlobalPositions();
|
kCloud.storeGlobalPositions();
|
||||||
|
|
||||||
mesh.update();
|
mesh.update();
|
||||||
|
|
||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
|
|
||||||
Info<< "Evolving " << kinematicCloud.name() << endl;
|
Info<< "Evolving " << kCloud.name() << endl;
|
||||||
kinematicCloud.evolve();
|
kCloud.evolve();
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
|
|||||||
@ -39,7 +39,7 @@ Description
|
|||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "psiThermo.H"
|
#include "psiThermo.H"
|
||||||
#include "turbulentFluidThermoModel.H"
|
#include "turbulentFluidThermoModel.H"
|
||||||
#include "basicKinematicCloud.H"
|
#include "kinematicCloud.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -75,8 +75,8 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
Info<< "Evolving " << kinematicCloud.name() << endl;
|
Info<< "Evolving " << kCloud.name() << endl;
|
||||||
kinematicCloud.evolve();
|
kCloud.evolve();
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
|
|||||||
@ -52,7 +52,7 @@ Description
|
|||||||
#include "CorrectPhi.H"
|
#include "CorrectPhi.H"
|
||||||
#include "fvcSmooth.H"
|
#include "fvcSmooth.H"
|
||||||
|
|
||||||
#include "basicKinematicCloud.H"
|
#include "kinematicCloud.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -111,12 +111,12 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
Info<< "Evolving " << kinematicCloud.name() << endl;
|
Info<< "Evolving " << kCloud.name() << endl;
|
||||||
|
|
||||||
kinematicCloud.evolve();
|
kCloud.evolve();
|
||||||
|
|
||||||
// Update continuous phase volume fraction field
|
// Update continuous phase volume fraction field
|
||||||
alphac = max(1.0 - kinematicCloud.theta(), alphacMin);
|
alphac = max(1.0 - kCloud.theta(), alphacMin);
|
||||||
alphac.correctBoundaryConditions();
|
alphac.correctBoundaryConditions();
|
||||||
|
|
||||||
Info<< "Continuous phase-1 volume fraction = "
|
Info<< "Continuous phase-1 volume fraction = "
|
||||||
@ -130,7 +130,7 @@ int main(int argc, char *argv[])
|
|||||||
alphaPhic = alphacf*phi;
|
alphaPhic = alphacf*phi;
|
||||||
alphacRho = alphac*rho;
|
alphacRho = alphac*rho;
|
||||||
|
|
||||||
fvVectorMatrix cloudSU(kinematicCloud.SU(U));
|
fvVectorMatrix cloudSU(kCloud.SU(U));
|
||||||
volVectorField cloudVolSUSu
|
volVectorField cloudVolSUSu
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
|
|||||||
@ -12,11 +12,14 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels \
|
-I$(LIB_SRC)/transportModels \
|
||||||
-I$(LIB_SRC)/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude \
|
-I$(LIB_SRC)/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \
|
-I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
|
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
|
||||||
|
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
|
||||||
@ -42,5 +45,4 @@ EXE_LIBS = \
|
|||||||
-lregionModels \
|
-lregionModels \
|
||||||
-lregionFaModels \
|
-lregionFaModels \
|
||||||
-lsurfaceFilmModels \
|
-lsurfaceFilmModels \
|
||||||
-lfiniteArea \
|
|
||||||
-lcompressibleTwoPhaseMixtureTurbulenceModels
|
-lcompressibleTwoPhaseMixtureTurbulenceModels
|
||||||
|
|||||||
@ -147,13 +147,13 @@ volScalarField alphacRho(alphac*rho);
|
|||||||
alphacRho.oldTime();
|
alphacRho.oldTime();
|
||||||
|
|
||||||
Info<< "Constructing kinematicCloud " << endl;
|
Info<< "Constructing kinematicCloud " << endl;
|
||||||
basicKinematicCloud kinematicCloud
|
kinematicCloud kCloud
|
||||||
(
|
(
|
||||||
"kinematicCloud",
|
"kinematicCloud",
|
||||||
|
g,
|
||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
mu,
|
mu
|
||||||
g
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// Particle fraction upper limit
|
// Particle fraction upper limit
|
||||||
@ -161,13 +161,13 @@ scalar alphacMin
|
|||||||
(
|
(
|
||||||
1.0
|
1.0
|
||||||
- (
|
- (
|
||||||
kinematicCloud.particleProperties().subDict("constantProperties")
|
kCloud.particleProperties().subDict("constantProperties")
|
||||||
.get<scalar>("alphaMax")
|
.get<scalar>("alphaMax")
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Update alphac from the particle locations
|
// Update alphac from the particle locations
|
||||||
alphac = max(1.0 - kinematicCloud.theta(), alphacMin);
|
alphac = max(1.0 - kCloud.theta(), alphacMin);
|
||||||
alphac.correctBoundaryConditions();
|
alphac.correctBoundaryConditions();
|
||||||
|
|
||||||
surfaceScalarField alphacf("alphacf", fvc::interpolate(alphac));
|
surfaceScalarField alphacf("alphacf", fvc::interpolate(alphac));
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017-2022 OpenCFD Ltd.
|
Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -59,7 +59,7 @@ Foam::DTRMParticle::DTRMParticle
|
|||||||
{
|
{
|
||||||
if (readFields)
|
if (readFields)
|
||||||
{
|
{
|
||||||
if (is.format() == IOstreamOption::ASCII)
|
if (is.format() == IOstream::ASCII)
|
||||||
{
|
{
|
||||||
is >> p0_ >> p1_ >> I0_ >> I_ >> dA_ >> transmissiveId_;
|
is >> p0_ >> p1_ >> I0_ >> I_ >> dA_ >> transmissiveId_;
|
||||||
}
|
}
|
||||||
@ -115,7 +115,7 @@ void Foam::DTRMParticle::writeProperties
|
|||||||
|
|
||||||
Foam::Ostream& Foam::operator<<(Ostream& os, const DTRMParticle& p)
|
Foam::Ostream& Foam::operator<<(Ostream& os, const DTRMParticle& p)
|
||||||
{
|
{
|
||||||
if (os.format() == IOstreamOption::ASCII)
|
if (os.format() == IOstream::ASCII)
|
||||||
{
|
{
|
||||||
os << static_cast<const particle&>(p)
|
os << static_cast<const particle&>(p)
|
||||||
<< token::SPACE << p.p0_
|
<< token::SPACE << p.p0_
|
||||||
|
|||||||
@ -157,7 +157,12 @@ void Foam::radiation::laserDTRM::initialiseReflection()
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
reflectionSwitch_ = returnReduceOr(reflections_.size());
|
if (reflections_.size())
|
||||||
|
{
|
||||||
|
reflectionSwitch_ = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
reflectionSwitch_ = returnReduce(reflectionSwitch_, orOp<bool>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -294,12 +299,14 @@ void Foam::radiation::laserDTRM::initialise()
|
|||||||
DTRMCloud_.addParticle(pPtr);
|
DTRMCloud_.addParticle(pPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nMissed < 10 && returnReduceAnd(cellI < 0))
|
if (returnReduce(cellI, maxOp<label>()) == -1)
|
||||||
{
|
{
|
||||||
++nMissed;
|
if (++nMissed <= 10)
|
||||||
WarningInFunction
|
{
|
||||||
<< "Cannot find owner cell for focalPoint at "
|
WarningInFunction
|
||||||
<< p0 << endl;
|
<< "Cannot find owner cell for focalPoint at "
|
||||||
|
<< p0 << endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -692,7 +699,7 @@ void Foam::radiation::laserDTRM::calculate()
|
|||||||
|
|
||||||
for (label pointi = 0; pointi < lines.size(); pointi += 2)
|
for (label pointi = 0; pointi < lines.size(); pointi += 2)
|
||||||
{
|
{
|
||||||
os.writeLine(lines[pointi], lines[pointi+1]);
|
os.write(linePointRef(lines[pointi], lines[pointi+1]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2020-2022 OpenCFD Ltd.
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -49,8 +49,8 @@ int main(int argc, char *argv[])
|
|||||||
#include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
|
|
||||||
IOstreamOption streamOpt(IOstreamOption::BINARY);
|
IOstream::streamFormat format = IOstream::BINARY;
|
||||||
// IOstreamOption streamOpt(IOstreamOption::ASCII);
|
// IOstream::streamFormat format = IOstream::ASCII;
|
||||||
|
|
||||||
const label size = 20000000;
|
const label size = 20000000;
|
||||||
|
|
||||||
@ -85,7 +85,11 @@ int main(int argc, char *argv[])
|
|||||||
<< runTime.cpuTimeIncrement() << " s" << nl << endl;
|
<< runTime.cpuTimeIncrement() << " s" << nl << endl;
|
||||||
|
|
||||||
|
|
||||||
faces2.writeObject(streamOpt, true);
|
faces2.writeObject
|
||||||
|
(
|
||||||
|
IOstreamOption(format),
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
Info<< "Written old format faceList in = "
|
Info<< "Written old format faceList in = "
|
||||||
<< runTime.cpuTimeIncrement() << " s" << nl << endl;
|
<< runTime.cpuTimeIncrement() << " s" << nl << endl;
|
||||||
@ -141,7 +145,11 @@ int main(int argc, char *argv[])
|
|||||||
<< runTime.cpuTimeIncrement() << " s" << nl << endl;
|
<< runTime.cpuTimeIncrement() << " s" << nl << endl;
|
||||||
|
|
||||||
|
|
||||||
faces2.writeObject(streamOpt, true);
|
faces2.writeObject
|
||||||
|
(
|
||||||
|
IOstreamOption(format),
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
Info<< "Written new format faceList in = "
|
Info<< "Written new format faceList in = "
|
||||||
<< runTime.cpuTimeIncrement() << " s" << nl << endl;
|
<< runTime.cpuTimeIncrement() << " s" << nl << endl;
|
||||||
|
|||||||
@ -28,6 +28,11 @@ License
|
|||||||
#include "DirLister.H"
|
#include "DirLister.H"
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
static const Foam::word extgz("gz");
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
bool Foam::DirLister::const_iterator::open(const fileName& dir)
|
bool Foam::DirLister::const_iterator::open(const fileName& dir)
|
||||||
@ -105,9 +110,9 @@ Foam::word Foam::DirLister::next(DIR* dirPtr) const
|
|||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
if (fType == fileName::FILE && stripgz_ && name.has_ext("gz"))
|
if (fType == fileName::FILE && stripgz_ && name.hasExt(extgz))
|
||||||
{
|
{
|
||||||
name.remove_ext();
|
name = name.lessExt();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!name.empty() && accept(name))
|
if (!name.empty() && accept(name))
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2021-2022 OpenCFD Ltd.
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -104,7 +104,7 @@ void readList
|
|||||||
{
|
{
|
||||||
OTstream os;
|
OTstream os;
|
||||||
os << input;
|
os << input;
|
||||||
ITstream is(os.tokens());
|
ITstream is("input", os.tokens());
|
||||||
|
|
||||||
is >> output;
|
is >> output;
|
||||||
}
|
}
|
||||||
@ -118,7 +118,7 @@ void readList
|
|||||||
{
|
{
|
||||||
OTstream os;
|
OTstream os;
|
||||||
os << input;
|
os << input;
|
||||||
ITstream is(os.tokens());
|
ITstream is("input", os.tokens());
|
||||||
|
|
||||||
is >> output;
|
is >> output;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
Test-FieldFields1.C
|
|
||||||
|
|
||||||
EXE = $(FOAM_USER_APPBIN)/Test-FieldFields1
|
|
||||||
@ -1,117 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | www.openfoam.com
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
Copyright (C) 2022 OpenCFD Ltd.
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Application
|
|
||||||
Test-FieldFields1
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "symmTensorField.H"
|
|
||||||
#include "tensorField.H"
|
|
||||||
#include "FieldFields.H"
|
|
||||||
#include "Random.H"
|
|
||||||
|
|
||||||
using namespace Foam;
|
|
||||||
|
|
||||||
|
|
||||||
template<class Cmpt>
|
|
||||||
void printFieldField(const FieldField<Field, Cmpt>& ff)
|
|
||||||
{
|
|
||||||
forAll(ff, i)
|
|
||||||
{
|
|
||||||
Info<< i << ": " << flatOutput(ff[i]) << nl;
|
|
||||||
}
|
|
||||||
Info<< nl;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
tmp<Field<Type>> randomField(Random& rnd, label dim)
|
|
||||||
{
|
|
||||||
auto tfld = tmp<Field<Type>>::New(dim);
|
|
||||||
auto& fld = tfld.ref();
|
|
||||||
|
|
||||||
for (Type& val : fld)
|
|
||||||
{
|
|
||||||
for (direction cmpt=0; cmpt < pTraits<Type>::nComponents; ++cmpt)
|
|
||||||
{
|
|
||||||
setComponent(val, cmpt) = rnd.position<label>(0, 100);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return tfld;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
tmp<Field<Type>> randomField(label dim)
|
|
||||||
{
|
|
||||||
Random rnd;
|
|
||||||
return randomField<Type>(rnd, dim);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
// scalarField
|
|
||||||
{
|
|
||||||
Info<< nl << "scalarFieldField" << nl;
|
|
||||||
|
|
||||||
Random rnd;
|
|
||||||
|
|
||||||
FieldField<Field, scalar> sff1(6);
|
|
||||||
forAll(sff1, i)
|
|
||||||
{
|
|
||||||
sff1.set(i, randomField<scalar>(rnd, 8));
|
|
||||||
}
|
|
||||||
|
|
||||||
printFieldField(sff1);
|
|
||||||
|
|
||||||
Info<< nl << "indexing:" << nl;
|
|
||||||
|
|
||||||
{
|
|
||||||
labelPair index;
|
|
||||||
const label range1 = sff1.size()-1;
|
|
||||||
const label range2 = sff1[0].size()-1;
|
|
||||||
|
|
||||||
for (label iter = 0; iter < 10; ++iter)
|
|
||||||
{
|
|
||||||
index.first() = rnd.position<label>(0, range1);
|
|
||||||
index.second() = rnd.position<label>(0, range2);
|
|
||||||
|
|
||||||
Info<< index << " => " << sff1[index] << nl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Info<< nl << "End\n" << nl;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
Test-FieldFields2.C
|
|
||||||
|
|
||||||
EXE = $(FOAM_USER_APPBIN)/Test-FieldFields2
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
/* EXE_INC = */
|
|
||||||
/* EXE_LIBS = */
|
|
||||||
@ -113,6 +113,7 @@ int main(int argc, char *argv[])
|
|||||||
label coarseSize = max(addr)+1;
|
label coarseSize = max(addr)+1;
|
||||||
|
|
||||||
Info<< "Level : " << level << endl
|
Info<< "Level : " << level << endl
|
||||||
|
<< returnReduce(addr.size(), sumOp<label>()) << endl
|
||||||
<< " current size : "
|
<< " current size : "
|
||||||
<< returnReduce(addr.size(), sumOp<label>()) << endl
|
<< returnReduce(addr.size(), sumOp<label>()) << endl
|
||||||
<< " agglomerated size : "
|
<< " agglomerated size : "
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011 OpenFOAM Foundation
|
Copyright (C) 2011 OpenFOAM Foundation
|
||||||
Copyright (C) 2017-2022 OpenCFD Ltd.
|
Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -31,10 +31,7 @@ Description
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "autoPtr.H"
|
#include "autoPtr.H"
|
||||||
#include "refPtr.H"
|
#include "HashPtrTable.H"
|
||||||
#include "tmp.H"
|
|
||||||
#include "PtrMap.H"
|
|
||||||
#include "primitiveFields.H"
|
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -253,42 +250,6 @@ int main()
|
|||||||
Info<< "Table: " << tbl << nl;
|
Info<< "Table: " << tbl << nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
PtrMap<scalarField> fields;
|
|
||||||
|
|
||||||
{
|
|
||||||
const label patchi = 2;
|
|
||||||
|
|
||||||
scalarField fld1(patchi, 5.0);
|
|
||||||
scalarField fld2(patchi, 8.0);
|
|
||||||
|
|
||||||
// assign from tmp<>
|
|
||||||
fields.set( patchi, (fld1 * fld2));
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
const label patchi = 3;
|
|
||||||
|
|
||||||
scalarField fld1(patchi, 6.0);
|
|
||||||
|
|
||||||
// From tmp (clone)
|
|
||||||
fields.set(patchi, tmp<scalarField>(fld1));
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
const label patchi = 4;
|
|
||||||
|
|
||||||
// From refPtr
|
|
||||||
fields.set(patchi, refPtr<scalarField>::New(patchi, 10.0));
|
|
||||||
}
|
|
||||||
|
|
||||||
Info<< nl
|
|
||||||
<< "PtrMap:" << nl
|
|
||||||
<< fields << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
Info<< "\nEnd" << nl;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
EXE_INC = $(c++LESSWARN)
|
EXE_INC = ${c++LESSWARN}
|
||||||
|
|
||||||
/* EXE_LIBS = */
|
/* EXE_LIBS = */
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
EXE_INC = $(c++LESSWARN)
|
EXE_INC = ${c++LESSWARN}
|
||||||
|
|
||||||
/* EXE_LIBS = */
|
/* EXE_LIBS = */
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
EXE_INC = $(c++LESSWARN)
|
EXE_INC = ${c++LESSWARN}
|
||||||
|
|
||||||
/* EXE_LIBS = */
|
/* EXE_LIBS = */
|
||||||
|
|||||||
@ -90,7 +90,7 @@ void writeAndRead
|
|||||||
const IOobject& io,
|
const IOobject& io,
|
||||||
const label sz,
|
const label sz,
|
||||||
const word& writeType,
|
const word& writeType,
|
||||||
IOobjectOption::readOption rOpt,
|
const IOobject::readOption rOpt,
|
||||||
const word& readType
|
const word& readType
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -208,8 +208,7 @@ int main(int argc, char *argv[])
|
|||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::NO_WRITE,
|
IOobject::NO_WRITE
|
||||||
IOobject::NO_REGISTER
|
|
||||||
);
|
);
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -244,7 +243,9 @@ int main(int argc, char *argv[])
|
|||||||
args.executable(),
|
args.executable(),
|
||||||
"constant",
|
"constant",
|
||||||
runTime,
|
runTime,
|
||||||
IOobject::NO_REGISTER // implicit convert to IOobjectOption
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
labelList ints(identity(200));
|
labelList ints(identity(200));
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user