mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -7,7 +7,12 @@
|
||||
+ betav*fvc::ddt(rho, K) + fvc::div(phi, K)
|
||||
+ (
|
||||
hea.name() == "ea"
|
||||
? fvc::div(phi, volScalarField("Ep", p/rho))
|
||||
? fvc::div
|
||||
(
|
||||
phi/fvc::interpolate(rho),
|
||||
p,
|
||||
"div(phiv,p)"
|
||||
)
|
||||
: -betav*dpdt
|
||||
)
|
||||
- fvm::laplacian(Db, hea)
|
||||
|
||||
@ -8,7 +8,12 @@ if (ign.ignited())
|
||||
+ (betav*fvc::ddt(rho, K) + fvc::div(phi, K))*rho/thermo.rhou()
|
||||
+ (
|
||||
heau.name() == "eau"
|
||||
? fvc::div(phi, volScalarField("Ep", p/rho))*rho/thermo.rhou()
|
||||
? fvc::div
|
||||
(
|
||||
phi/fvc::interpolate(rho),
|
||||
p,
|
||||
"div(phiv,p)"
|
||||
)*rho/thermo.rhou()
|
||||
: -betav*dpdt*rho/thermo.rhou()
|
||||
)
|
||||
- fvm::laplacian(Db, heau)
|
||||
|
||||
@ -7,7 +7,12 @@
|
||||
+ fvc::ddt(rho, K) + fvc::div(phi, K)
|
||||
+ (
|
||||
hea.name() == "ea"
|
||||
? fvc::div(phi, volScalarField("Ep", p/rho))
|
||||
? fvc::div
|
||||
(
|
||||
fvc::absolute(phi/fvc::interpolate(rho), U),
|
||||
p,
|
||||
"div(phiv,p)"
|
||||
)
|
||||
: -dpdt
|
||||
)
|
||||
- fvm::laplacian(turbulence->alphaEff(), hea)
|
||||
|
||||
@ -8,7 +8,12 @@ if (ign.ignited())
|
||||
+ (fvc::ddt(rho, K) + fvc::div(phi, K))*rho/thermo.rhou()
|
||||
+ (
|
||||
heau.name() == "eau"
|
||||
? fvc::div(phi, volScalarField("Ep", p/rho))*rho/thermo.rhou()
|
||||
? fvc::div
|
||||
(
|
||||
fvc::absolute(phi/fvc::interpolate(rho), U),
|
||||
p,
|
||||
"div(phiv,p)"
|
||||
)*rho/thermo.rhou()
|
||||
: -dpdt*rho/thermo.rhou()
|
||||
)
|
||||
- fvm::laplacian(turbulence->alphaEff(), heau)
|
||||
|
||||
@ -66,5 +66,5 @@ K = 0.5*magSqr(U);
|
||||
|
||||
if (thermo.dpdt())
|
||||
{
|
||||
dpdt = fvc::ddt(p);
|
||||
dpdt = fvc::ddt(p) - fvc::div(fvc::meshPhi(rho, U), p);
|
||||
}
|
||||
|
||||
@ -55,7 +55,12 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
+ fvc::ddt(rho, K) + fvc::div(phi, K)
|
||||
+ (
|
||||
he.name() == "e"
|
||||
? fvc::div(phi, volScalarField("Ep", p/rho))
|
||||
? fvc::div
|
||||
(
|
||||
fvc::absolute(phi/fvc::interpolate(rho), U),
|
||||
p,
|
||||
"div(phiv,p)"
|
||||
)
|
||||
: -dpdt
|
||||
)
|
||||
- fvm::laplacian(turbulence->alphaEff(), he)
|
||||
|
||||
@ -7,7 +7,12 @@
|
||||
+ fvc::ddt(rho, K) + fvc::div(phi, K)
|
||||
+ (
|
||||
he.name() == "e"
|
||||
? fvc::div(phi, volScalarField("Ep", p/rho))
|
||||
? fvc::div
|
||||
(
|
||||
fvc::absolute(phi/fvc::interpolate(rho), U),
|
||||
p,
|
||||
"div(phiv,p)"
|
||||
)
|
||||
: -dpdt
|
||||
)
|
||||
- fvm::laplacian(turbulence->alphaEff(), he)
|
||||
|
||||
@ -7,7 +7,12 @@
|
||||
+ fvc::ddt(rho, K) + fvc::div(phi, K)
|
||||
+ (
|
||||
he.name() == "e"
|
||||
? fvc::div(phi, volScalarField("Ep", p/rho))
|
||||
? fvc::div
|
||||
(
|
||||
fvc::absolute(phi/fvc::interpolate(rho), U),
|
||||
p,
|
||||
"div(phiv,p)"
|
||||
)
|
||||
: -dpdt
|
||||
)
|
||||
- fvm::laplacian(turbulence->alphaEff(), he)
|
||||
|
||||
@ -2,7 +2,8 @@
|
||||
solve
|
||||
(
|
||||
fvm::ddt(rho, e) + fvm::div(phi, e)
|
||||
+ fvc::ddt(rho, K) + fvc::div(phi, volScalarField("Ekp", K + p/rho))
|
||||
+ fvc::ddt(rho, K) + fvc::div(phi, K)
|
||||
+ fvc::div(fvc::absolute(phi/fvc::interpolate(rho), U), p, "div(phiv,p)")
|
||||
- fvm::laplacian(turbulence->alphaEff(), e)
|
||||
);
|
||||
|
||||
|
||||
@ -1,11 +0,0 @@
|
||||
{
|
||||
solve
|
||||
(
|
||||
fvm::ddt(rho, e) + fvm::div(phi, e)
|
||||
+ fvc::ddt(rho, K) + fvc::div(phi, K)
|
||||
+ fvc::div(phi/fvc::interpolate(rho) + mesh.phi(), p, "div(phiv,p)")
|
||||
- fvm::laplacian(turbulence->alphaEff(), e)
|
||||
);
|
||||
|
||||
thermo.correct();
|
||||
}
|
||||
@ -7,7 +7,12 @@
|
||||
+ fvc::ddt(rho, K) + fvc::div(phi, K)
|
||||
+ (
|
||||
he.name() == "e"
|
||||
? fvc::div(phi, volScalarField("Ep", p/rho))
|
||||
? fvc::div
|
||||
(
|
||||
fvc::absolute(phi/fvc::interpolate(rho), U),
|
||||
p,
|
||||
"div(phiv,p)"
|
||||
)
|
||||
: -dpdt
|
||||
)
|
||||
- fvm::laplacian(turb.alphaEff(), he)
|
||||
|
||||
@ -7,7 +7,12 @@
|
||||
+ fvc::ddt(rho, K) + fvc::div(phi, K)
|
||||
+ (
|
||||
he.name() == "e"
|
||||
? fvc::div(phi, volScalarField("Ep", p/rho))
|
||||
? fvc::div
|
||||
(
|
||||
fvc::absolute(phi/fvc::interpolate(rho), U),
|
||||
p,
|
||||
"div(phiv,p)"
|
||||
)
|
||||
: -dpdt
|
||||
)
|
||||
- fvm::laplacian(turbulence->alphaEff(), he)
|
||||
|
||||
@ -7,7 +7,12 @@
|
||||
+ fvc::ddt(rho, K) + fvc::div(phi, K)
|
||||
+ (
|
||||
he.name() == "e"
|
||||
? fvc::div(phi, volScalarField("Ep", p/rho))
|
||||
? fvc::div
|
||||
(
|
||||
fvc::absolute(phi/fvc::interpolate(rho), U),
|
||||
p,
|
||||
"div(phiv,p)"
|
||||
)
|
||||
: -dpdt
|
||||
)
|
||||
- fvm::laplacian(turbulence->alphaEff(), he)
|
||||
|
||||
@ -7,7 +7,12 @@
|
||||
+ fvc::ddt(rho, K) + fvc::div(phi, K)
|
||||
+ (
|
||||
he.name() == "e"
|
||||
? fvc::div(phi, volScalarField("Ep", p/rho))
|
||||
? fvc::div
|
||||
(
|
||||
fvc::absolute(phi/fvc::interpolate(rho), U),
|
||||
p,
|
||||
"div(phiv,p)"
|
||||
)
|
||||
: -dpdt
|
||||
)
|
||||
- fvm::laplacian(turbulence->alphaEff(), he)
|
||||
|
||||
@ -79,5 +79,5 @@ K = 0.5*magSqr(U);
|
||||
|
||||
if (thermo.dpdt())
|
||||
{
|
||||
dpdt = fvc::ddt(p);
|
||||
dpdt = fvc::ddt(p) - fvc::div(fvc::meshPhi(rho, U), p);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -148,4 +148,39 @@ void Foam::fvc::makeAbsolute
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::surfaceScalarField> Foam::fvc::absolute
|
||||
(
|
||||
const tmp<surfaceScalarField>& tphi,
|
||||
const volVectorField& U
|
||||
)
|
||||
{
|
||||
if (tphi().mesh().moving())
|
||||
{
|
||||
return tphi + fvc::meshPhi(U);
|
||||
}
|
||||
else
|
||||
{
|
||||
return tphi;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::surfaceScalarField> Foam::fvc::absolute
|
||||
(
|
||||
const tmp<surfaceScalarField>& tphi,
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U
|
||||
)
|
||||
{
|
||||
if (tphi().mesh().moving())
|
||||
{
|
||||
return tphi + fvc::meshPhi(rho, U);
|
||||
}
|
||||
else
|
||||
{
|
||||
return tphi;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -116,6 +116,22 @@ namespace fvc
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U
|
||||
);
|
||||
|
||||
|
||||
//- Return the given relative flux in absolute form
|
||||
tmp<surfaceScalarField> absolute
|
||||
(
|
||||
const tmp<surfaceScalarField>& tphi,
|
||||
const volVectorField& U
|
||||
);
|
||||
|
||||
//- Return the given relative flux in absolute form
|
||||
tmp<surfaceScalarField> absolute
|
||||
(
|
||||
const tmp<surfaceScalarField>& tphi,
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -33,11 +33,13 @@ License
|
||||
#include "perfectGas.H"
|
||||
#include "hConstThermo.H"
|
||||
#include "janafThermo.H"
|
||||
#include "absoluteEnthalpy.H"
|
||||
#include "thermo.H"
|
||||
#include "constTransport.H"
|
||||
#include "sutherlandTransport.H"
|
||||
|
||||
#include "absoluteEnthalpy.H"
|
||||
#include "absoluteInternalEnergy.H"
|
||||
|
||||
#include "homogeneousMixture.H"
|
||||
#include "inhomogeneousMixture.H"
|
||||
#include "veryInhomogeneousMixture.H"
|
||||
@ -91,6 +93,20 @@ makeReactionThermo
|
||||
specie
|
||||
);
|
||||
|
||||
makeReactionThermo
|
||||
(
|
||||
psiThermo,
|
||||
psiuReactionThermo,
|
||||
heheuPsiThermo,
|
||||
egrMixture,
|
||||
constTransport,
|
||||
absoluteEnthalpy,
|
||||
hConstThermo,
|
||||
perfectGas,
|
||||
specie
|
||||
);
|
||||
|
||||
|
||||
makeReactionThermo
|
||||
(
|
||||
psiThermo,
|
||||
@ -136,9 +152,49 @@ makeReactionThermo
|
||||
psiuReactionThermo,
|
||||
heheuPsiThermo,
|
||||
egrMixture,
|
||||
constTransport,
|
||||
sutherlandTransport,
|
||||
absoluteEnthalpy,
|
||||
hConstThermo,
|
||||
janafThermo,
|
||||
perfectGas,
|
||||
specie
|
||||
);
|
||||
|
||||
|
||||
makeReactionThermo
|
||||
(
|
||||
psiThermo,
|
||||
psiuReactionThermo,
|
||||
heheuPsiThermo,
|
||||
homogeneousMixture,
|
||||
sutherlandTransport,
|
||||
absoluteInternalEnergy,
|
||||
janafThermo,
|
||||
perfectGas,
|
||||
specie
|
||||
);
|
||||
|
||||
makeReactionThermo
|
||||
(
|
||||
psiThermo,
|
||||
psiuReactionThermo,
|
||||
heheuPsiThermo,
|
||||
inhomogeneousMixture,
|
||||
sutherlandTransport,
|
||||
absoluteInternalEnergy,
|
||||
janafThermo,
|
||||
perfectGas,
|
||||
specie
|
||||
);
|
||||
|
||||
makeReactionThermo
|
||||
(
|
||||
psiThermo,
|
||||
psiuReactionThermo,
|
||||
heheuPsiThermo,
|
||||
veryInhomogeneousMixture,
|
||||
sutherlandTransport,
|
||||
absoluteInternalEnergy,
|
||||
janafThermo,
|
||||
perfectGas,
|
||||
specie
|
||||
);
|
||||
@ -150,7 +206,7 @@ makeReactionThermo
|
||||
heheuPsiThermo,
|
||||
egrMixture,
|
||||
sutherlandTransport,
|
||||
absoluteEnthalpy,
|
||||
absoluteInternalEnergy,
|
||||
janafThermo,
|
||||
perfectGas,
|
||||
specie
|
||||
|
||||
@ -0,0 +1,140 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\/ 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::absoluteInternalEnergy
|
||||
|
||||
Description
|
||||
Thermodynamics mapping class to expose the absolute internal energy function
|
||||
as the standard internal energy function e(T).
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef absoluteInternalEnergy_H
|
||||
#define absoluteInternalEnergy_H
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class absoluteInternalEnergy Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Thermo>
|
||||
class absoluteInternalEnergy
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct
|
||||
absoluteInternalEnergy()
|
||||
{}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the instantiated type name
|
||||
static word typeName()
|
||||
{
|
||||
return "absoluteInternalEnergy";
|
||||
}
|
||||
|
||||
// Fundamental properties
|
||||
|
||||
static word name()
|
||||
{
|
||||
return "ea";
|
||||
}
|
||||
|
||||
// Absolute internal energy [J/kmol]
|
||||
scalar he
|
||||
(
|
||||
const Thermo& thermo,
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return thermo.ea(p, T);
|
||||
}
|
||||
|
||||
// Heat capacity at constant volume [J/(kmol K)]
|
||||
scalar cpv
|
||||
(
|
||||
const Thermo& thermo,
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return thermo.cv(p, T);
|
||||
}
|
||||
|
||||
//- cp/cv []
|
||||
scalar cpBycpv
|
||||
(
|
||||
const Thermo& thermo,
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return thermo.gamma(p, T);
|
||||
}
|
||||
|
||||
// Absolute internal energy [J/kg]
|
||||
scalar HE
|
||||
(
|
||||
const Thermo& thermo,
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return thermo.Ea(p, T);
|
||||
}
|
||||
|
||||
//- Temperature from absolute internal energy
|
||||
// given an initial temperature T0
|
||||
scalar THE
|
||||
(
|
||||
const Thermo& thermo,
|
||||
const scalar e,
|
||||
const scalar p,
|
||||
const scalar T0
|
||||
) const
|
||||
{
|
||||
return thermo.TEa(e, p, T0);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -102,7 +102,7 @@ public:
|
||||
return thermo.gamma(p, T);
|
||||
}
|
||||
|
||||
//- Sensible enthalpy [J/kg]
|
||||
//- Sensible internal energy [J/kg]
|
||||
scalar HE
|
||||
(
|
||||
const Thermo& thermo,
|
||||
|
||||
@ -413,14 +413,14 @@ inline Foam::scalar Foam::species::thermo<Thermo, Type>::THs
|
||||
template<class Thermo, template<class> class Type>
|
||||
inline Foam::scalar Foam::species::thermo<Thermo, Type>::THa
|
||||
(
|
||||
const scalar ht,
|
||||
const scalar ha,
|
||||
const scalar p,
|
||||
const scalar T0
|
||||
) const
|
||||
{
|
||||
return T
|
||||
(
|
||||
ht,
|
||||
ha,
|
||||
p,
|
||||
T0,
|
||||
&thermo<Thermo, Type>::Ha,
|
||||
@ -453,7 +453,7 @@ inline Foam::scalar Foam::species::thermo<Thermo, Type>::TEs
|
||||
template<class Thermo, template<class> class Type>
|
||||
inline Foam::scalar Foam::species::thermo<Thermo, Type>::TEa
|
||||
(
|
||||
const scalar e,
|
||||
const scalar ea,
|
||||
const scalar p,
|
||||
const scalar T0
|
||||
) const
|
||||
|
||||
@ -24,6 +24,7 @@ thermoType
|
||||
equationOfState perfectGas;
|
||||
specie specie;
|
||||
energy absoluteEnthalpy;
|
||||
//energy absoluteInternalEnergy;
|
||||
}
|
||||
|
||||
stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [ 0 0 0 0 0 0 0 ] 15.0336;
|
||||
|
||||
@ -31,6 +31,8 @@ divSchemes
|
||||
div(phi,U) Gauss upwind;
|
||||
div(phi,K) Gauss upwind;
|
||||
div(phid,p) Gauss upwind;
|
||||
div(meshPhi,p) Gauss upwind;
|
||||
div(phiv,p) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
div(phi,R) Gauss upwind;
|
||||
@ -45,6 +47,8 @@ divSchemes
|
||||
b limitedLinear01 1;
|
||||
ha limitedLinear 1;
|
||||
hau limitedLinear 1;
|
||||
ea limitedLinear 1;
|
||||
eau limitedLinear 1;
|
||||
};
|
||||
div(U) Gauss linear;
|
||||
div((Su*grad(b))) Gauss linear;
|
||||
@ -54,17 +58,7 @@ divSchemes
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default none;
|
||||
laplacian(muEff,U) Gauss linear corrected;
|
||||
laplacian(DkEff,k) Gauss linear limited 0.5;
|
||||
laplacian(DepsilonEff,epsilon) Gauss linear limited 0.5;
|
||||
laplacian(DREff,R) Gauss linear limited 0.5;
|
||||
laplacian((rho*(1|A(U))),p) Gauss linear limited 0.5;
|
||||
laplacian(alphaEff,b) Gauss linear limited 0.5;
|
||||
laplacian(muEff,ft) Gauss linear limited 0.5;
|
||||
laplacian(alphaEff,ha) Gauss linear limited 0.5;
|
||||
laplacian(alphaEff,hau) Gauss linear limited 0.5;
|
||||
laplacian(alphaEff,ft) Gauss linear limited 0.5;
|
||||
default Gauss linear limited 0.5;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
|
||||
@ -47,14 +47,14 @@ solvers
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"(U|Xi|hau|ft|b|ha|k|epsilon)"
|
||||
"(U|Xi|hau|eau|ft|b|ha|ea|k|epsilon)"
|
||||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-05;
|
||||
relTol 0.1;
|
||||
}
|
||||
"(U|ft|Xi|hau|b|ha|k|epsilon)Final"
|
||||
"(U|ft|Xi|hau|eau|b|ha|ea|k|epsilon)Final"
|
||||
{
|
||||
$U;
|
||||
tolerance 1e-05;
|
||||
|
||||
Reference in New Issue
Block a user