Professional Documents
Culture Documents
BuoyantFoam solver
The buoyantFoam solver is a transient solver for buoyant, turbulent flow of compressible fluids used for ventilation and heat transfer.
OpenFoam/OpenFoam-1.4/applications/solvers/heatTransfer/buoyantFoam
Inlet
Nozzle
Nozzle
Outlet
Outlet
www.weldingengineer.com
anode
Continuity equation
(OpenFoam/OpenFoam -1.4/src/finiteVolume/cfdTools/compressible/rhoEqn.h)
\*---------------------------------------------------------------------------*/ { solve(fvm::ddt(rho) + fvc::div(phi)); } // *************************************************************** //
where
is density and
is velocity.
Momentum equations
(applications/solvers/heatTransfer/buoyantFoam/UEqn.H)
where
eff
(applications/solvers/heatTransfer/buoyantFoam/pEqn.H ):
Energy equation
(applications/solvers/heatTransfer/buoyantFoam/hEqn.H)
Cp Pr C p
T = Told
H (Told ) h Cp
where Told is the temperature at the previous time step, Cp heat capacity and
H (T ) =
C pT + H f W
Equation of state
(src/thermophysicalModels/basic/basicThermo.H)
Create a new application (ex. with FoamX) buoyantFoamTIG Times directory 0, constant and system directory
Geometry
21 5o
16
x
1
z y
Geometry
paraFoam . buoyantFoamTIG
Nozzle
Cathode tip
T=5000 K
Cathode wall
grad(T)=0
Anode
Inlet
Outlet
S Y M M E T R y A X I s
Nozzle
grad(T)=0
grad(T)=0
T=300 K
Wall
Wall
Wall
Wall
Velocity Inlet
Outlet
anode
thermoType
Thermophysical model: Mixture property: Transport coefficient: Derived thermophysical property: Basic thermophysical property: Equation of State
hThermo pureMixture
General thermophysical model calculation based on enthalpy h General thermophysical model calculation for passive gas mixture
constTransport Constant transport properties specieThermo Thermophysical properties of species, derived from
Cp, h
Thermophysical properties
The basic thermophysical properties are specified for each species from the input data file The data is specified using a compound entry with following format for a species access through the keyword mixture
specieTheremoI.H hconstThermoI.H constTransportI.H
mixture
Ar
39.948
520
3.4079e-05
0.65
keyword
Hf [J/kmol]
Dynamic viscosity [kg/ms] Heat capacity Prandtl number at constant pressure [J/kmol K]
Turbulent properties
Copy the already existing thermophysical model from OpenFOAM/OpenFOAM-1.4/src/thermophysicalModels/ to the user directory and rename Modify it accordingly to once needs Change files and options
To compile: ./Allwmake or remove dependencies and wmake libso To check: - that library has been prepared OpenFOAM/username-1.4/lib/linux64Gcc4DPOpt/libspecieTIG.so - that it is used by the solver ldd which name_solver | less
Create in OpenFoam/user-1.4/src/ thermophysicalModels directory Copy from OpenFOAM/OpenFOAM-1.4/src/thermophysicalModels/ specie and thermo and Allwmake file Modified files and options OpenFoam/user-1.4/src/ thermophysicalModels/specie/make/files:
atomicWeights = atomicWeights specie = specie speciesTable = speciesTable perfectGas = equationOfState/perfectGas reactions = reaction/reactions $(atomicWeights)/atomicWeights.C $(specie)/specie.C $(speciesTable)/speciesTable.C $(perfectGas)/perfectGas.C $(reactions)/makeChemkinReactions.C $(reactions)/makeLangmuirHinshelwoodReactions.C LIB = $(FOAM_USER_LIBBIN)/libspecieTIG
OpenFoam/user-1.4/src/ thermophysicalModels/basic/make/files:
basicMixture = mixtures/basicMixture basicThermo = basicThermo $(basicMixture)/basicMixture.C $(basicThermo)/basicThermo.C $(basicThermo)/newBasicThermo.C $(basicThermo)/basicThermos.C derivedFvPatchFields/fixedEnthalpy/fixedEnthalpyFvPatchScalarField.C derivedFvPatchFields/gradientEnthalpy/gradientEnthalpyFvPatchScalarField.C derivedFvPatchFields/mixedEnthalpy/mixedEnthalpyFvPatchScalarField.C derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C LIB = $(FOAM_USER_LIBBIN)/libbasicThermophysicalModelsTIG
OpenFoam/user-1.4/src/ thermophysicalModels/basic/make/options:
atomicWeights = atomicWeights specie = specie speciesTable = speciesTable perfectGas = equationOfState/perfectGas reactions = reaction/reactions $(atomicWeights)/atomicWeights.C $(specie)/specie.C $(speciesTable)/speciesTable.C $(perfectGas)/perfectGas.C $(reactions)/makeChemkinReactions.C $(reactions)/makeLangmuirHinshelwoodReactions.C LIB = $(FOAM_USER_LIBBIN)/libspecieTIG
OpenFoam/user-1.4/src/ thermophysicalModels/basic/make/Allwmake:
Tell to use our new library by adding a line to ControlDict : libs (libspecieTIG) Another way to copy solver to user directory and change Make/options:
EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(WM_PROJECT_USER_DIR)/src/thermophysicalModels/basic/lnInclude \ -I$(WM_PROJECT_USER_DIR)/src/turbulenceModels \ -I../XiFoam EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ -lfiniteVolume \ -lmeshTools \ -lbasicThermophysicalModelsTIG\ -lspecieTIG\ -lcompressibleTurbulenceModelsTIG
change Make/options:
buoyantFoam.C EXE=$(FOAM_USER_APPBIN)/buoyantFoamTIG
Compile solver (wmake) To check the our new solver is using the new libraries: ldd which buoyantFoamTIGsolver | less