From 46c5a2b7dd4897e06fd1529eb55314e1e0555d5f Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 6 Dec 2012 14:21:58 +0000 Subject: [PATCH] ENH: Added radiation capability to buoyantPimpleFoam --- .../heatTransfer/buoyantPimpleFoam/EEqn.H | 28 +++++++++++++++++++ .../buoyantPimpleFoam/Make/options | 20 ++++++------- .../buoyantPimpleFoam/buoyantPimpleFoam.C | 2 ++ .../buoyantPimpleFoam/createFields.H | 5 +--- 4 files changed, 41 insertions(+), 14 deletions(-) create mode 100644 applications/solvers/heatTransfer/buoyantPimpleFoam/EEqn.H diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/EEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/EEqn.H new file mode 100644 index 0000000000..1cc6ed584c --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/EEqn.H @@ -0,0 +1,28 @@ +{ + volScalarField& he = thermo.he(); + + fvScalarMatrix EEqn + ( + fvm::ddt(rho, he) + fvm::div(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) + == + sources(rho, he) + ); + + EEqn.relax(); + sources.constrain(EEqn); + EEqn.solve(); + + thermo.correct(); +} diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options index 5d86b094de..6962643dcd 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options @@ -1,21 +1,21 @@ EXE_INC = \ - -I../../compressible/rhoPimpleFoam \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel EXE_LIBS = \ - -lmeshTools \ - -lfluidThermophysicalModels \ - -lspecie \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ -lfiniteVolume \ -lsampling \ -lmeshTools \ - -lfieldSources + -lfieldSources \ + -lfluidThermophysicalModels \ + -lradiationModels \ + -lspecie \ + -lcompressibleTurbulenceModel \ + -lcompressibleRASModels \ + -lcompressibleLESModels diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C b/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C index c78c453058..62fcf33c04 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C @@ -36,6 +36,7 @@ Description #include "fvCFD.H" #include "rhoThermo.H" #include "turbulenceModel.H" +#include "radiationModel.H" #include "IObasicSourceList.H" #include "pimpleControl.H" @@ -48,6 +49,7 @@ int main(int argc, char *argv[]) #include "createMesh.H" #include "readGravitationalAcceleration.H" #include "createFields.H" + #include "createRadiationModel.H" #include "initContinuityErrs.H" #include "readTimeControls.H" #include "compressibleCourantNo.H" diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H index 9838978028..b606339627 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H @@ -1,9 +1,6 @@ Info<< "Reading thermophysical properties\n" << endl; - autoPtr pThermo - ( - rhoThermo::New(mesh) - ); + autoPtr pThermo(rhoThermo::New(mesh)); rhoThermo& thermo = pThermo(); thermo.validate(args.executable(), "h", "e");