ENH: buoyantSimpleFoam - updated equation sources

This commit is contained in:
andy
2012-12-06 13:30:14 +00:00
parent 577ef5742d
commit 8f76549b1d
6 changed files with 20 additions and 8 deletions

View File

@ -12,9 +12,13 @@
- fvm::laplacian(turbulence->alphaEff(), he) - fvm::laplacian(turbulence->alphaEff(), he)
== ==
radiation->Sh(thermo) radiation->Sh(thermo)
+ sources(rho, he)
); );
EEqn.relax(); EEqn.relax();
sources.constrain(EEqn);
EEqn.solve(); EEqn.solve();
thermo.correct(); thermo.correct();

View File

@ -1,18 +1,22 @@
EXE_INC = \ EXE_INC = \
-I.. \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fieldSources/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \
-I$(LIB_SRC)/turbulenceModels/RAS \ -I$(LIB_SRC)/turbulenceModels/RAS \
-I$(LIB_SRC)/finiteVolume/cfdTools \
-I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \
-lfieldSources \
-lsampling \
-lmeshTools \
-lfluidThermophysicalModels \ -lfluidThermophysicalModels \
-lspecie \ -lspecie \
-lradiationModels \ -lradiationModels \
-lcompressibleTurbulenceModel \ -lcompressibleTurbulenceModel \
-lcompressibleRASModels \ -lcompressibleRASModels \
-lfiniteVolume \
-lmeshTools -lmeshTools

View File

@ -4,11 +4,13 @@
( (
fvm::div(phi, U) fvm::div(phi, U)
+ turbulence->divDevRhoReff(U) + turbulence->divDevRhoReff(U)
==
sources(rho, U)
); );
UEqn().relax(); UEqn().relax();
mrfZones.addCoriolis(rho, UEqn()); sources.constrain(UEqn());
if (simple.momentumPredictor()) if (simple.momentumPredictor())
{ {

View File

@ -36,7 +36,7 @@ Description
#include "fixedGradientFvPatchFields.H" #include "fixedGradientFvPatchFields.H"
#include "radiationModel.H" #include "radiationModel.H"
#include "simpleControl.H" #include "simpleControl.H"
#include "IOMRFZoneList.H" #include "IObasicSourceList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -47,7 +47,6 @@ 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 "createZones.H"
#include "createRadiationModel.H" #include "createRadiationModel.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"

View File

@ -87,3 +87,5 @@
dimensionedScalar initialMass = fvc::domainIntegrate(rho); dimensionedScalar initialMass = fvc::domainIntegrate(rho);
dimensionedScalar totalVolume = sum(mesh.V()); dimensionedScalar totalVolume = sum(mesh.V());
IObasicSourceList sources(mesh);

View File

@ -17,7 +17,7 @@
fvc::interpolate(rho)*(fvc::interpolate(HbyA) & mesh.Sf()) fvc::interpolate(rho)*(fvc::interpolate(HbyA) & mesh.Sf())
); );
mrfZones.relativeFlux(fvc::interpolate(rho), phiHbyA); sources.relativeFlux(fvc::interpolate(rho), phiHbyA);
bool closedVolume = adjustPhi(phiHbyA, U, p_rgh); bool closedVolume = adjustPhi(phiHbyA, U, p_rgh);
@ -45,6 +45,7 @@
// calculated from the relaxed pressure // calculated from the relaxed pressure
U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rhorAUf); U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rhorAUf);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
sources.correct(U);
} }
} }