ENH: Updated scalarTransport function object

This commit is contained in:
andy
2013-01-08 09:45:23 +00:00
parent d4202f9b10
commit ea608961c5
3 changed files with 11 additions and 11 deletions

View File

@ -1,6 +1,6 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fieldSources/lnInclude \ -I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/dsmc/lnInclude \ -I$(LIB_SRC)/lagrangian/dsmc/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
@ -14,7 +14,7 @@ EXE_INC = \
LIB_LIBS = \ LIB_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lfieldSources \ -lfvOptions \
-lmeshTools \ -lmeshTools \
-lsampling \ -lsampling \
-llagrangian \ -llagrangian \

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -151,7 +151,7 @@ Foam::scalarTransport::scalarTransport
resetOnStartUp_(false), resetOnStartUp_(false),
nCorr_(0), nCorr_(0),
autoSchemes_(false), autoSchemes_(false),
sources_(mesh_), fvOptions_(mesh_),
T_ T_
( (
IOobject IOobject
@ -205,7 +205,7 @@ void Foam::scalarTransport::read(const dictionary& dict)
dict.lookup("autoSchemes") >> autoSchemes_; dict.lookup("autoSchemes") >> autoSchemes_;
sources_.reset(dict.subDict("sources")); fvOptions_.reset(dict.subDict("fvOptions"));
} }
} }
@ -246,12 +246,12 @@ void Foam::scalarTransport::execute()
+ fvm::div(phi, T_, divScheme) + fvm::div(phi, T_, divScheme)
- fvm::laplacian(DT, T_, laplacianScheme) - fvm::laplacian(DT, T_, laplacianScheme)
== ==
sources_(T_) fvOptions_(T_)
); );
TEqn.relax(relaxCoeff); TEqn.relax(relaxCoeff);
sources_.constrain(TEqn); fvOptions_.constrain(TEqn);
TEqn.solve(mesh_.solverDict(UName_)); TEqn.solve(mesh_.solverDict(UName_));
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -55,7 +55,7 @@ SeeAlso
#include "surfaceFieldsFwd.H" #include "surfaceFieldsFwd.H"
#include "pointFieldFwd.H" #include "pointFieldFwd.H"
#include "fvMatricesFwd.H" #include "fvMatricesFwd.H"
#include "basicSourceList.H" #include "fvOptionList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -105,8 +105,8 @@ class scalarTransport
//- Flag to employ schemes for velocity for scalar transport //- Flag to employ schemes for velocity for scalar transport
bool autoSchemes_; bool autoSchemes_;
//- Run-time selectable sources //- Run-time selectable finite volume options, e.g. sources, constraints
basicSourceList sources_; fv::optionList fvOptions_;
//- The scalar field //- The scalar field
volScalarField T_; volScalarField T_;