mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
INT: reactingParcelFoam: add dynamicMeshMotion capabilities
This commit is contained in:
committed by
Andrew Heather
parent
6ca6b34add
commit
5e539b30a9
@ -2,6 +2,8 @@ EXE_INC = \
|
|||||||
-I../reactingParcelFoam \
|
-I../reactingParcelFoam \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I${LIB_SRC}/meshTools/lnInclude \
|
-I${LIB_SRC}/meshTools/lnInclude \
|
||||||
|
-I$(LIB_SRC)/dynamicMesh/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 \
|
||||||
@ -27,6 +29,8 @@ EXE_LIBS = \
|
|||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lfvOptions \
|
-lfvOptions \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
|
-ldynamicMesh \
|
||||||
|
-ldynamicFvMesh \
|
||||||
-lsampling \
|
-lsampling \
|
||||||
-lturbulenceModels \
|
-lturbulenceModels \
|
||||||
-lcompressibleTurbulenceModels \
|
-lcompressibleTurbulenceModels \
|
||||||
|
|||||||
@ -81,7 +81,15 @@ else if (pimple.SIMPLErho())
|
|||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Correct rhoUf if the mesh is moving
|
||||||
|
fvc::correctRhoUf(rhoUf, rho, U, phi);
|
||||||
|
|
||||||
if (thermo.dpdt())
|
if (thermo.dpdt())
|
||||||
{
|
{
|
||||||
dpdt = fvc::ddt(p);
|
dpdt = fvc::ddt(p);
|
||||||
|
|
||||||
|
if (mesh.moving())
|
||||||
|
{
|
||||||
|
dpdt -= fvc::div(fvc::meshPhi(rho, U), p);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,8 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/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)/dynamicFvMesh/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 \
|
||||||
@ -28,6 +30,8 @@ EXE_LIBS = \
|
|||||||
-lfvOptions \
|
-lfvOptions \
|
||||||
-lsampling \
|
-lsampling \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
|
-ldynamicMesh \
|
||||||
|
-ldynamicFvMesh \
|
||||||
-lturbulenceModels \
|
-lturbulenceModels \
|
||||||
-lcompressibleTurbulenceModels \
|
-lcompressibleTurbulenceModels \
|
||||||
-lspecie \
|
-lspecie \
|
||||||
|
|||||||
@ -5,8 +5,8 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||||
Copyright (C) 2018-2019 OpenCFD Ltd.
|
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -37,8 +37,8 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
|
#include "dynamicFvMesh.H"
|
||||||
#include "turbulentFluidThermoModel.H"
|
#include "turbulentFluidThermoModel.H"
|
||||||
|
|
||||||
#include "surfaceFilmModel.H"
|
#include "surfaceFilmModel.H"
|
||||||
#include "rhoReactionThermo.H"
|
#include "rhoReactionThermo.H"
|
||||||
#include "CombustionModel.H"
|
#include "CombustionModel.H"
|
||||||
@ -47,6 +47,7 @@ Description
|
|||||||
#include "fvOptions.H"
|
#include "fvOptions.H"
|
||||||
#include "pimpleControl.H"
|
#include "pimpleControl.H"
|
||||||
#include "pressureControl.H"
|
#include "pressureControl.H"
|
||||||
|
#include "CorrectPhi.H"
|
||||||
#include "localEulerDdtScheme.H"
|
#include "localEulerDdtScheme.H"
|
||||||
#include "fvcSmooth.H"
|
#include "fvcSmooth.H"
|
||||||
#include "cloudMacros.H"
|
#include "cloudMacros.H"
|
||||||
@ -76,13 +77,13 @@ int main(int argc, char *argv[])
|
|||||||
#include "addCheckCaseOptions.H"
|
#include "addCheckCaseOptions.H"
|
||||||
#include "setRootCaseLists.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createDynamicFvMesh.H"
|
||||||
#include "createControl.H"
|
#include "createDyMControls.H"
|
||||||
#include "createTimeControls.H"
|
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
#include "createFieldRefs.H"
|
#include "createFieldRefs.H"
|
||||||
#include "createRegionControls.H"
|
#include "createRegionControls.H"
|
||||||
#include "initContinuityErrs.H"
|
#include "initContinuityErrs.H"
|
||||||
|
#include "createRhoUfIfPresent.H"
|
||||||
|
|
||||||
turbulence->validate();
|
turbulence->validate();
|
||||||
|
|
||||||
@ -98,7 +99,23 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
while (runTime.run())
|
while (runTime.run())
|
||||||
{
|
{
|
||||||
#include "readTimeControls.H"
|
#include "readDyMControls.H"
|
||||||
|
|
||||||
|
// Store divrhoU from the previous mesh
|
||||||
|
// so that it can be mapped and used in correctPhi
|
||||||
|
// to ensure the corrected phi has the same divergence
|
||||||
|
autoPtr<volScalarField> divrhoU;
|
||||||
|
if (solvePrimaryRegion && correctPhi)
|
||||||
|
{
|
||||||
|
divrhoU.reset
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
"divrhoU",
|
||||||
|
fvc::div(fvc::absolute(phi, rho, U))
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (LTS)
|
if (LTS)
|
||||||
{
|
{
|
||||||
@ -114,6 +131,44 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
|
// Store momentum to set rhoUf for introduced faces.
|
||||||
|
autoPtr<volVectorField> rhoU;
|
||||||
|
if (solvePrimaryRegion && rhoUf.valid())
|
||||||
|
{
|
||||||
|
rhoU.reset(new volVectorField("rhoU", rho*U));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Store the particle positions
|
||||||
|
parcels.storeGlobalPositions();
|
||||||
|
|
||||||
|
// Do any mesh changes
|
||||||
|
mesh.update();
|
||||||
|
|
||||||
|
if (solvePrimaryRegion && mesh.changing())
|
||||||
|
{
|
||||||
|
gh = (g & mesh.C()) - ghRef;
|
||||||
|
ghf = (g & mesh.Cf()) - ghRef;
|
||||||
|
|
||||||
|
MRF.update();
|
||||||
|
|
||||||
|
if (correctPhi)
|
||||||
|
{
|
||||||
|
// 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();
|
parcels.evolve();
|
||||||
surfaceFilm.evolve();
|
surfaceFilm.evolve();
|
||||||
|
|
||||||
|
|||||||
@ -103,7 +103,7 @@ License
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update tho boundary values of the reciprocal time-step
|
// Update the boundary values of the reciprocal time-step
|
||||||
rDeltaT.correctBoundaryConditions();
|
rDeltaT.correctBoundaryConditions();
|
||||||
|
|
||||||
// Spatially smooth the time scale field
|
// Spatially smooth the time scale field
|
||||||
|
|||||||
Reference in New Issue
Block a user