Merge commit 'OpenCFD/master' into olesenm

This commit is contained in:
Mark Olesen
2010-02-11 11:49:07 +01:00
79 changed files with 4667 additions and 217 deletions

View File

@ -0,0 +1,9 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
set -x
wclean libso combustionModels
wclean all sensibleEnthalpyCombustionThermophysicalModels
wclean
# ----------------------------------------------------------------- end-of-file

View File

@ -0,0 +1,9 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
set -x
sensibleEnthalpyCombustionThermophysicalModels/Allwmake
wmake libso combustionModels
wmake
# ----------------------------------------------------------------- end-of-file

View File

@ -0,0 +1,4 @@
fireFoam.C
EXE = $(FOAM_APPBIN)/fireFoam

View File

@ -0,0 +1,23 @@
EXE_INC = \
-I./combustionModels/lnInclude \
-I./sensibleEnthalpyCombustionThermophysicalModels/basic/lnInclude \
-I./sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude
EXE_LIBS = \
-lbasicSensibleEnthalpyThermophysicalModels \
-lreactionSensibleEnthalpyThermophysicalModels \
-lcombustionModels \
-lspecie \
-lreactionThermophysicalModels \
-lbasicThermophysicalModels \
-lfiniteVolume \
-lcompressibleLESModels \
-lcompressibleRASModels \
-lradiation

View File

@ -0,0 +1,36 @@
fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
);
UEqn.relax();
if (oCorr == nOuterCorr - 1)
{
solve
(
UEqn
==
fvc::reconstruct
(
fvc::interpolate(rho)*(g & mesh.Sf())
- fvc::snGrad(p)*mesh.magSf()
),
mesh.solver("UFinal")
);
}
else
{
solve
(
UEqn
==
fvc::reconstruct
(
fvc::interpolate(rho)*(g & mesh.Sf())
- fvc::snGrad(p)*mesh.magSf()
)
);
}

View File

@ -0,0 +1,9 @@
combustionModel/combustionModel.C
combustionModel/newCombustionModel.C
infinitelyFastChemistry/infinitelyFastChemistry.C
noCombustion/noCombustion.C
LIB = $(FOAM_LIBBIN)/libcombustionModels

View File

@ -0,0 +1,11 @@
EXE_INC = \
-I../sensibleEnthalpyCombustionThermophysicalModels/basic/lnInclude \
-I../sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(FOAM_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(FOAM_SRC)/finiteVolume/lnInclude
LIB_LIBS = \
-lfiniteVolume

View File

@ -0,0 +1,109 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 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
\*---------------------------------------------------------------------------*/
#include "combustionModel.H"
#include "fvm.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(combustionModel, 0);
defineRunTimeSelectionTable(combustionModel, dictionary);
};
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::combustionModel::combustionModel
(
const dictionary& combustionProperties,
const hsCombustionThermo& thermo,
const compressible::turbulenceModel& turbulence,
const surfaceScalarField& phi,
const volScalarField& rho
)
:
combustionModelCoeffs_
(
combustionProperties.subDict
(
word(combustionProperties.lookup("combustionModel")) + "Coeffs"
)
),
thermo_(thermo),
turbulence_(turbulence),
mesh_(phi.mesh()),
phi_(phi),
rho_(rho),
stoicRatio_(thermo.lookup("stoichiometricAirFuelMassRatio")),
s_(thermo.lookup("stoichiometricOxygenFuelMassRatio")),
qFuel_(thermo_.lookup("qFuel")),
composition_(thermo.composition())
{}
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
Foam::combustionModel::~combustionModel()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
Foam::tmp<Foam::fvScalarMatrix>
Foam::combustionModel::combustionModel::R(volScalarField& fu) const
{
const basicMultiComponentMixture& composition = thermo_.composition();
const volScalarField& ft = composition.Y("ft");
volScalarField fres = composition.fres(ft, stoicRatio_.value());
volScalarField wFuelNorm = this->wFuelNorm()*pos(fu - fres);
return wFuelNorm*fres - fvm::Sp(wFuelNorm, fu);
}
Foam::tmp<Foam::volScalarField> Foam::combustionModel::combustionModel::dQ
(
const fvScalarMatrix& Rfu
) const
{
const basicMultiComponentMixture& composition = thermo_.composition();
const volScalarField& fu = composition.Y("fu");
return (-qFuel_)*(Rfu & fu);
}
bool Foam::combustionModel::read(const dictionary& combustionProperties)
{
combustionModelCoeffs_ = combustionProperties.subDict(type() + "Coeffs");
return true;
}
// ************************************************************************* //

View File

@ -0,0 +1,210 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 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
Class
Foam::combustionModel
Description
Base class for all non-premixed combustion models.
SourceFiles
combustionModel.C
\*---------------------------------------------------------------------------*/
#ifndef combustionModel_H
#define combustionModel_H
#include "IOdictionary.H"
#include "hsCombustionThermo.H"
#include "turbulenceModel.H"
#include "multivariateSurfaceInterpolationScheme.H"
#include "runTimeSelectionTables.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class combustionModel Declaration
\*---------------------------------------------------------------------------*/
class combustionModel
{
protected:
// Protected data
//- Dictionary of coefficients for the particular model
dictionary combustionModelCoeffs_;
//- Reference to the thermodynamic
const hsCombustionThermo& thermo_;
//- Reference to the turbulence model
const compressible::turbulenceModel& turbulence_;
//- Reference to the mesh database
const fvMesh& mesh_;
//- Reference to mass-flux field
const surfaceScalarField& phi_;
//- Reference to the density field
const volScalarField& rho_;
//- Stoichiometric air-fuel mass ratio
dimensionedScalar stoicRatio_;
//- Stoichiometric oxygen-fuel mass ratio
dimensionedScalar s_;
//- Heat of combustion (J/Kg)
dimensionedScalar qFuel_;
private:
// Private Member Functions
//- Disallow copy construct
combustionModel(const combustionModel&);
//- Disallow default bitwise assignment
void operator=(const combustionModel&);
const basicMultiComponentMixture& composition_;
public:
//- Runtime type information
TypeName("combustionModel");
// Declare run-time constructor selection table
declareRunTimeSelectionTable
(
autoPtr,
combustionModel,
dictionary,
(
const dictionary& combustionProperties,
const hsCombustionThermo& thermo,
const compressible::turbulenceModel& turbulence,
const surfaceScalarField& phi,
const volScalarField& rho
),
(
combustionProperties,
thermo,
turbulence,
phi,
rho
)
);
// Selectors
//- Return a reference to the selected combustion model
static autoPtr<combustionModel> New
(
const dictionary& combustionProperties,
const hsCombustionThermo& thermo,
const compressible::turbulenceModel& turbulence,
const surfaceScalarField& phi,
const volScalarField& rho
);
// Constructors
//- Construct from components
combustionModel
(
const dictionary& combustionProperties,
const hsCombustionThermo& thermo,
const compressible::turbulenceModel& turbulence,
const surfaceScalarField& phi,
const volScalarField& rho
);
//- Destructor
virtual ~combustionModel();
// Member Functions
// Access functions
//- Access composition
const basicMultiComponentMixture& composition() const
{
return composition_;
}
//- Access combustion dictionary
const dictionary combustionModelCoeffs() const
{
return combustionModelCoeffs_;
}
//- Access heat of combustion
const dimensionedScalar qFuel() const
{
return qFuel_;
}
//- Return normalised consumption rate of (fu - fres)
virtual tmp<volScalarField> wFuelNorm() const = 0;
//- Fuel consumption rate matrix i.e. source-term for the fuel equation
virtual tmp<fvScalarMatrix> R(volScalarField& fu) const;
//- Heat-release rate calculated from the given
// fuel consumption rate matrix
virtual tmp<volScalarField> dQ(const fvScalarMatrix& Rfu) const;
//- Correct combustion rate
virtual void correct() = 0;
//- Update properties from given dictionary
virtual bool read(const dictionary& combustionProperties) = 0;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,67 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 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
\*---------------------------------------------------------------------------*/
#include "combustionModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::combustionModel> Foam::combustionModel::New
(
const dictionary& combustionProperties,
const hsCombustionThermo& thermo,
const compressible::turbulenceModel& turbulence,
const surfaceScalarField& phi,
const volScalarField& rho
)
{
word combustionModelTypeName = combustionProperties.lookup
(
"combustionModel"
);
Info<< "Selecting combustion model " << combustionModelTypeName << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(combustionModelTypeName);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"combustionModel::New"
) << "Unknown combustionModel type "
<< combustionModelTypeName << endl << endl
<< "Valid combustionModels are : " << endl
<< dictionaryConstructorTablePtr_->toc()
<< exit(FatalError);
}
return autoPtr<combustionModel>
(cstrIter()(combustionProperties, thermo, turbulence, phi, rho));
}
// ************************************************************************* //

View File

@ -0,0 +1,94 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 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
\*---------------------------------------------------------------------------*/
#include "infinitelyFastChemistry.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace combustionModels
{
defineTypeNameAndDebug(infinitelyFastChemistry, 0);
addToRunTimeSelectionTable
(
combustionModel,
infinitelyFastChemistry,
dictionary
);
};
};
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::combustionModels::infinitelyFastChemistry::infinitelyFastChemistry
(
const dictionary& combustionProperties,
const hsCombustionThermo& thermo,
const compressible::turbulenceModel& turbulence,
const surfaceScalarField& phi,
const volScalarField& rho
)
:
combustionModel(combustionProperties, thermo, turbulence, phi, rho),
C_(readScalar(combustionModelCoeffs_.lookup("C")))
{}
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
Foam::combustionModels::infinitelyFastChemistry::~infinitelyFastChemistry()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
void Foam::combustionModels::infinitelyFastChemistry::correct()
{}
Foam::tmp<Foam::volScalarField>
Foam::combustionModels::infinitelyFastChemistry::wFuelNorm() const
{
return rho_/(mesh_.time().deltaT()*C_);
}
bool Foam::combustionModels::infinitelyFastChemistry::read
(
const dictionary& combustionProperties
)
{
combustionModel::read(combustionProperties);
combustionModelCoeffs_.lookup("C") >> C_ ;
return true;
}
// ************************************************************************* //

View File

@ -0,0 +1,119 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 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
Class
Foam::combustionModels::infinitelyFastChemistry
Description
Simple infinitely fast chemistry combustion model based on the principle
mixed is burnt. Additional parameter C is used to distribute the heat
release rate.in time
SourceFiles
infinitelyFastChemistry.C
\*---------------------------------------------------------------------------*/
#ifndef infinitelyFastChemistry_H
#define infinitelyFastChemistry_H
#include "fvc.H"
#include "combustionModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace combustionModels
{
/*---------------------------------------------------------------------------*\
Class infinitelyFastChemistry Declaration
\*---------------------------------------------------------------------------*/
class infinitelyFastChemistry
:
public combustionModel
{
// Private data
//- Model constant
scalar C_;
// Private Member Functions
//- Disallow copy construct
infinitelyFastChemistry(const infinitelyFastChemistry&);
//- Disallow default bitwise assignment
void operator=(const infinitelyFastChemistry&);
public:
//- Runtime type information
TypeName("infinitelyFastChemistry");
// Constructors
//- Construct from components
infinitelyFastChemistry
(
const dictionary& combustionProperties,
const hsCombustionThermo& thermo,
const compressible::turbulenceModel& turbulence,
const surfaceScalarField& phi,
const volScalarField& rho
);
// Destructor
virtual ~infinitelyFastChemistry();
// Member Functions
//- Update properties from given dictionary
virtual bool read(const dictionary& combustionProperties);
//- Correct combustion rate
virtual void correct();
//- Return normalised consumption rate of (fu - fres)
virtual tmp<volScalarField> wFuelNorm() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace combustionModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,103 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 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
\*---------------------------------------------------------------------------*/
#include "noCombustion.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace combustionModels
{
defineTypeNameAndDebug(noCombustion, 0);
addToRunTimeSelectionTable
(
combustionModel,
noCombustion,
dictionary
);
};
};
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::combustionModels::noCombustion::noCombustion
(
const dictionary& combustionProperties,
const hsCombustionThermo& thermo,
const compressible::turbulenceModel& turbulence,
const surfaceScalarField& phi,
const volScalarField& rho
)
:
combustionModel(combustionProperties, thermo, turbulence, phi, rho)
{}
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
Foam::combustionModels::noCombustion::~noCombustion()
{}
void Foam::combustionModels::noCombustion::correct()
{}
Foam::tmp<Foam::volScalarField>
Foam::combustionModels::noCombustion::wFuelNorm() const
{
return tmp<Foam::volScalarField>
(
new volScalarField
(
IOobject
(
"wFuelNorm",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh_,
dimensionedScalar("wFuelNorm", dimMass/dimTime/pow3(dimLength), 0.0)
)
);
}
bool Foam::combustionModels::noCombustion::read
(
const dictionary& combustionProperties
)
{
return combustionModel::read(combustionProperties);
}
// ************************************************************************* //

View File

@ -0,0 +1,113 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 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
Class
Foam::combustionModel::noCombustion
Description
No combustion
SourceFiles
noCombustion.C
\*---------------------------------------------------------------------------*/
#ifndef noCombustion_H
#define noCombustion_H
#include "combustionModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace combustionModels
{
/*---------------------------------------------------------------------------*\
Class noCombustion Declaration
\*---------------------------------------------------------------------------*/
class noCombustion
:
public combustionModel
{
// Private data
// Private Member Functions
//- Disallow copy construct
noCombustion(const noCombustion&);
//- Disallow default bitwise assignment
void operator=(const noCombustion&);
public:
//- Runtime type information
TypeName("noCombustion");
// Constructors
//- Construct from components
noCombustion
(
const dictionary& combustionProperties,
const hsCombustionThermo& thermo,
const compressible::turbulenceModel& turbulence,
const surfaceScalarField& phi,
const volScalarField& rho
);
// Destructor
virtual ~noCombustion();
// Member Functions
//- Update properties from given dictionary
virtual bool read(const dictionary& combustionProperties);
//- Correct combustion rate
virtual void correct();
//- Return normalised consumption rate of (fu - fres)
virtual tmp<volScalarField> wFuelNorm() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace combustionModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,130 @@
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<hsCombustionThermo> pThermo
(
hsCombustionThermo::New(mesh)
);
hsCombustionThermo& thermo = pThermo();
basicMultiComponentMixture& composition = thermo.composition();
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
thermo.rho()
);
dimensionedScalar stoicRatio
(
thermo.lookup("stoichiometricAirFuelMassRatio")
);
volScalarField& p = thermo.p();
volScalarField& hs = thermo.hs();
const volScalarField& psi = thermo.psi();
volScalarField& ft = composition.Y("ft");
volScalarField& fu = composition.Y("fu");
Info<< "Reading 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::turbulenceModel> turbulence
(
compressible::turbulenceModel::New(rho, U, phi, thermo)
);
IOdictionary combustionProperties
(
IOobject
(
"combustionProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
);
Info<< "Creating combustion model\n" << endl;
autoPtr<combustionModel::combustionModel> combustion
(
combustionModel::combustionModel::New
(
combustionProperties,
thermo,
turbulence(),
phi,
rho
)
);
volScalarField dQ
(
IOobject
(
"dQ",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("dQ", dimMass/pow3(dimTime)/dimLength, 0.0)
);
Info<< "Creating field DpDt\n" << endl;
volScalarField DpDt =
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
Info<< "Calculating field g.h\n" << endl;
volScalarField gh("gh", g & mesh.C());
surfaceScalarField ghf("gh", g & mesh.Cf());
p += rho*gh;
thermo.correct();
dimensionedScalar initialMass = fvc::domainIntegrate(rho);
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
if (composition.contains("ft"))
{
fields.add(composition.Y("ft"));
}
if (composition.contains("fu"))
{
fields.add(composition.Y("fu"));
}
fields.add(hs);

View File

@ -0,0 +1,103 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 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
fireFoam
Description
Transient Solver for Fires and turbulent diffusion flames
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "hsCombustionThermo.H"
#include "turbulenceModel.H"
#include "combustionModel.H"
#include "radiationModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "readGravitationalAcceleration.H"
#include "initContinuityErrs.H"
#include "createFields.H"
#include "createRadiationModel.H"
#include "readTimeControls.H"
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (runTime.run())
{
#include "readPISOControls.H"
#include "readTimeControls.H"
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
#include "rhoEqn.H"
// --- Pressure-velocity PIMPLE corrector loop
for (int oCorr=0; oCorr<nOuterCorr; oCorr++)
{
#include "UEqn.H"
#include "ftEqn.H"
#include "fuhsEqn.H"
// --- PISO loop
for (int corr=0; corr<nCorr; corr++)
{
#include "pEqn.H"
}
}
turbulence->correct();
rho = thermo.rho();
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //

View File

@ -0,0 +1,25 @@
tmp<fv::convectionScheme<scalar> > mvConvection
(
fv::convectionScheme<scalar>::New
(
mesh,
fields,
phi,
mesh.divScheme("div(phi,ft_b_h)")
)
);
{
fvScalarMatrix ftEqn
(
fvm::ddt(rho, ft)
+ mvConvection->fvmDiv(phi, ft)
- fvm::laplacian(turbulence->alphaEff(), ft)
);
ftEqn.relax();
ftEqn.solve();
}
Info<< "max(ft) = " << max(ft).value() << endl;
Info<< "min(ft) = " << min(ft).value() << endl;

View File

@ -0,0 +1,47 @@
{
// Solve fuel equation
// ~~~~~~~~~~~~~~~~~~~
fvScalarMatrix R = combustion->R(fu);
{
fvScalarMatrix fuEqn
(
fvm::ddt(rho, fu)
+ mvConvection->fvmDiv(phi, fu)
- fvm::laplacian(turbulence->alphaEff(), fu)
==
R
);
fuEqn.relax();
fuEqn.solve();
}
Info<< "max(fu) = " << max(fu).value() << endl;
Info<< "min(fu) = " << min(fu).value() << endl;
// Solve sensible enthalpy equation
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
radiation->correct();
dQ = combustion->dQ(R);
{
fvScalarMatrix hsEqn
(
fvm::ddt(rho, hs)
+ mvConvection->fvmDiv(phi,hs)
- fvm::laplacian(turbulence->alphaEff(), hs)
==
DpDt
+ dQ
+ radiation->Shs(thermo)
);
hsEqn.relax();
hsEqn.solve();
}
thermo.correct();
combustion->correct();
}

View File

@ -0,0 +1,64 @@
bool closedVolume = false;
rho = thermo.rho();
volScalarField rUA = 1.0/UEqn.A();
surfaceScalarField rhorUAf("(rho*(1|A(U)))", fvc::interpolate(rho*rUA));
U = rUA*UEqn.H();
surfaceScalarField phiU
(
fvc::interpolate(rho)
*(
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
)
);
phi = phiU + rhorUAf*fvc::interpolate(rho)*(g & mesh.Sf());
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
surfaceScalarField rhorUAf = fvc::interpolate(rho*rUA);
fvScalarMatrix pEqn
(
fvm::ddt(psi,p)
+ fvc::div(phi)
- fvm::laplacian(rhorUAf, p)
);
closedVolume = p.needReference();
if (corr == nCorr-1 && nonOrth == nNonOrthCorr)
{
pEqn.solve(mesh.solver(p.name() + "Final"));
}
else
{
pEqn.solve(mesh.solver(p.name()));
}
if (nonOrth == nNonOrthCorr)
{
phi += pEqn.flux();
}
}
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
#include "rhoEqn.H"
#include "compressibleContinuityErrs.H"
U += rUA*fvc::reconstruct((phi - phiU)/rhorUAf);
U.correctBoundaryConditions();
// For closed-volume cases adjust the pressure and density levels
// to obey overall mass continuity
if (closedVolume)
{
p +=
(initialMass - fvc::domainIntegrate(thermo.psi()*p))
/fvc::domainIntegrate(thermo.psi());
rho = thermo.rho();
}

View File

@ -0,0 +1,8 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
set -x
wmake libso basic
wmake libso reactionThermo
# ----------------------------------------------------------------- end-of-file

View File

@ -0,0 +1,4 @@
psiThermo/basicSensiblePsiThermo/basicSensiblePsiThermo.C
psiThermo/basicSensiblePsiThermo/newBasicSensiblePsiThermo.C
LIB = $(FOAM_LIBBIN)/libbasicSensibleEnthalpyThermophysicalModels

View File

@ -0,0 +1,7 @@
EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude
LIB_LIBS = \
-lfiniteVolume

View File

@ -0,0 +1,52 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 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
\*---------------------------------------------------------------------------*/
#include "basicSensiblePsiThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(basicSensiblePsiThermo, 0);
defineRunTimeSelectionTable(basicSensiblePsiThermo, fvMesh);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::basicSensiblePsiThermo::basicSensiblePsiThermo(const fvMesh& mesh)
:
basicThermo(mesh)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::basicSensiblePsiThermo::~basicSensiblePsiThermo()
{}
// ************************************************************************* //

View File

@ -0,0 +1,114 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 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
Class
Foam::basicSensiblePsiThermo
Description
Basic thermodynamic properties based on compressibility
SourceFiles
basicSensiblePsiThermo.C
newBasicSensiblePsiThermo.C
\*---------------------------------------------------------------------------*/
#ifndef basicSensiblePsiThermo_H
#define basicSensiblePsiThermo_H
#include "basicThermo.H"
#include "runTimeSelectionTables.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class basicSensiblePsiThermo Declaration
\*---------------------------------------------------------------------------*/
class basicSensiblePsiThermo
:
public basicThermo
{
protected:
// Protected member functions
//- Construct as copy (not implemented)
basicSensiblePsiThermo(const basicSensiblePsiThermo&);
public:
//- Runtime type information
TypeName("basicSensiblePsiThermo");
//- Declare run-time constructor selection table
declareRunTimeSelectionTable
(
autoPtr,
basicSensiblePsiThermo,
fvMesh,
(const fvMesh& mesh),
(mesh)
);
// Constructors
//- Construct from mesh
basicSensiblePsiThermo(const fvMesh&);
//- Selector
static autoPtr<basicSensiblePsiThermo> New(const fvMesh&);
//- Destructor
virtual ~basicSensiblePsiThermo();
// Member functions
// Fields derived from thermodynamic state variables
//- Density [kg/m^3] - uses current value of pressure
virtual tmp<volScalarField> rho() const
{
return p_*psi();
}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,66 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 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
InClass
Foam::basicSensiblePsiThermo
Description
Macros for creating 'basic' compresibility-based thermo packages
\*---------------------------------------------------------------------------*/
#ifndef makeBasicSensiblePsiThermo_H
#define makeBasicSensiblePsiThermo_H
#include "basicSensiblePsiThermo.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeBasicSensiblePsiThermo(Cthermo,Mixture,Transport,Thermo,EqnOfState) \
\
typedef Cthermo<Mixture<Transport<specieThermo<Thermo<EqnOfState> > > > > \
Cthermo##Mixture##Transport##Thermo##EqnOfState; \
\
defineTemplateTypeNameAndDebugWithName \
( \
Cthermo##Mixture##Transport##Thermo##EqnOfState, \
#Cthermo \
"<"#Mixture"<"#Transport"<specieThermo<"#Thermo"<"#EqnOfState">>>>>", \
0 \
); \
\
addToRunTimeSelectionTable \
( \
basicSensiblePsiThermo, \
Cthermo##Mixture##Transport##Thermo##EqnOfState, \
fvMesh \
)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,75 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 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
\*---------------------------------------------------------------------------*/
#include "basicSensiblePsiThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::basicSensiblePsiThermo> Foam::basicSensiblePsiThermo::New
(
const fvMesh& mesh
)
{
word thermoTypeName;
// Enclose the creation of the thermophysicalProperties to ensure it is
// deleted before the turbulenceModel is created otherwise the dictionary
// is entered in the database twice
{
IOdictionary thermoDict
(
IOobject
(
"thermophysicalProperties",
mesh.time().constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
);
thermoDict.lookup("thermoType") >> thermoTypeName;
}
Info<< "Selecting thermodynamics package " << thermoTypeName << endl;
fvMeshConstructorTable::iterator cstrIter =
fvMeshConstructorTablePtr_->find(thermoTypeName);
if (cstrIter == fvMeshConstructorTablePtr_->end())
{
FatalErrorIn("basicSensiblePsiThermo::New(const fvMesh&)")
<< "Unknown basicSensiblePsiThermo type " << thermoTypeName << nl << nl
<< "Valid basicSensiblePsiThermo types are:" << nl
<< fvMeshConstructorTablePtr_->toc() << nl
<< exit(FatalError);
}
return autoPtr<basicSensiblePsiThermo>(cstrIter()(mesh));
}
// ************************************************************************* //

View File

@ -0,0 +1,5 @@
combustionThermo/hsCombustionThermo/hsCombustionThermo.C
combustionThermo/hsCombustionThermo/newhsCombustionThermo.C
combustionThermo/hsCombustionThermo/hsCombustionThermos.C
LIB = $(FOAM_LIBBIN)/libreactionSensibleEnthalpyThermophysicalModels

View File

@ -0,0 +1,9 @@
EXE_INC = \
-I../basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude
LIB_LIBS = \
-lfiniteVolume

View File

@ -0,0 +1,67 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 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
\*---------------------------------------------------------------------------*/
#include "hsCombustionThermo.H"
#include "fvMesh.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(hsCombustionThermo, 0);
defineRunTimeSelectionTable(hsCombustionThermo, fvMesh);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::hsCombustionThermo::hsCombustionThermo(const fvMesh& mesh)
:
basicSensiblePsiThermo(mesh),
hs_
(
IOobject
(
"hs",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionSet(0, 2, -2, 0, 0),
this->hBoundaryTypes()
)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::hsCombustionThermo::~hsCombustionThermo()
{}
// ************************************************************************* //

View File

@ -0,0 +1,146 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 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
Class
Foam::hsCombustionThermo
Description
Foam::hsCombustionThermo
SourceFiles
hsCombustionThermo.C
\*---------------------------------------------------------------------------*/
#ifndef hsCombustionThermo_H
#define hsCombustionThermo_H
#include "basicSensiblePsiThermo.H"
#include "basicMultiComponentMixture.H"
#include "autoPtr.H"
#include "runTimeSelectionTables.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class hsCombustionThermo Declaration
\*---------------------------------------------------------------------------*/
class hsCombustionThermo
:
public basicSensiblePsiThermo
{
protected:
// Protected data
//- sensible enthalpy field
volScalarField hs_;
public:
//- Runtime type information
TypeName("hsCombustionThermo");
//- Declare run-time constructor selection tables
declareRunTimeSelectionTable
(
autoPtr,
hsCombustionThermo,
fvMesh,
(const fvMesh& mesh),
(mesh)
);
// Constructors
//- Construct from dictionary and mesh
hsCombustionThermo(const fvMesh&);
// Selectors
//- Standard selection based on fvMesh
static autoPtr<hsCombustionThermo> New(const fvMesh&);
//- Select and check that package contains 'thermoType'
static autoPtr<hsCombustionThermo> NewType
(
const fvMesh&,
const word& thermoType
);
//- Destructor
virtual ~hsCombustionThermo();
// Member functions
//- Return the composition of the multi-component mixture
virtual basicMultiComponentMixture& composition() = 0;
//- Return the composition of the multi-component mixture
virtual const basicMultiComponentMixture& composition() const = 0;
// Access to thermodynamic state variables
//- Sensible enthalpy [J/kg]
// Non-const access allowed for transport equations
virtual volScalarField& hs()
{
return hs_;
}
//- Sensible enthalpy [J/kg]
virtual const volScalarField& hs() const
{
return hs_;
}
//- Chemical enthalpy [J/kg]
virtual tmp<volScalarField> hc() const = 0;
//- Update properties
virtual void correct() = 0;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,68 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 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
\*---------------------------------------------------------------------------*/
#include "makeHsCombustionThermo.H"
#include "hsCombustionThermo.H"
#include "hsPsiMixtureThermo.H"
#include "perfectGas.H"
#include "hConstThermo.H"
#include "janafThermo.H"
#include "specieThermo.H"
#include "sutherlandTransport.H"
#include "veryInhomogeneousMixture.H"
#include "multiComponentMixture.H"
#include "thermoPhysicsTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makeHsCombustionThermo
(
hsCombustionThermo,
hsPsiMixtureThermo,
veryInhomogeneousMixture,
sutherlandTransport,
janafThermo,
perfectGas
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -0,0 +1,100 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 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
InClass
Foam::hsCombustionThermo
Description
\*---------------------------------------------------------------------------*/
#ifndef makeHsCombustionThermo_H
#define makeHsCombustionThermo_H
#include "addToRunTimeSelectionTable.H"
#include "basicSensiblePsiThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeHsCombustionThermo(CThermo,MixtureThermo,Mixture,Transport,Thermo,EqnOfState) \
\
typedef MixtureThermo \
<Mixture<Transport<specieThermo<Thermo<EqnOfState> > > > > \
MixtureThermo##Mixture##Transport##Thermo##EqnOfState; \
\
defineTemplateTypeNameAndDebugWithName \
( \
MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \
#MixtureThermo \
"<"#Mixture"<"#Transport"<specieThermo<"#Thermo"<"#EqnOfState">>>>>", \
0 \
); \
\
addToRunTimeSelectionTable \
( \
basicSensiblePsiThermo, \
MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \
fvMesh \
); \
\
addToRunTimeSelectionTable \
( \
CThermo, \
MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \
fvMesh \
)
#define makeHsCombustionMixtureThermo(CThermo,MixtureThermo,Mixture,ThermoPhys) \
\
typedef MixtureThermo<Mixture<ThermoPhys> > \
MixtureThermo##Mixture##ThermoPhys; \
\
defineTemplateTypeNameAndDebugWithName \
( \
MixtureThermo##Mixture##ThermoPhys, \
#MixtureThermo"<"#Mixture"<"#ThermoPhys">>", \
0 \
); \
\
addToRunTimeSelectionTable \
( \
basicSensiblePsiThermo, \
MixtureThermo##Mixture##ThermoPhys, \
fvMesh \
); \
\
addToRunTimeSelectionTable \
( \
CThermo, \
MixtureThermo##Mixture##ThermoPhys, \
fvMesh \
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,151 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 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
\*---------------------------------------------------------------------------*/
#include "hsCombustionThermo.H"
#include "fvMesh.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::hsCombustionThermo> Foam::hsCombustionThermo::New
(
const fvMesh& mesh
)
{
word hsCombustionThermoTypeName;
// Enclose the creation of the thermophysicalProperties to ensure it is
// deleted before the turbulenceModel is created otherwise the dictionary
// is entered in the database twice
{
IOdictionary thermoDict
(
IOobject
(
"thermophysicalProperties",
mesh.time().constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
);
thermoDict.lookup("thermoType") >> hsCombustionThermoTypeName;
}
Info<< "Selecting thermodynamics package " << hsCombustionThermoTypeName
<< endl;
fvMeshConstructorTable::iterator cstrIter =
fvMeshConstructorTablePtr_->find(hsCombustionThermoTypeName);
if (cstrIter == fvMeshConstructorTablePtr_->end())
{
FatalErrorIn("hsCombustionThermo::New(const fvMesh&)")
<< "Unknown hsCombustionThermo type "
<< hsCombustionThermoTypeName << nl << nl
<< "Valid hsCombustionThermo types are:" << nl
<< fvMeshConstructorTablePtr_->toc() << nl
<< exit(FatalError);
}
return autoPtr<hsCombustionThermo>(cstrIter()(mesh));
}
Foam::autoPtr<Foam::hsCombustionThermo> Foam::hsCombustionThermo::NewType
(
const fvMesh& mesh,
const word& thermoType
)
{
word hsCombustionThermoTypeName;
// Enclose the creation of the thermophysicalProperties to ensure it is
// deleted before the turbulenceModel is created otherwise the dictionary
// is entered in the database twice
{
IOdictionary thermoDict
(
IOobject
(
"thermophysicalProperties",
mesh.time().constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
);
thermoDict.lookup("thermoType") >> hsCombustionThermoTypeName;
if (hsCombustionThermoTypeName.find(thermoType) == string::npos)
{
wordList allModels = fvMeshConstructorTablePtr_->toc();
DynamicList<word> validModels;
forAll(allModels, i)
{
if (allModels[i].find(thermoType) != string::npos)
{
validModels.append(allModels[i]);
}
}
FatalErrorIn
(
"autoPtr<hsCombustionThermo> hsCombustionThermo::NewType"
"("
"const fvMesh&, "
"const word&"
")"
) << "Inconsistent thermo package selected:" << nl << nl
<< hsCombustionThermoTypeName << nl << nl << "Please select a "
<< "thermo package based on " << thermoType
<< ". Valid options include:" << nl << validModels << nl
<< exit(FatalError);
}
}
Info<< "Selecting thermodynamics package " << hsCombustionThermoTypeName
<< endl;
fvMeshConstructorTable::iterator cstrIter =
fvMeshConstructorTablePtr_->find(hsCombustionThermoTypeName);
if (cstrIter == fvMeshConstructorTablePtr_->end())
{
FatalErrorIn("hsCombustionThermo::New(const fvMesh&)")
<< "Unknown hsCombustionThermo type "
<< hsCombustionThermoTypeName << nl << nl
<< "Valid hsCombustionThermo types are:" << nl
<< fvMeshConstructorTablePtr_->toc() << nl
<< exit(FatalError);
}
return autoPtr<hsCombustionThermo>(cstrIter()(mesh));
}
// ************************************************************************* //

View File

@ -0,0 +1,318 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 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
\*---------------------------------------------------------------------------*/
#include "hsPsiMixtureThermo.H"
#include "fvMesh.H"
#include "fixedValueFvPatchFields.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class MixtureType>
Foam::hsPsiMixtureThermo<MixtureType>::hsPsiMixtureThermo(const fvMesh& mesh)
:
hsCombustionThermo(mesh),
MixtureType(*this, mesh)
{
scalarField& hCells = hs_.internalField();
const scalarField& TCells = T_.internalField();
forAll(hCells, celli)
{
hCells[celli] = this->cellMixture(celli).Hs(TCells[celli]);
}
forAll(hs_.boundaryField(), patchi)
{
hs_.boundaryField()[patchi] == hs(T_.boundaryField()[patchi], patchi);
}
hBoundaryCorrection(hs_);
calculate();
psi_.oldTime(); // Switch on saving old time
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class MixtureType>
Foam::hsPsiMixtureThermo<MixtureType>::~hsPsiMixtureThermo()
{}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<class MixtureType>
void Foam::hsPsiMixtureThermo<MixtureType>::calculate()
{
const scalarField& hsCells = hs_.internalField();
const scalarField& pCells = p_.internalField();
scalarField& TCells = T_.internalField();
scalarField& psiCells = psi_.internalField();
scalarField& muCells = mu_.internalField();
scalarField& alphaCells = alpha_.internalField();
forAll(TCells, celli)
{
const typename MixtureType::thermoType& mixture_ =
this->cellMixture(celli);
TCells[celli] = mixture_.THs(hsCells[celli], TCells[celli]);
psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]);
muCells[celli] = mixture_.mu(TCells[celli]);
alphaCells[celli] = mixture_.alpha(TCells[celli]);
}
forAll(T_.boundaryField(), patchi)
{
fvPatchScalarField& pp = p_.boundaryField()[patchi];
fvPatchScalarField& pT = T_.boundaryField()[patchi];
fvPatchScalarField& ppsi = psi_.boundaryField()[patchi];
fvPatchScalarField& phs = hs_.boundaryField()[patchi];
fvPatchScalarField& pmu_ = mu_.boundaryField()[patchi];
fvPatchScalarField& palpha_ = alpha_.boundaryField()[patchi];
if (pT.fixesValue())
{
forAll(pT, facei)
{
const typename MixtureType::thermoType& mixture_ =
this->patchFaceMixture(patchi, facei);
phs[facei] = mixture_.Hs(pT[facei]);
ppsi[facei] = mixture_.psi(pp[facei], pT[facei]);
pmu_[facei] = mixture_.mu(pT[facei]);
palpha_[facei] = mixture_.alpha(pT[facei]);
}
}
else
{
forAll(pT, facei)
{
const typename MixtureType::thermoType& mixture_ =
this->patchFaceMixture(patchi, facei);
pT[facei] = mixture_.THs(phs[facei], pT[facei]);
ppsi[facei] = mixture_.psi(pp[facei], pT[facei]);
pmu_[facei] = mixture_.mu(pT[facei]);
palpha_[facei] = mixture_.alpha(pT[facei]);
}
}
}
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class MixtureType>
void Foam::hsPsiMixtureThermo<MixtureType>::correct()
{
if (debug)
{
Info<< "entering hMixtureThermo<MixtureType>::correct()" << endl;
}
// force the saving of the old-time values
psi_.oldTime();
calculate();
if (debug)
{
Info<< "exiting hMixtureThermo<MixtureType>::correct()" << endl;
}
}
template<class MixtureType>
Foam::tmp<Foam::volScalarField>
Foam::hsPsiMixtureThermo<MixtureType>::hc() const
{
const fvMesh& mesh = T_.mesh();
tmp<volScalarField> thc
(
new volScalarField
(
IOobject
(
"hc",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
hs_.dimensions()
)
);
volScalarField& hcf = thc();
scalarField& hcCells = hcf.internalField();
forAll(hcCells, celli)
{
hcCells[celli] = this->cellMixture(celli).Hc();
}
forAll(hcf.boundaryField(), patchi)
{
scalarField& hcp = hcf.boundaryField()[patchi];
forAll(hcp, facei)
{
hcp[facei] = this->patchFaceMixture(patchi, facei).Hc();
}
}
return thc;
}
template<class MixtureType>
Foam::tmp<Foam::scalarField>
Foam::hsPsiMixtureThermo<MixtureType>::hs
(
const scalarField& T,
const labelList& cells
) const
{
tmp<scalarField> th(new scalarField(T.size()));
scalarField& hs = th();
forAll(T, celli)
{
hs[celli] = this->cellMixture(cells[celli]).Hs(T[celli]);
}
return th;
}
template<class MixtureType>
Foam::tmp<Foam::scalarField>
Foam::hsPsiMixtureThermo<MixtureType>::hs
(
const scalarField& T,
const label patchi
) const
{
tmp<scalarField> th(new scalarField(T.size()));
scalarField& hs = th();
forAll(T, facei)
{
hs[facei] = this->patchFaceMixture(patchi, facei).Hs(T[facei]);
}
return th;
}
template<class MixtureType>
Foam::tmp<Foam::scalarField>
Foam::hsPsiMixtureThermo<MixtureType>::Cp
(
const scalarField& T,
const label patchi
) const
{
tmp<scalarField> tCp(new scalarField(T.size()));
scalarField& cp = tCp();
forAll(T, facei)
{
cp[facei] = this->patchFaceMixture(patchi, facei).Cp(T[facei]);
}
return tCp;
}
template<class MixtureType>
Foam::tmp<Foam::volScalarField>
Foam::hsPsiMixtureThermo<MixtureType>::Cp() const
{
const fvMesh& mesh = T_.mesh();
tmp<volScalarField> tCp
(
new volScalarField
(
IOobject
(
"Cp",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionSet(0, 2, -2, -1, 0)
)
);
volScalarField& cp = tCp();
scalarField& cpCells = cp.internalField();
const scalarField& TCells = T_.internalField();
forAll(TCells, celli)
{
cpCells[celli] = this->cellMixture(celli).Cp(TCells[celli]);
}
forAll(T_.boundaryField(), patchi)
{
cp.boundaryField()[patchi] = Cp(T_.boundaryField()[patchi], patchi);
}
return tCp;
}
template<class MixtureType>
bool Foam::hsPsiMixtureThermo<MixtureType>::read()
{
if (hsCombustionThermo::read())
{
MixtureType::read(*this);
return true;
}
else
{
return false;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,147 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 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
Class
Foam::hsPsiMixtureThermo
Description
Foam::hsPsiMixtureThermo
SourceFiles
hsPsiMixtureThermo.C
\*---------------------------------------------------------------------------*/
#ifndef hsPsiMixtureThermo_H
#define hsPsiMixtureThermo_H
#include "hsCombustionThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class hsPsiMixtureThermo Declaration
\*---------------------------------------------------------------------------*/
template<class MixtureType>
class hsPsiMixtureThermo
:
public hsCombustionThermo,
public MixtureType
{
// Private member functions
void calculate();
//- Construct as copy (not implemented)
hsPsiMixtureThermo(const hsPsiMixtureThermo<MixtureType>&);
public:
//- Runtime type information
TypeName("hsPsiMixtureThermo");
// Constructors
//- Construct from mesh
hsPsiMixtureThermo(const fvMesh&);
//- Destructor
virtual ~hsPsiMixtureThermo();
// Member functions
//- Return the compostion of the multi-component mixture
virtual basicMultiComponentMixture& composition()
{
return *this;
}
//- Return the compostion of the multi-component mixture
virtual const basicMultiComponentMixture& composition() const
{
return *this;
}
//- Update properties
virtual void correct();
//- Chemical enthalpy [J/kg]
virtual tmp<volScalarField> hc() const;
// Fields derived from thermodynamic state variables
//- Sensible enthalpy for cell-set [J/kg]
virtual tmp<scalarField> hs
(
const scalarField& T,
const labelList& cells
) const;
//- Sensible enthalpy for patch [J/kg]
virtual tmp<scalarField> hs
(
const scalarField& T,
const label patchi
) const;
//- Heat capacity at constant pressure for patch [J/kg/K]
virtual tmp<scalarField> Cp
(
const scalarField& T,
const label patchi
) const;
//- Heat capacity at constant pressure [J/kg/K]
virtual tmp<volScalarField> Cp() const;
//- Read thermophysicalProperties dictionary
virtual bool read();
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "hsPsiMixtureThermo.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -143,7 +143,6 @@ void Foam::basicThermo::eBoundaryCorrection(volScalarField& e)
} }
} }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::basicThermo::basicThermo(const fvMesh& mesh) Foam::basicThermo::basicThermo(const fvMesh& mesh)
@ -300,6 +299,50 @@ Foam::tmp<Foam::scalarField> Foam::basicThermo::h
} }
Foam::volScalarField& Foam::basicThermo::hs()
{
notImplemented("basicThermo::hs()");
return const_cast<volScalarField&>(volScalarField::null());
}
const Foam::volScalarField& Foam::basicThermo::hs() const
{
notImplemented("basicThermo::hs() const");
return volScalarField::null();
}
Foam::tmp<Foam::scalarField> Foam::basicThermo::hs
(
const scalarField& T,
const labelList& cells
) const
{
notImplemented
(
"basicThermo::hs"
"(const scalarField& T, const labelList& cells) const"
);
return tmp<scalarField>(NULL);
}
Foam::tmp<Foam::scalarField> Foam::basicThermo::hs
(
const scalarField& T,
const label patchi
) const
{
notImplemented
(
"basicThermo::hs"
"(const scalarField& T, const label patchi) const"
);
return tmp<scalarField>(NULL);
}
Foam::volScalarField& Foam::basicThermo::e() Foam::volScalarField& Foam::basicThermo::e()
{ {
notImplemented("basicThermo::e()"); notImplemented("basicThermo::e()");

View File

@ -141,7 +141,7 @@ public:
//- Compressibility [s^2/m^2] //- Compressibility [s^2/m^2]
virtual const volScalarField& psi() const; virtual const volScalarField& psi() const;
//- Enthalpy [J/kg] //- Total enthalpy [J/kg]
// Non-const access allowed for transport equations // Non-const access allowed for transport equations
virtual volScalarField& h(); virtual volScalarField& h();
@ -162,6 +162,27 @@ public:
const label patchi const label patchi
) const; ) const;
//- Sensible enthalpy [J/kg]
// Non-const access allowed for transport equations
virtual volScalarField& hs();
//- Enthalpy [J/kg]
virtual const volScalarField& hs() const;
//- Enthalpy for cell-set [J/kg]
virtual tmp<scalarField> hs
(
const scalarField& T,
const labelList& cells
) const;
//- Enthalpy for patch [J/kg]
virtual tmp<scalarField> hs
(
const scalarField& T,
const label patchi
) const;
//- Internal energy [J/kg] //- Internal energy [J/kg]
// Non-const access allowed for transport equations // Non-const access allowed for transport equations
virtual volScalarField& e(); virtual volScalarField& e();

View File

@ -30,14 +30,9 @@ License
#include "volFields.H" #include "volFields.H"
#include "basicThermo.H" #include "basicThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField Foam::fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField
( (
const fvPatch& p, const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF const DimensionedField<scalar, volMesh>& iF
@ -47,7 +42,7 @@ fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField
{} {}
fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField Foam::fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField
( (
const fixedEnthalpyFvPatchScalarField& ptf, const fixedEnthalpyFvPatchScalarField& ptf,
const fvPatch& p, const fvPatch& p,
@ -59,7 +54,7 @@ fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField
{} {}
fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField Foam::fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField
( (
const fvPatch& p, const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF, const DimensionedField<scalar, volMesh>& iF,
@ -70,7 +65,7 @@ fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField
{} {}
fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField Foam::fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField
( (
const fixedEnthalpyFvPatchScalarField& tppsf const fixedEnthalpyFvPatchScalarField& tppsf
) )
@ -79,7 +74,7 @@ fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField
{} {}
fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField Foam::fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField
( (
const fixedEnthalpyFvPatchScalarField& tppsf, const fixedEnthalpyFvPatchScalarField& tppsf,
const DimensionedField<scalar, volMesh>& iF const DimensionedField<scalar, volMesh>& iF
@ -91,7 +86,7 @@ fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void fixedEnthalpyFvPatchScalarField::updateCoeffs() void Foam::fixedEnthalpyFvPatchScalarField::updateCoeffs()
{ {
if (updated()) if (updated())
{ {
@ -109,7 +104,14 @@ void fixedEnthalpyFvPatchScalarField::updateCoeffs()
const_cast<fvPatchScalarField&>(thermo.T().boundaryField()[patchi]); const_cast<fvPatchScalarField&>(thermo.T().boundaryField()[patchi]);
Tw.evaluate(); Tw.evaluate();
operator==(thermo.h(Tw, patchi)); if (dimensionedInternalField().name() == "h")
{
operator==(thermo.h(Tw, patchi));
}
else
{
operator==(thermo.hs(Tw, patchi));
}
fixedValueFvPatchScalarField::updateCoeffs(); fixedValueFvPatchScalarField::updateCoeffs();
} }
@ -117,10 +119,14 @@ void fixedEnthalpyFvPatchScalarField::updateCoeffs()
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePatchTypeField(fvPatchScalarField, fixedEnthalpyFvPatchScalarField); namespace Foam
{
makePatchTypeField
(
fvPatchScalarField,
fixedEnthalpyFvPatchScalarField
);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -44,7 +44,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class fixedEnthalpyFvPatchScalarField Declaration Class fixedEnthalpyFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class fixedEnthalpyFvPatchScalarField class fixedEnthalpyFvPatchScalarField

View File

@ -30,14 +30,9 @@ License
#include "volFields.H" #include "volFields.H"
#include "basicThermo.H" #include "basicThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField Foam::gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField
( (
const fvPatch& p, const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF const DimensionedField<scalar, volMesh>& iF
@ -47,7 +42,7 @@ gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField
{} {}
gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField Foam::gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField
( (
const gradientEnthalpyFvPatchScalarField& ptf, const gradientEnthalpyFvPatchScalarField& ptf,
const fvPatch& p, const fvPatch& p,
@ -59,7 +54,7 @@ gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField
{} {}
gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField Foam::gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField
( (
const fvPatch& p, const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF, const DimensionedField<scalar, volMesh>& iF,
@ -70,7 +65,7 @@ gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField
{} {}
gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField Foam::gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField
( (
const gradientEnthalpyFvPatchScalarField& tppsf const gradientEnthalpyFvPatchScalarField& tppsf
) )
@ -79,7 +74,7 @@ gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField
{} {}
gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField Foam::gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField
( (
const gradientEnthalpyFvPatchScalarField& tppsf, const gradientEnthalpyFvPatchScalarField& tppsf,
const DimensionedField<scalar, volMesh>& iF const DimensionedField<scalar, volMesh>& iF
@ -91,7 +86,7 @@ gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void gradientEnthalpyFvPatchScalarField::updateCoeffs() void Foam::gradientEnthalpyFvPatchScalarField::updateCoeffs()
{ {
if (updated()) if (updated())
{ {
@ -110,12 +105,24 @@ void gradientEnthalpyFvPatchScalarField::updateCoeffs()
Tw.evaluate(); Tw.evaluate();
gradient() = thermo.Cp(Tw, patchi)*Tw.snGrad() if (dimensionedInternalField().name() == "h")
+ patch().deltaCoeffs()* {
gradient() = thermo.Cp(Tw, patchi)*Tw.snGrad()
+ patch().deltaCoeffs()*
( (
thermo.h(Tw, patchi) thermo.h(Tw, patchi)
- thermo.h(Tw, patch().faceCells()) - thermo.h(Tw, patch().faceCells())
); );
}
else
{
gradient() = thermo.Cp(Tw, patchi)*Tw.snGrad()
+ patch().deltaCoeffs()*
(
thermo.hs(Tw, patchi)
- thermo.hs(Tw, patch().faceCells())
);
}
fixedGradientFvPatchScalarField::updateCoeffs(); fixedGradientFvPatchScalarField::updateCoeffs();
} }
@ -123,10 +130,14 @@ void gradientEnthalpyFvPatchScalarField::updateCoeffs()
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePatchTypeField(fvPatchScalarField, gradientEnthalpyFvPatchScalarField); namespace Foam
{
makePatchTypeField
(
fvPatchScalarField,
gradientEnthalpyFvPatchScalarField
);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -30,14 +30,9 @@ License
#include "volFields.H" #include "volFields.H"
#include "basicThermo.H" #include "basicThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField Foam::mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField
( (
const fvPatch& p, const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF const DimensionedField<scalar, volMesh>& iF
@ -51,7 +46,7 @@ mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField
} }
mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField Foam::mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField
( (
const mixedEnthalpyFvPatchScalarField& ptf, const mixedEnthalpyFvPatchScalarField& ptf,
const fvPatch& p, const fvPatch& p,
@ -63,7 +58,7 @@ mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField
{} {}
mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField Foam::mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField
( (
const fvPatch& p, const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF, const DimensionedField<scalar, volMesh>& iF,
@ -74,7 +69,7 @@ mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField
{} {}
mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField Foam::mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField
( (
const mixedEnthalpyFvPatchScalarField& tppsf const mixedEnthalpyFvPatchScalarField& tppsf
) )
@ -83,7 +78,7 @@ mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField
{} {}
mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField Foam::mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField
( (
const mixedEnthalpyFvPatchScalarField& tppsf, const mixedEnthalpyFvPatchScalarField& tppsf,
const DimensionedField<scalar, volMesh>& iF const DimensionedField<scalar, volMesh>& iF
@ -95,7 +90,7 @@ mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void mixedEnthalpyFvPatchScalarField::updateCoeffs() void Foam::mixedEnthalpyFvPatchScalarField::updateCoeffs()
{ {
if (updated()) if (updated())
{ {
@ -117,13 +112,27 @@ void mixedEnthalpyFvPatchScalarField::updateCoeffs()
Tw.evaluate(); Tw.evaluate();
valueFraction() = Tw.valueFraction(); valueFraction() = Tw.valueFraction();
refValue() = thermo.h(Tw.refValue(), patchi);
refGrad() = thermo.Cp(Tw, patchi)*Tw.refGrad() if (dimensionedInternalField().name() == "h")
+ patch().deltaCoeffs()* {
( refValue() = thermo.h(Tw.refValue(), patchi);
refGrad() = thermo.Cp(Tw, patchi)*Tw.refGrad()
+ patch().deltaCoeffs()*
(
thermo.h(Tw, patchi) thermo.h(Tw, patchi)
- thermo.h(Tw, patch().faceCells()) - thermo.h(Tw, patch().faceCells())
); );
}
else
{
refValue() = thermo.hs(Tw.refValue(), patchi);
refGrad() = thermo.Cp(Tw, patchi)*Tw.refGrad()
+ patch().deltaCoeffs()*
(
thermo.hs(Tw, patchi)
- thermo.hs(Tw, patch().faceCells())
);
}
mixedFvPatchScalarField::updateCoeffs(); mixedFvPatchScalarField::updateCoeffs();
} }
@ -131,10 +140,14 @@ void mixedEnthalpyFvPatchScalarField::updateCoeffs()
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePatchTypeField(fvPatchScalarField, mixedEnthalpyFvPatchScalarField); namespace Foam
{
makePatchTypeField
(
fvPatchScalarField,
mixedEnthalpyFvPatchScalarField
);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -156,4 +156,22 @@ Foam::tmp<Foam::fvScalarMatrix> Foam::radiation::radiationModel::Sh
} }
Foam::tmp<Foam::fvScalarMatrix> Foam::radiation::radiationModel::Shs
(
basicThermo& thermo
) const
{
volScalarField& hs = thermo.hs();
const volScalarField cp = thermo.Cp();
const volScalarField T3 = pow3(T_);
return
(
Ru()
- fvm::Sp(4.0*Rp()*T3/cp, hs)
- Rp()*T3*(T_ - 4.0*hs/cp)
);
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -163,7 +163,7 @@ public:
virtual void calculate() = 0; virtual void calculate() = 0;
//- Read radiationProperties dictionary //- Read radiationProperties dictionary
virtual bool read(); virtual bool read() = 0;
// Access // Access
@ -176,6 +176,9 @@ public:
//- Enthalpy source term //- Enthalpy source term
virtual tmp<fvScalarMatrix> Sh(basicThermo& thermo) const; virtual tmp<fvScalarMatrix> Sh(basicThermo& thermo) const;
//- Sensible enthalpy source term
virtual tmp<fvScalarMatrix> Shs(basicThermo& thermo) const;
}; };
@ -189,4 +192,3 @@ public:
#endif #endif
// ************************************************************************* // // ************************************************************************* //

View File

@ -128,9 +128,6 @@ public:
} }
//- Sensible enthalpy [J/kg]
virtual tmp<volScalarField> hs() const = 0;
//- Chemical enthalpy [J/kg] //- Chemical enthalpy [J/kg]
virtual tmp<volScalarField> hc() const = 0; virtual tmp<volScalarField> hc() const = 0;

View File

@ -155,53 +155,6 @@ void Foam::hPsiMixtureThermo<MixtureType>::correct()
} }
template<class MixtureType>
Foam::tmp<Foam::volScalarField>
Foam::hPsiMixtureThermo<MixtureType>::hs() const
{
const fvMesh& mesh = T_.mesh();
tmp<volScalarField> ths
(
new volScalarField
(
IOobject
(
"hs",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
h_.dimensions()
)
);
volScalarField& hsf = ths();
scalarField& hsCells = hsf.internalField();
const scalarField& TCells = T_.internalField();
forAll(TCells, celli)
{
hsCells[celli] = this->cellMixture(celli).Hs(TCells[celli]);
}
forAll(T_.boundaryField(), patchi)
{
scalarField& hsp = hsf.boundaryField()[patchi];
const scalarField& Tp = T_.boundaryField()[patchi];
forAll(Tp, facei)
{
hsp[facei] = this->patchFaceMixture(patchi, facei).Hs(Tp[facei]);
}
}
return ths;
}
template<class MixtureType> template<class MixtureType>
Foam::tmp<Foam::volScalarField> Foam::tmp<Foam::volScalarField>
Foam::hPsiMixtureThermo<MixtureType>::hc() const Foam::hPsiMixtureThermo<MixtureType>::hc() const

View File

@ -94,9 +94,6 @@ public:
//- Update properties //- Update properties
virtual void correct(); virtual void correct();
//- Sensible enthalpy [J/kg]
virtual tmp<volScalarField> hs() const;
//- Chemical enthalpy [J/kg] //- Chemical enthalpy [J/kg]
virtual tmp<volScalarField> hc() const; virtual tmp<volScalarField> hc() const;

View File

@ -174,54 +174,6 @@ void Foam::hhuMixtureThermo<MixtureType>::correct()
} }
template<class MixtureType>
Foam::tmp<Foam::volScalarField>
Foam::hhuMixtureThermo<MixtureType>::hs() const
{
const fvMesh& mesh = T_.mesh();
tmp<volScalarField> ths
(
new volScalarField
(
IOobject
(
"hs",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
h_.dimensions()
)
);
volScalarField& hsf = ths();
scalarField& hsCells = hsf.internalField();
const scalarField& TCells = T_.internalField();
forAll(TCells, celli)
{
hsCells[celli] = this->cellMixture(celli).Hs(TCells[celli]);
}
forAll(T_.boundaryField(), patchi)
{
scalarField& hsp = hsf.boundaryField()[patchi];
const scalarField& Tp = T_.boundaryField()[patchi];
forAll(Tp, facei)
{
hsp[facei] = this->patchFaceMixture(patchi, facei).Hs(Tp[facei]);
}
}
return ths;
}
template<class MixtureType> template<class MixtureType>
Foam::tmp<Foam::volScalarField> Foam::tmp<Foam::volScalarField>
Foam::hhuMixtureThermo<MixtureType>::hc() const Foam::hhuMixtureThermo<MixtureType>::hc() const

View File

@ -36,8 +36,6 @@ SourceFiles
#ifndef hhuMixtureThermo_H #ifndef hhuMixtureThermo_H
#define hhuMixtureThermo_H #define hhuMixtureThermo_H
//#include "hPsiMixtureThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
@ -94,9 +92,6 @@ public:
//- Update properties //- Update properties
virtual void correct(); virtual void correct();
//- Sensible enthalpy [J/kg]
virtual tmp<volScalarField> hs() const;
//- Chemical enthalpy [J/kg] //- Chemical enthalpy [J/kg]
virtual tmp<volScalarField> hc() const; virtual tmp<volScalarField> hc() const;

View File

@ -128,9 +128,6 @@ public:
} }
//- Sensible enthalpy [J/kg]
virtual tmp<volScalarField> hs() const = 0;
//- Chemical enthalpy [J/kg] //- Chemical enthalpy [J/kg]
virtual tmp<volScalarField> hc() const = 0; virtual tmp<volScalarField> hc() const = 0;

View File

@ -154,53 +154,6 @@ void Foam::hRhoMixtureThermo<MixtureType>::correct()
} }
template<class MixtureType>
Foam::tmp<Foam::volScalarField>
Foam::hRhoMixtureThermo<MixtureType>::hs() const
{
const fvMesh& mesh = T_.mesh();
tmp<volScalarField> ths
(
new volScalarField
(
IOobject
(
"hs",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
h_.dimensions()
)
);
volScalarField& hsf = ths();
scalarField& hsCells = hsf.internalField();
const scalarField& TCells = T_.internalField();
forAll(TCells, celli)
{
hsCells[celli] = this->cellMixture(celli).Hs(TCells[celli]);
}
forAll(T_.boundaryField(), patchi)
{
scalarField& hsp = hsf.boundaryField()[patchi];
const scalarField& Tp = T_.boundaryField()[patchi];
forAll(Tp, facei)
{
hsp[facei] = this->patchFaceMixture(patchi, facei).Hs(Tp[facei]);
}
}
return ths;
}
template<class MixtureType> template<class MixtureType>
Foam::tmp<Foam::volScalarField> Foam::tmp<Foam::volScalarField>
Foam::hRhoMixtureThermo<MixtureType>::hc() const Foam::hRhoMixtureThermo<MixtureType>::hc() const

View File

@ -94,9 +94,6 @@ public:
//- Update properties //- Update properties
virtual void correct(); virtual void correct();
//- Sensible enthalpy [J/kg]
virtual tmp<volScalarField> hs() const;
//- Chemical enthalpy [J/kg] //- Chemical enthalpy [J/kg]
virtual tmp<volScalarField> hc() const; virtual tmp<volScalarField> hc() const;

View File

@ -242,6 +242,9 @@ public:
//- Temperature from Enthalpy given an initial temperature T0 //- Temperature from Enthalpy given an initial temperature T0
inline scalar TH(const scalar H, const scalar T0) const; inline scalar TH(const scalar H, const scalar T0) const;
//- Temperature from sensible Enthalpy given an initial T0
inline scalar THs(const scalar Hs, const scalar T0) const;
//- Temperature from internal energy given an initial temperature T0 //- Temperature from internal energy given an initial temperature T0
inline scalar TE(const scalar E, const scalar T0) const; inline scalar TE(const scalar E, const scalar T0) const;

View File

@ -281,6 +281,17 @@ inline Foam::scalar Foam::specieThermo<thermo>::TH
} }
template<class thermo>
inline Foam::scalar Foam::specieThermo<thermo>::THs
(
const scalar hs,
const scalar T0
) const
{
return T(hs, T0, &specieThermo<thermo>::Hs, &specieThermo<thermo>::Cp);
}
template<class thermo> template<class thermo>
inline Foam::scalar Foam::specieThermo<thermo>::TE inline Foam::scalar Foam::specieThermo<thermo>::TE
( (

View File

@ -0,0 +1,32 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object G;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 0 -3 0 0 0 0];
internalField uniform 0;
boundaryField
{
".*"
{
type MarshakRadiation;
T T;
emissivity 1;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,32 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object IDefault;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 0 -3 0 0 0 0];
internalField uniform 0;
boundaryField
{
".*"
{
type greyDiffusiveRadiation;
T T;
emissivity 1.0
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,52 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 300;
boundaryField
{
outlet
{
type inletOutlet;
inletValue uniform 300;
value uniform 300;
}
sides
{
type inletOutlet;
inletValue uniform 300;
value uniform 300;
}
base
{
type zeroGradient;
}
inlet
{
type fixedValue;
value uniform 300;
}
frontBack
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,55 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
outlet
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0 0 0);
}
sides
{
type pressureInletOutletVelocity;
outletValue uniform (0 0 0);
value uniform (0 0 0);
}
base
{
type fixedValue;
value uniform (0 0 0);
}
inlet
{
type fixedValue;
value uniform (0 0.05 0);
}
frontBack
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,47 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object alphaSgs;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
outlet
{
type zeroGradient;
}
sides
{
type zeroGradient;
}
base
{
type zeroGradient;
}
inlet
{
type zeroGradient;
}
frontBack
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,47 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object b;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
outlet
{
type zeroGradient;
}
sides
{
type zeroGradient;
}
base
{
type zeroGradient;
}
inlet
{
type zeroGradient;
}
frontBack
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,52 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object ft;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
outlet
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
sides
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
base
{
type zeroGradient;
}
inlet
{
type fixedValue;
value uniform 1.0;
}
frontBack
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,52 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object fu;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
outlet
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
sides
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
base
{
type zeroGradient;
}
inlet
{
type fixedValue;
value uniform 1.0;
}
frontBack
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,53 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 1e-4;
boundaryField
{
outlet
{
type inletOutlet;
inletValue uniform 1e-4;
value uniform 1e-4;
}
sides
{
type inletOutlet;
inletValue uniform 1e-4;
value uniform 1e-4;
}
base
{
type fixedValue;
value uniform 1e-4;
}
inlet
{
type fixedValue;
value uniform 1e-4;
}
frontBack
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,47 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object muSgs;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
outlet
{
type zeroGradient;
}
sides
{
type zeroGradient;
}
base
{
type zeroGradient;
}
inlet
{
type zeroGradient;
}
frontBack
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,55 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 101325;
boundaryField
{
outlet
{
type buoyantPressure;
value uniform 101325;
}
sides
{
type uniformDensityHydrostaticPressure;
rho 1.2;
pRefValue 101325;
pRefPoint (0 0 0);
value $internalField;
}
base
{
type buoyantPressure;
value $internalField;
}
inlet
{
type buoyantPressure;
value $internalField;
}
frontBack
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,13 @@
#!/bin/sh
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
runApplication setSet -batch makeFaceSet.setSet
runApplication createPatch -overwrite
# Run
runApplication fireFoam
# -----------------------------------------------------------------------------

View File

@ -0,0 +1,84 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format binary;
class dictionary;
location "constant";
object LESProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
LESModel oneEqEddy;
delta cubeRootVol;
turbulence on;
printCoeffs on;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
PrandtlCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
smoothCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
maxDeltaRatio 1.1;
}
Cdelta 0.158;
}
vanDriestCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
smoothCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
maxDeltaRatio 1.1;
}
Aplus 26;
Cdelta 0.158;
}
smoothCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
maxDeltaRatio 1.1;
}
// ************************************************************************* //

View File

@ -0,0 +1,491 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object SpeciesTable;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
fields
1
(
{
name ft;
min 0;
max 1;
N 100;
}
)
;
output
5
(
{
name CH4;
}
{
name CO2;
}
{
name H2O;
}
{
name CO;
}
{
name soot;
}
)
;
values
6
(
101
(
0.001
0.011
0.021
0.031
0.041
0.051
0.061
0.071
0.081
0.091
0.101
0.111
0.121
0.131
0.141
0.151
0.161
0.171
0.181
0.191
0.201
0.211
0.221
0.231
0.241
0.251
0.261
0.271
0.281
0.291
0.301
0.311
0.321
0.331
0.341
0.351
0.361
0.371
0.381
0.391
0.401
0.411
0.421
0.431
0.441
0.451
0.461
0.471
0.481
0.491
0.501
0.511
0.521
0.531
0.541
0.551
0.561
0.571
0.581
0.591
0.601
0.611
0.621
0.631
0.641
0.651
0.661
0.671
0.681
0.691
0.701
0.711
0.721
0.731
0.741
0.751
0.761
0.771
0.781
0.791
0.801
0.811
0.821
0.831
0.841
0.851
0.861
0.871
0.881
0.891
0.901
0.911
0.921
0.931
0.941
0.951
0.961
0.971
0.981
0.991
0.999
)
101
(
0
0
0
0
0
0
0.0105883
0.0285208
0.0461843
0.0635849
0.0807284
0.0976204
0.114266
0.130672
0.146842
0.162782
0.178496
0.193989
0.209266
0.224332
0.23919
0.253845
0.268301
0.282563
0.296633
0.310517
0.324216
0.337736
0.35108
0.364251
0.377252
0.390087
0.402759
0.415271
0.427625
0.439826
0.451876
0.463777
0.475532
0.487144
0.498616
0.50995
0.521148
0.532214
0.543149
0.553955
0.564635
0.575191
0.585626
0.595941
0.606138
0.61622
0.626187
0.636044
0.64579
0.655428
0.66496
0.674387
0.683712
0.692935
0.702059
0.711085
0.720014
0.728849
0.73759
0.74624
0.754799
0.763269
0.771652
0.779948
0.788159
0.796287
0.804332
0.812297
0.820181
0.827987
0.835715
0.843367
0.850943
0.858445
0.865875
0.873232
0.880518
0.887735
0.894882
0.901961
0.908974
0.91592
0.922802
0.929619
0.936373
0.943064
0.949694
0.956263
0.962772
0.969222
0.975614
0.981948
0.988226
0.994448
0.999385
)
101
(
0.00200328
0.0213922
0.0396804
0.0569589
0.0733092
0.088804
0.0940165
0.0923125
0.0906341
0.0889806
0.0873516
0.0857465
0.0841647
0.0826058
0.0810693
0.0795547
0.0780615
0.0765893
0.0751376
0.073706
0.0722942
0.0709016
0.0695279
0.0681728
0.0668357
0.0655165
0.0642147
0.06293
0.0616621
0.0604105
0.0591751
0.0579555
0.0567514
0.0555625
0.0543885
0.0532292
0.0520842
0.0509534
0.0498363
0.0487329
0.0476428
0.0465658
0.0455017
0.0444503
0.0434112
0.0423844
0.0413695
0.0403664
0.0393749
0.0383948
0.0374258
0.0364678
0.0355206
0.0345841
0.033658
0.0327421
0.0318364
0.0309406
0.0300546
0.0291781
0.0283112
0.0274535
0.026605
0.0257655
0.0249349
0.024113
0.0232997
0.0224948
0.0216983
0.0209099
0.0201297
0.0193573
0.0185928
0.0178361
0.0170869
0.0163452
0.0156108
0.0148837
0.0141638
0.0134509
0.0127449
0.0120458
0.0113535
0.0106678
0.00998859
0.00931588
0.00864953
0.00798947
0.00733558
0.0066878
0.00604604
0.00541021
0.00478022
0.00415601
0.00353749
0.00292458
0.00231721
0.00171531
0.00111879
0.000527591
5.8413e-05
)
101
(
0.00400655
0.0427844
0.0793607
0.113918
0.146618
0.177608
0.188033
0.184625
0.181268
0.177961
0.174703
0.171493
0.168329
0.165212
0.162139
0.159109
0.156123
0.153179
0.150275
0.147412
0.144588
0.141803
0.139056
0.136346
0.133671
0.131033
0.128429
0.12586
0.123324
0.120821
0.11835
0.115911
0.113503
0.111125
0.108777
0.106458
0.104168
0.101907
0.0996727
0.0974658
0.0952856
0.0931317
0.0910035
0.0889006
0.0868225
0.0847688
0.082739
0.0807328
0.0787498
0.0767895
0.0748516
0.0729356
0.0710413
0.0691682
0.067316
0.0654843
0.0636728
0.0618812
0.0601091
0.0583563
0.0566223
0.054907
0.05321
0.051531
0.0498697
0.0482259
0.0465993
0.0449896
0.0433965
0.0418198
0.0402593
0.0387147
0.0371857
0.0356721
0.0341737
0.0326903
0.0312216
0.0297674
0.0283276
0.0269018
0.0254899
0.0240917
0.022707
0.0213355
0.0199772
0.0186318
0.0172991
0.0159789
0.0146712
0.0133756
0.0120921
0.0108204
0.00956045
0.00831202
0.00707498
0.00584917
0.00463443
0.00343062
0.00223758
0.00105518
0.000116826
)
101{0}
101{0}
)
;

View File

@ -0,0 +1,30 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object combustionProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
combustionModel infinitelyFastChemistry;
infinitelyFastChemistryCoeffs
{
C 10.0;
}
noCombustionCoeffs
{
}
// ************************************************************************* //

View File

@ -0,0 +1,21 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class uniformDimensionedVectorField;
location "constant";
object g;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -2 0 0 0 0];
value (0 -9.8 0);
// ************************************************************************* //

View File

@ -0,0 +1,67 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 1;
vertices
(
(-0.5 0 -0.01)
( 0.5 0 -0.01)
( 0.5 1 -0.01)
(-0.5 1 -0.01)
(-0.5 0 0.01)
( 0.5 0 0.01)
( 0.5 1 0.01)
(-0.5 1 0.01)
);
blocks
(
hex (0 1 2 3 4 5 6 7) (150 150 1) simpleGrading (1 1 1)
);
edges
(
);
patches
(
patch base
(
(0 1 5 4)
)
patch outlet
(
(3 2 6 7)
)
patch sides
(
(1 5 6 2)
(0 4 7 3)
)
empty frontAndBack
(
(0 1 2 3)
(4 5 6 7)
)
);
mergePatchPairs
(
);
// ************************************************************************* //

View File

@ -0,0 +1,52 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
5
(
base
{
type patch;
nFaces 134;
startFace 44700;
}
outlet
{
type patch;
nFaces 150;
startFace 44834;
}
sides
{
type patch;
nFaces 300;
startFace 44984;
}
frontAndBack
{
type empty;
nFaces 45000;
startFace 45284;
}
inlet
{
type patch;
nFaces 16;
startFace 90284;
}
)
// ************************************************************************* //

View File

@ -0,0 +1,149 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object radiationProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
radiation on;
radiationModel fvDOM;
noRadiation
{
}
P1Coeffs
{
}
fvDOMCoeffs
{
nPhi 4; // azimuthal angles in PI/2 on X-Y.(from Y to X)
nTheta 0; // polar angles in PI (from Z to X-Y plane)
convergence 1e-3; // convergence criteria for radiation iteration
maxIter 1; // maximum number of iterations
}
// Number of flow iterations per radiation iteration
solverFreq 10;
absorptionEmissionModel greyMeanAbsorptionEmission;
constantAbsorptionEmissionCoeffs
{
a a [ 0 -1 0 0 0 0 0 ] 0.01;
e e [ 0 -1 0 0 0 0 0 ] 0;
E E [ 1 -1 -3 0 0 0 0 ] 0;
}
greyMeanAbsorptionEmissionCoeffs
{
lookUpTableFileName "SpeciesTable";
EhrrCoeff 0.0;
CO2
{
Tcommon 300; //Common Temp
invTemp true; //Is the polynomio using inverse temperature.
Tlow 200; //Low Temp
Thigh 2500; //High Temp
loTcoeffs //coefss for T < Tcommon
(
0 // a0 +
0 // a1*T +
0 // a2*T^(+/-)2 +
0 // a3*T^(+/-)3 +
0 // a4*T^(+/-)4 +
0 // a5*T^(+/-)5 +
);
hiTcoeffs //coefss for T > Tcommon
(
18.741
-121.31e3
273.5e6
-194.05e9
56.31e12
-5.8169e15
);
}
H2O
{
Tcommon 300;
invTemp true;
Tlow 200;
Thigh 2500;
loTcoeffs
(
0
0
0
0
0
0
);
hiTcoeffs
(
-0.23093
-1.12390e3
9.4153e6
-2.99885e9
0.51382e12
-1.868e10
);
}
CH4
{
Tcommon 300;
Tlow 200;
Thigh 2500;
invTemp false;
loTcoeffs
(
0
0
0
0
0
0
);
hiTcoeffs
(
6.6334
-0.0035686
1.6682e-8
2.5611e-10
-2.6558e-14
0
);
}
}
scatterModel constantScatter;
constantScatterCoeffs
{
sigma sigma [ 0 -1 0 0 0 0 0 ] 0;
C C [ 0 0 0 0 0 0 0 ] 0;
}
// ************************************************************************* //

View File

@ -0,0 +1,55 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType hsPsiMixtureThermo<veryInhomogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>;
stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [0 0 0 0 0 0 0] 17.1271;
stoichiometricOxygenFuelMassRatio stoichiometricOxygenFuelMassRatio [0 0 0 0 0 0 0] 4.0;
qFuel qFuel [0 2 -2 0 0 0 0] 5.00264e+07;
fuel fuel 1 16.0428
200 6000 1000
1.63543 0.0100844 -3.36924e-06 5.34973e-10 -3.15528e-14 -10005.6 9.9937
5.14988 -0.013671 4.91801e-05 -4.84744e-08 1.66694e-11 -10246.6 -4.64132
1.67212e-06 170.672;
oxidant oxidant 1 28.8504
200 6000 1000
3.10131 0.00124137 -4.18816e-07 6.64158e-11 -3.91274e-15 -985.266 5.35597
3.58378 -0.000727005 1.67057e-06 -1.09203e-10 -4.31765e-13 -1050.53 3.11239
1.67212e-06 170.672;
reactants reactants 1 27.6004
200 6000 1000
2.95825 0.00210441 -7.06762e-07 1.12145e-10 -6.61028e-15 -1865.61 5.80859
3.73662 -0.00199028 6.30727e-06 -4.82941e-09 1.23723e-12 -1948.03 2.35566
1.67212e-06 170.672;
burntProducts burntProducts 1 27.6334
200 6000 1000
3.0602 0.00182422 -5.93878e-07 8.93807e-11 -4.97595e-15 -10998.7 5.32209
3.54628 0.000378279 2.02797e-07 9.31602e-10 -6.84016e-13 -11102.1 2.90098
1.67212e-06 170.672;
products products 1 27.6004
200 6000 1000
3.05615 0.0018477 -6.01767e-07 9.06474e-11 -5.05149e-15 -10995.9 5.33537
3.55084 0.000338343 3.42018e-07 7.91162e-10 -6.34688e-13 -11099.7 2.87954
1.67212e-06 170.672;
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format binary;
class dictionary;
location "constant";
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType LESModel;
// ************************************************************************* //

View File

@ -0,0 +1 @@
faceSet f0 new boxToFace (-0.0529 -0.001 -0.1)(0.0529 0.002 0.1)

View File

@ -0,0 +1,55 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application fireFoam;
startFrom startTime;
startTime 0.0;
stopAt endTime;
endTime 3.0;
deltaT 0.001;
writeControl adjustableRunTime;
writeInterval 0.1;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
graphFormat raw;
runTimeModifiable yes;
adjustTimeStep yes;
maxCo 0.25;
maxDeltaT 0.1;
// ************************************************************************* //

View File

@ -0,0 +1,80 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object createPatchDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// This application/dictionary controls:
// - optional: create new patches from boundary faces (either given as
// a set of patches or as a faceSet)
// - always: order faces on coupled patches such that they are opposite. This
// is done for all coupled faces, not just for any patches created.
// - optional: synchronise points on coupled patches.
// 1. Create cyclic:
// - specify where the faces should come from
// - specify the type of cyclic. If a rotational specify the rotationAxis
// and centre to make matching easier
// - pointSync true to guarantee points to line up.
// 2. Correct incorrect cyclic:
// This will usually fail upon loading:
// "face 0 area does not match neighbour 2 by 0.0100005%"
// " -- possible face ordering problem."
// - change patch type from 'cyclic' to 'patch' in the polyMesh/boundary file.
// - loosen match tolerance to get case to load
// - regenerate cyclic as above
// Tolerance used in matching faces. Absolute tolerance is span of
// face times this factor. To load incorrectly matches meshes set this
// to a higher value.
matchTolerance 1E-3;
// Do a synchronisation of coupled points after creation of any patches.
pointSync true;
// Patches to create.
patchInfo
(
{
// Name of new patch
name inlet;
// Type of new patch
dictionary
{
type patch;
// Optional: explicitly set transformation tensor.
// Used when matching and synchronising points.
//transform translational;
//separationVector (-2289 0 0);
transform rotational;
rotationAxis (1 0 0);
rotationCentre (0 0 0);
}
// How to construct: either from 'patches' or 'set'
constructFrom set;
// If constructFrom = patches : names of patches. Wildcards allowed.
patches ("periodic.*");
// If constructFrom = set : name of faceSet
set f0;
}
);
// ************************************************************************* //

View File

@ -0,0 +1,76 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss limitedLinear 1;
div(phi,k) Gauss limitedLinear 1;
flux(phi,ft) Gauss limitedLinear01 1;
div(phi,ft_b_h) Gauss multivariateSelection
{
fu limitedLinear01 1;
ft limitedLinear01 1;
hs limitedLinear 1;
};
div((muEff*dev2(grad(U).T()))) Gauss linear;
div(phiU,p) Gauss linear;
div(Ji,Ii_h) Gauss upwind;
}
laplacianSchemes
{
default none;
laplacian(muEff,U) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DBEff,B) Gauss linear corrected;
laplacian(alphaEff,hs) Gauss linear uncorrected;
laplacian(alphaEff,fu) Gauss linear uncorrected;
laplacian(alphaEff,ft) Gauss linear uncorrected;
laplacian((((rho*(1|A(U)))*rho)*gh)) Gauss linear uncorrected;
laplacian(interpolate((rho*(1|A(U)))),p) Gauss linear uncorrected;
laplacian(gammaRad,G) Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
fluxRequired
{
default no;
p;
}
// ************************************************************************* //

View File

@ -0,0 +1,138 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
rho
{
solver PCG;
preconditioner DIC;
tolerance 0;
relTol 0;
};
p
{
solver GAMG;
tolerance 1e-7;
relTol 0.01;
smoother GaussSeidel;
cacheAgglomeration true;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
};
pFinal
{
solver GAMG;
tolerance 1e-7;
relTol 0;
smoother GaussSeidel;
cacheAgglomeration true;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
};
ft
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-7;
relTol 0;
nSweeps 1;
};
fu
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-7;
relTol 0;
nSweeps 1;
};
U
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-7;
relTol 0.1;
nSweeps 1;
};
UFinal
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-7;
relTol 0;
nSweeps 1;
};
k
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-7;
relTol 0;
nSweeps 1;
};
hs
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-7;
relTol 0;
};
Ii
{
solver GAMG;
tolerance 1e-4;
relTol 0;
smoother DILU;
cacheAgglomeration true;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
}
G
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0;
}
}
PISO
{
momentumPredictor yes;
nOuterCorrectors 1;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
}
// ************************************************************************* //