Skip to content
Snippets Groups Projects
Commit eb7456ee authored by andy's avatar andy
Browse files

ENH: Added fvOptions support to buoyantBoussinesq heat transfer solvers

parent c29b9fc0
Branches
Tags
No related merge requests found
EXE_INC = \ EXE_INC = \
-I../buoyantBoussinesqSimpleFoam \ -I../buoyantBoussinesqSimpleFoam \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \
...@@ -9,6 +12,8 @@ EXE_INC = \ ...@@ -9,6 +12,8 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lfvOptions \
-lsampling \
-lmeshTools \ -lmeshTools \
-lincompressibleTurbulenceModel \ -lincompressibleTurbulenceModel \
-lincompressibleRASModels \ -lincompressibleRASModels \
......
...@@ -11,12 +11,18 @@ ...@@ -11,12 +11,18 @@
- fvm::laplacian(alphaEff, T) - fvm::laplacian(alphaEff, T)
== ==
radiation->ST(rhoCpRef, T) radiation->ST(rhoCpRef, T)
+ fvOptions(T)
); );
TEqn.relax(); TEqn.relax();
fvOptions.constrain(TEqn);
TEqn.solve(); TEqn.solve();
radiation->correct(); radiation->correct();
fvOptions.correct(T);
rhok = 1.0 - beta*(T - TRef); rhok = 1.0 - beta*(T - TRef);
} }
...@@ -5,10 +5,14 @@ ...@@ -5,10 +5,14 @@
fvm::ddt(U) fvm::ddt(U)
+ fvm::div(phi, U) + fvm::div(phi, U)
+ turbulence->divDevReff(U) + turbulence->divDevReff(U)
==
fvOptions(U)
); );
UEqn.relax(); UEqn.relax();
fvOptions.constrain(UEqn);
if (pimple.momentumPredictor()) if (pimple.momentumPredictor())
{ {
solve solve
...@@ -23,4 +27,6 @@ ...@@ -23,4 +27,6 @@
)*mesh.magSf() )*mesh.magSf()
) )
); );
fvOptions.correct(U);
} }
...@@ -48,8 +48,9 @@ Description ...@@ -48,8 +48,9 @@ Description
#include "fvCFD.H" #include "fvCFD.H"
#include "singlePhaseTransportModel.H" #include "singlePhaseTransportModel.H"
#include "RASModel.H" #include "RASModel.H"
#include "pimpleControl.H"
#include "radiationModel.H" #include "radiationModel.H"
#include "fvIOoptionList.H"
#include "pimpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...@@ -61,6 +62,7 @@ int main(int argc, char *argv[]) ...@@ -61,6 +62,7 @@ int main(int argc, char *argv[])
#include "readGravitationalAcceleration.H" #include "readGravitationalAcceleration.H"
#include "createFields.H" #include "createFields.H"
#include "createIncompressibleRadiationModel.H" #include "createIncompressibleRadiationModel.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"
#include "readTimeControls.H" #include "readTimeControls.H"
#include "CourantNo.H" #include "CourantNo.H"
......
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \
-I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels \
...@@ -7,7 +10,9 @@ EXE_INC = \ ...@@ -7,7 +10,9 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lsampling \
-lmeshTools \ -lmeshTools \
-lfvOptions \
-lincompressibleTurbulenceModel \ -lincompressibleTurbulenceModel \
-lincompressibleRASModels \ -lincompressibleRASModels \
-lincompressibleTransportModels -lincompressibleTransportModels
...@@ -8,10 +8,17 @@ ...@@ -8,10 +8,17 @@
( (
fvm::div(phi, T) fvm::div(phi, T)
- fvm::laplacian(alphaEff, T) - fvm::laplacian(alphaEff, T)
==
fvOptions(T)
); );
TEqn.relax(); TEqn.relax();
fvOptions.constrain(TEqn);
TEqn.solve(); TEqn.solve();
fvOptions.correct(T);
rhok = 1.0 - beta*(T - TRef); rhok = 1.0 - beta*(T - TRef);
} }
...@@ -4,16 +4,20 @@ ...@@ -4,16 +4,20 @@
( (
fvm::div(phi, U) fvm::div(phi, U)
+ turbulence->divDevReff(U) + turbulence->divDevReff(U)
==
fvOptions(U)
); );
UEqn().relax(); UEqn().relax();
fvOptions.constrain(UEqn());
if (simple.momentumPredictor()) if (simple.momentumPredictor())
{ {
solve solve
( (
UEqn() UEqn()
== ==
fvc::reconstruct fvc::reconstruct
( (
( (
...@@ -22,4 +26,6 @@ ...@@ -22,4 +26,6 @@
)*mesh.magSf() )*mesh.magSf()
) )
); );
fvOptions.correct(U);
} }
...@@ -48,6 +48,7 @@ Description ...@@ -48,6 +48,7 @@ Description
#include "fvCFD.H" #include "fvCFD.H"
#include "singlePhaseTransportModel.H" #include "singlePhaseTransportModel.H"
#include "RASModel.H" #include "RASModel.H"
#include "fvIOoptionList.H"
#include "simpleControl.H" #include "simpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...@@ -59,6 +60,7 @@ int main(int argc, char *argv[]) ...@@ -59,6 +60,7 @@ int main(int argc, char *argv[])
#include "createMesh.H" #include "createMesh.H"
#include "readGravitationalAcceleration.H" #include "readGravitationalAcceleration.H"
#include "createFields.H" #include "createFields.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"
simpleControl simple(mesh); simpleControl simple(mesh);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment