Commit c61868e9 authored by Mark Olesen's avatar Mark Olesen
Browse files

Merge commit 'OpenCFD/master' into olesenm

parents 7cf90b03 dfba9d77
EXE_INC = \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/turbulenceModels/RAS
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \
-llagrangian \
-llagrangianIntermediate \
-lfiniteVolume \
-lmeshTools \
-lthermophysicalFunctions \
-lbasicThermophysicalModels \
/* -lcombustionThermophysicalModels */ \
-lspecie \
-lradiation \
-lcompressibleRASModels
-lcompressibleRASModels \
-lcompressibleLESModels \
-lfiniteVolume \
-lmeshTools
......@@ -32,12 +32,12 @@
mesh
);
# include "compressibleCreatePhi.H"
#include "compressibleCreatePhi.H"
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::RASModel> turbulence
autoPtr<compressible::turbulenceModel> turbulence
(
compressible::RASModel::New
compressible::turbulenceModel::New
(
rho,
U,
......
......@@ -26,14 +26,14 @@ Application
kinematicParcelFoam
Description
Transient solver for a single kinematicCloud. Uses precalculated velocity
Transient solver for a single kinematicCloud. Uses pre-calculated velocity
field to evolve a cloud.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "basicThermo.H"
#include "compressible/RASModel/RASModel.H"
#include "turbulenceModel.H"
#include "basicKinematicCloud.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -49,7 +49,7 @@ int main(int argc, char *argv[])
#include "createFields.H"
#include "compressibleCourantNo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
......
......@@ -9,7 +9,8 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
-I$(LIB_SRC)/turbulenceModels/RAS/compressible/lnInclude \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
......
......@@ -50,7 +50,7 @@ PDRkEpsilon::PDRkEpsilon
const volScalarField& rho,
const volVectorField& U,
const surfaceScalarField& phi,
basicThermo& thermophysicalModel
const basicThermo& thermophysicalModel
)
:
RASModel(typeName, rho, U, phi, thermophysicalModel),
......
......@@ -77,20 +77,19 @@ public:
// Constructors
//- from components
//- Construct from components
PDRkEpsilon
(
const volScalarField& rho,
const volVectorField& U,
const surfaceScalarField& phi,
basicThermo& thermophysicalModel
const basicThermo& thermophysicalModel
);
// Destructor
~PDRkEpsilon()
{}
virtual ~PDRkEpsilon()
{}
// Member Functions
......
if(turbulence)
{
volScalarField divU = fvc::div(Uf & mesh.Sf());
tmp<volTensorField> tgradU = fvc::grad(Uf);
volScalarField G = 2*mut*(tgradU() && dev(symm(tgradU())));
tgradU.clear();
// Add the blockage generation term so that it is included consistently
// in both the k and epsilon equations
volScalarField GR = rho*mag(U)*(U & CT & U);
# include "wallFunctions.H"
// Dissipation equation
fvScalarMatrix epsEqn
(
betav*fvm::ddt(rho, epsilon)
+ fvm::div(phi, epsilon)
- fvm::laplacian(fvc::interpolate(alphaEps*muEff), epsilon)
==
C1*(betav*G + GR)*epsilon/k
- fvm::SuSp((2.0/3.0*C1)*betav*rho*divU, epsilon)
- fvm::Sp(C2*betav*rho*epsilon/k, epsilon)
);
# include "wallDissipation.H"
epsEqn.solve();
bound(epsilon, dimensionedScalar("0", epsilon.dimensions(), 1.0e-15));
// Turbulent kinetic energy equation
solve
(
betav*fvm::ddt(rho, k)
+ fvm::div(phi, k)
- fvm::laplacian(fvc::interpolate(alphak*muEff), k)
==
betav*G + GR
- fvm::SuSp(2.0/3.0*betav*rho*divU, k)
- fvm::Sp(betav*rho*epsilon/k, k)
);
bound(k, dimensionedScalar("0", k.dimensions(), 0.0));
//- Re-calculate turbulence viscosity
mut = Cmu*rho*sqr(k)/epsilon;
# include "wallViscosity.H"
}
muEff = mut + thermo->mu();
EXE_INC = \
-I$(LIB_SRC)/engine/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
-I$(LIB_SRC)/turbulenceModels/RAS \
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \
-lengine \
-lfiniteVolume \
-lmeshTools \
-lcompressibleRASModels \
-lcompressibleLESModels \
-lbasicThermophysicalModels \
-lcombustionThermophysicalModels \
-lspecie \
-llaminarFlameSpeedModels
-llaminarFlameSpeedModels \
-lfiniteVolume \
-lmeshTools
......@@ -52,7 +52,7 @@ Description
#include "fvCFD.H"
#include "hhuCombustionThermo.H"
#include "compressible/RASModel/RASModel.H"
#include "turbulenceModel.H"
#include "laminarFlameSpeed.H"
#include "ignition.H"
#include "Switch.H"
......
......@@ -48,9 +48,9 @@
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::RASModel> turbulence
autoPtr<compressible::turbulenceModel> turbulence
(
compressible::RASModel::New
compressible::turbulenceModel::New
(
rho,
U,
......@@ -60,7 +60,7 @@
);
Info<< "Creating field DpDt\n" << endl;
volScalarField DpDt =
volScalarField DpDt =
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
......
EXE_INC = \
-I$(LIB_SRC)/engine/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/turbulenceModels/LES \
-I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
-I../XiFoam
EXE_LIBS = \
-lengine \
-lfiniteVolume \
-lmeshTools \
-lbasicThermophysicalModels \
-lcombustionThermophysicalModels \
-lspecie \
-lcompressibleLESModels \
-llaminarFlameSpeedModels
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Application
Xoodles
Description
Compressible premixed/partially-premixed combustion solver with large-eddy
simulation (LES) turbulence modelling.
Combusting LES code using the b-Xi two-equation model.
Xi may be obtained by either the solution of the Xi transport
equation or from an algebraic exression. Both approaches are
based on Gulder's flame speed correlation which has been shown
to be appropriate for LES by comparison with the results from the
spectral model.
Strain effects are encorporated directly into the Xi equation
but not in the algebraic approximation. Further work need to be
done on this issue, particularly regarding the enhanced removal rate
caused by flame compression. Analysis using results of the spectral
model will be required.
For cases involving very lean Propane flames or other flames which are
very strain-sensitive, a transport equation for the laminar flame
speed is present. This equation is derived using heuristic arguments
involving the strain time scale and the strain-rate at extinction.
the transport velocity is the same as that for the Xi equation.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "hhuCombustionThermo.H"
#include "compressible/LESModel/LESModel.H"
#include "laminarFlameSpeed.H"
#include "ignition.H"
#include "IFstream.H"
#include "OFstream.H"
#define divDevRhoReff divDevRhoBeff
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
#include "createMeshNoClear.H"
#include "readEnvironmentalProperties.H"
#include "createFields.H"
#include "readPISOControls.H"
#include "readCombustionProperties.H"
#include "initContinuityErrs.H"
Info<< "\nStarting time loop\n" << endl;
for (runTime++; !runTime.end(); runTime++)
{
Info<< "Time = " << runTime.timeName() << nl << endl;
#include "compressibleCourantNo.H"
#include "rhoEqn.H"
turbulence->correct();
#include "UEqn.H"
// --- PISO loop
for (int corr=1; corr<=nCorr; corr++)
{
#include "ftEqn.H"
#include "bEqn.H"
#include "huEqn.H"
#include "hEqn.H"
if (!ign.ignited())
{
hu == h;
}
#include "pEqn.H"
}
runTime.write();
rho = thermo->rho();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;
return(0);
}
// ************************************************************************* //
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<hhuCombustionThermo> thermo
(
hhuCombustionThermo::New(mesh)
);
combustionMixture& composition = thermo->composition();
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
thermo->rho()
);
volScalarField& p = thermo->p();
const volScalarField& psi = thermo->psi();
volScalarField& h = thermo->h();
volScalarField& hu = thermo->hu();
volScalarField& b = composition.Y("b");
Info<< "min(b) = " << min(b).value() << endl;
const volScalarField& T = thermo->T();
Info<< "\nReading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
# include "compressibleCreatePhi.H"
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::LESModel> turbulence
(
compressible::LESModel::New(rho, U, phi, thermo())
);
Info<< "Creating field DpDt\n" << endl;
volScalarField DpDt =
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
Info<< "Creating field Xi\n" << endl;
volScalarField Xi
(
IOobject
(
"Xi",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Creating the unstrained laminar flame speed\n" << endl;
autoPtr<laminarFlameSpeed> unstrainedLaminarFlameSpeed
(
laminarFlameSpeed::New(thermo)
);
Info<< "Reading strained laminar flame speed field Su\n" << endl;
volScalarField Su
(
IOobject
(
"Su",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
dimensionedScalar SuMin = 0.01*Su.average();
dimensionedScalar SuMax = 4*Su.average();
Info<< "Calculating turbulent flame speed field St\n" << endl;
volScalarField St
(
IOobject
(
"St",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
Xi*Su
);
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
if (composition.contains("ft"))
{
fields.add(composition.Y("ft"));
}
fields.add(b);
fields.add(h);
fields.add(hu);
......@@ -2,15 +2,16 @@ EXE_INC = \
-I../engineFoam \
-I../XiFoam \
-I$(LIB_SRC)/engine/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
-I$(LIB_SRC)/turbulenceModels/RAS/compressible/lnInclude
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \
-lengine \
-lfiniteVolume \
-lcompressibleRASModels \
-lcompressibleLESModels \
-lbasicThermophysicalModels \
-lspecie
-lspecie \
-lfiniteVolume
......@@ -34,7 +34,7 @@ Description
#include "engineTime.H"
#include "engineMesh.H"
#include "basicThermo.H"
#include "RASModel.H"
#include "turbulenceModel.H"
#include "OFstream.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -42,9 +42,9 @@
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::RASModel> turbulence
autoPtr<compressible::turbulenceModel> turbulence
(
compressible::RASModel::New
compressible::turbulenceModel::New
(
rho,
U,
......
EXE_INC = \
-I../engineFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/turbulenceModels/RAS \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/dieselSpray/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/liquids/lnInclude \
......@@ -14,11 +13,13 @@ EXE_INC = \
-I$(LIB_SRC)/../applications/solvers/combustion/XiFoam \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude \
-I$(LIB_SRC)/engine/lnInclude
-I$(LIB_SRC)/engine/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
EXE_LIBS = \
-lengine \
-lcompressibleRASModels \
-lcompressibleLESModels \
-lcombustionThermophysicalModels \
-lfiniteVolume \
-llagrangian \
......
......@@ -58,9 +58,9 @@ volScalarField kappa
);
Info << "Creating turbulence model.\n" << nl;
autoPtr<compressible::RASModel> turbulence
autoPtr<compressible::turbulenceModel> turbulence
(
compressible::RASModel::New
compressible::turbulenceModel::New
(
rho,
U,
......@@ -70,7 +70,7 @@ autoPtr<compressible::RASModel> turbulence
);
Info<< "Creating field DpDt\n" << endl;
volScalarField DpDt =
volScalarField DpDt =
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
Info << "Constructing chemical mechanism" << endl;
......
......@@ -34,7 +34,7 @@ Description
#include "engineTime.H"
#include "engineMesh.H"
#include "hCombustionThermo.H"
#include "compressible/RASModel/RASModel.H"
#include "turbulenceModel.H"
#include "spray.H"
#include "chemistryModel.H"
#include "chemistrySolver.H"
......