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:
@ -4,8 +4,8 @@
|
||||
p =
|
||||
(
|
||||
rho
|
||||
- (1.0 - gamma)*rhol0
|
||||
- ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat
|
||||
- gamma2*rhol0
|
||||
- ((gamma*psiv + gamma2*psil) - psi)*pSat
|
||||
)/psi;
|
||||
}
|
||||
|
||||
@ -57,8 +57,8 @@
|
||||
p =
|
||||
(
|
||||
rho
|
||||
- (1.0 - gamma)*rhol0
|
||||
- ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat
|
||||
- gamma2*rhol0
|
||||
- ((gamma*psiv + gamma2*psil) - psi)*pSat
|
||||
)/psi;
|
||||
|
||||
p.correctBoundaryConditions();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
volScalarField thermoRho = psi*p + (1.0 - gamma)*rhol0;
|
||||
volScalarField thermoRho = psi*p + gamma2*rhol0;
|
||||
|
||||
dimensionedScalar totalMass = fvc::domainIntegrate(rho);
|
||||
|
||||
|
||||
@ -49,6 +49,8 @@
|
||||
volScalarField& gamma(twoPhaseProperties.alpha1());
|
||||
gamma.oldTime();
|
||||
|
||||
volScalarField& gamma2(twoPhaseProperties.alpha2());
|
||||
|
||||
Info<< "Creating compressibilityModel\n" << endl;
|
||||
autoPtr<barotropicCompressibilityModel> psiModel =
|
||||
barotropicCompressibilityModel::New
|
||||
@ -62,8 +64,8 @@
|
||||
rho == max
|
||||
(
|
||||
psi*p
|
||||
+ (1.0 - gamma)*rhol0
|
||||
+ ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat,
|
||||
+ gamma2*rhol0
|
||||
+ ((gamma*psiv + gamma2*psil) - psi)*pSat,
|
||||
rhoMin
|
||||
);
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
{
|
||||
gamma = max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0));
|
||||
gamma2 = 1.0 - gamma;
|
||||
|
||||
Info<< "max-min gamma: " << max(gamma).value()
|
||||
<< " " << min(gamma).value() << endl;
|
||||
|
||||
@ -4,8 +4,8 @@
|
||||
p =
|
||||
(
|
||||
rho
|
||||
- (1.0 - gamma)*rhol0
|
||||
- ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat
|
||||
- gamma2*rhol0
|
||||
- ((gamma*psiv + gamma2*psil) - psi)*pSat
|
||||
)/psi;
|
||||
}
|
||||
|
||||
@ -49,8 +49,8 @@
|
||||
rho == max
|
||||
(
|
||||
psi*p
|
||||
+ (1.0 - gamma)*rhol0
|
||||
+ ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat,
|
||||
+ gamma2*rhol0
|
||||
+ ((gamma*psiv + gamma2*psil) - psi)*pSat,
|
||||
rhoMin
|
||||
);
|
||||
|
||||
@ -59,8 +59,8 @@
|
||||
p =
|
||||
(
|
||||
rho
|
||||
- (1.0 - gamma)*rhol0
|
||||
- ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat
|
||||
- gamma2*rhol0
|
||||
- ((gamma*psiv + gamma2*psil) - psi)*pSat
|
||||
)/psi;
|
||||
|
||||
p.correctBoundaryConditions();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
set -x
|
||||
|
||||
wclean libso phaseEquationsOfState
|
||||
wclean libso twoPhaseThermo
|
||||
wclean
|
||||
wclean compressibleInterDyMFoam
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
set -x
|
||||
|
||||
wmake libso phaseEquationsOfState
|
||||
wmake libso twoPhaseThermo
|
||||
wmake
|
||||
wmake compressibleInterDyMFoam
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C
|
||||
compressibleInterFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/compressibleInterFoam
|
||||
|
||||
@ -1,16 +1,19 @@
|
||||
EXE_INC = \
|
||||
-ItwoPhaseThermo \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
|
||||
-IphaseEquationsOfState/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-ltwoPhaseThermo \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-linterfaceProperties \
|
||||
-ltwoPhaseInterfaceProperties \
|
||||
-lincompressibleTransportModels \
|
||||
-lphaseEquationsOfState \
|
||||
-lincompressibleTurbulenceModel \
|
||||
-lincompressibleRASModels \
|
||||
-lincompressibleLESModels \
|
||||
|
||||
@ -1,20 +1,14 @@
|
||||
{
|
||||
volScalarField kByCv
|
||||
(
|
||||
"kByCv",
|
||||
(alpha1*k1/Cv1 + alpha2*k2/Cv2)
|
||||
+ (alpha1*rho1 + alpha2*rho2)*turbulence->nut()
|
||||
);
|
||||
|
||||
solve
|
||||
(
|
||||
fvm::ddt(rho, T)
|
||||
+ fvm::div(rhoPhi, T)
|
||||
- fvm::laplacian(kByCv, T)
|
||||
+ p*fvc::div(phi)*(alpha1/Cv1 + alpha2/Cv2)
|
||||
- fvm::laplacian(thermo.alphaEff(rho*turbulence->nut()), T)
|
||||
+ (
|
||||
p*fvc::div(phi)
|
||||
+ fvc::ddt(rho, K) + fvc::div(rhoPhi, K)
|
||||
)*(alpha1/thermo.thermo1().Cv() + alpha2/thermo.thermo2().Cv())
|
||||
);
|
||||
|
||||
// Update compressibilities
|
||||
psi1 = eos1->psi(p, T);
|
||||
psi2 = eos2->psi(p, T);
|
||||
thermo.correct();
|
||||
}
|
||||
|
||||
@ -22,4 +22,6 @@
|
||||
) * mesh.magSf()
|
||||
)
|
||||
);
|
||||
|
||||
K = 0.5*magSqr(U);
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
EXE_INC = \
|
||||
-I.. \
|
||||
-I../twoPhaseThermo \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
|
||||
@ -11,6 +13,9 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-ltwoPhaseThermo \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-linterfaceProperties \
|
||||
-ltwoPhaseInterfaceProperties \
|
||||
-lincompressibleTransportModels \
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -43,7 +43,7 @@ Description
|
||||
#include "subCycle.H"
|
||||
#include "interfaceProperties.H"
|
||||
#include "twoPhaseMixture.H"
|
||||
#include "phaseEquationOfState.H"
|
||||
#include "twoPhaseThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -38,9 +38,10 @@ Description
|
||||
#include "fvCFD.H"
|
||||
#include "MULES.H"
|
||||
#include "subCycle.H"
|
||||
#include "rhoThermo.H"
|
||||
#include "interfaceProperties.H"
|
||||
#include "twoPhaseMixture.H"
|
||||
#include "phaseEquationOfState.H"
|
||||
#include "twoPhaseThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
|
||||
@ -28,132 +28,37 @@
|
||||
|
||||
#include "createPhi.H"
|
||||
|
||||
Info<< "Reading field T\n" << endl;
|
||||
volScalarField T
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"T",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
volScalarField p
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"p",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
p_rgh
|
||||
);
|
||||
|
||||
|
||||
Info<< "Reading transportProperties\n" << endl;
|
||||
twoPhaseMixture twoPhaseProperties(U, phi);
|
||||
|
||||
volScalarField& alpha1(twoPhaseProperties.alpha1());
|
||||
volScalarField& alpha2(twoPhaseProperties.alpha2());
|
||||
|
||||
Info<< "Calculating phase-fraction alpha" << twoPhaseProperties.phase2Name()
|
||||
<< nl << endl;
|
||||
volScalarField alpha2
|
||||
(
|
||||
"alpha" + twoPhaseProperties.phase2Name(),
|
||||
scalar(1) - alpha1
|
||||
);
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
|
||||
dimensionedScalar k1
|
||||
(
|
||||
"k",
|
||||
dimensionSet(1, 1, -3, -1, 0),
|
||||
twoPhaseProperties.subDict
|
||||
(
|
||||
twoPhaseProperties.phase1Name()
|
||||
).lookup("k")
|
||||
);
|
||||
twoPhaseThermo thermo(twoPhaseProperties);
|
||||
|
||||
dimensionedScalar k2
|
||||
(
|
||||
"k",
|
||||
dimensionSet(1, 1, -3, -1, 0),
|
||||
twoPhaseProperties.subDict
|
||||
(
|
||||
twoPhaseProperties.phase2Name()
|
||||
).lookup("k")
|
||||
);
|
||||
volScalarField& rho = thermo.rho();
|
||||
volScalarField& p = thermo.p();
|
||||
volScalarField& T = thermo.T();
|
||||
const volScalarField& rho1 = thermo.thermo1().rho();
|
||||
const volScalarField& psi1 = thermo.thermo1().psi();
|
||||
const volScalarField& rho2 = thermo.thermo2().rho();
|
||||
const volScalarField& psi2 = thermo.thermo2().psi();
|
||||
|
||||
dimensionedScalar Cv1
|
||||
(
|
||||
"Cv",
|
||||
dimensionSet(0, 2, -2, -1, 0),
|
||||
twoPhaseProperties.subDict
|
||||
(
|
||||
twoPhaseProperties.phase1Name()
|
||||
).lookup("Cv")
|
||||
);
|
||||
// volScalarField rho
|
||||
// (
|
||||
// IOobject
|
||||
// (
|
||||
// "rho",
|
||||
// runTime.timeName(),
|
||||
// mesh,
|
||||
// IOobject::READ_IF_PRESENT,
|
||||
// IOobject::AUTO_WRITE
|
||||
// ),
|
||||
// alpha1*rho1 + alpha2*rho2
|
||||
// );
|
||||
|
||||
dimensionedScalar Cv2
|
||||
(
|
||||
"Cv",
|
||||
dimensionSet(0, 2, -2, -1, 0),
|
||||
twoPhaseProperties.subDict
|
||||
(
|
||||
twoPhaseProperties.phase2Name()
|
||||
).lookup("Cv")
|
||||
);
|
||||
|
||||
autoPtr<phaseEquationOfState> eos1
|
||||
(
|
||||
phaseEquationOfState::New
|
||||
(
|
||||
twoPhaseProperties.subDict
|
||||
(
|
||||
twoPhaseProperties.phase1Name()
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
autoPtr<phaseEquationOfState> eos2
|
||||
(
|
||||
phaseEquationOfState::New
|
||||
(
|
||||
twoPhaseProperties.subDict
|
||||
(
|
||||
twoPhaseProperties.phase2Name()
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField psi1
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"psi1",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
eos1->psi(p, T)
|
||||
);
|
||||
psi1.oldTime();
|
||||
|
||||
volScalarField psi2
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"psi2",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
eos2->psi(p, T)
|
||||
);
|
||||
psi2.oldTime();
|
||||
|
||||
dimensionedScalar pMin(twoPhaseProperties.lookup("pMin"));
|
||||
|
||||
@ -161,23 +66,6 @@
|
||||
volScalarField gh("gh", g & mesh.C());
|
||||
surfaceScalarField ghf("ghf", g & mesh.Cf());
|
||||
|
||||
volScalarField rho1("rho1", eos1->rho(p, T));
|
||||
volScalarField rho2("rho2", eos2->rho(p, T));
|
||||
|
||||
volScalarField rho
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rho",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
alpha1*rho1 + alpha2*rho2
|
||||
);
|
||||
|
||||
|
||||
// Mass flux
|
||||
// Initialisation does not matter because rhoPhi is reset after the
|
||||
// alpha1 solution before it is used in the U equation.
|
||||
@ -207,3 +95,19 @@
|
||||
(
|
||||
incompressible::turbulenceModel::New(U, phi, twoPhaseProperties)
|
||||
);
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dpdt",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
|
||||
);
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
|
||||
@ -1,184 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "wallHeatTransferFvPatchScalarField.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wallHeatTransferFvPatchScalarField::wallHeatTransferFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(p, iF),
|
||||
Tinf_(p.size(), 0.0),
|
||||
alphaWall_(p.size(), 0.0)
|
||||
{
|
||||
refValue() = 0.0;
|
||||
refGrad() = 0.0;
|
||||
valueFraction() = 0.0;
|
||||
}
|
||||
|
||||
|
||||
Foam::wallHeatTransferFvPatchScalarField::wallHeatTransferFvPatchScalarField
|
||||
(
|
||||
const wallHeatTransferFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(ptf, p, iF, mapper),
|
||||
Tinf_(ptf.Tinf_, mapper),
|
||||
alphaWall_(ptf.alphaWall_, mapper)
|
||||
{}
|
||||
|
||||
|
||||
Foam::wallHeatTransferFvPatchScalarField::wallHeatTransferFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(p, iF),
|
||||
Tinf_("Tinf", dict, p.size()),
|
||||
alphaWall_("alphaWall", dict, p.size())
|
||||
{
|
||||
refValue() = Tinf_;
|
||||
refGrad() = 0.0;
|
||||
valueFraction() = 0.0;
|
||||
|
||||
if (dict.found("value"))
|
||||
{
|
||||
fvPatchField<scalar>::operator=
|
||||
(
|
||||
scalarField("value", dict, p.size())
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
evaluate();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::wallHeatTransferFvPatchScalarField::wallHeatTransferFvPatchScalarField
|
||||
(
|
||||
const wallHeatTransferFvPatchScalarField& tppsf
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(tppsf),
|
||||
Tinf_(tppsf.Tinf_),
|
||||
alphaWall_(tppsf.alphaWall_)
|
||||
{}
|
||||
|
||||
|
||||
Foam::wallHeatTransferFvPatchScalarField::wallHeatTransferFvPatchScalarField
|
||||
(
|
||||
const wallHeatTransferFvPatchScalarField& tppsf,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(tppsf, iF),
|
||||
Tinf_(tppsf.Tinf_),
|
||||
alphaWall_(tppsf.alphaWall_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::wallHeatTransferFvPatchScalarField::autoMap
|
||||
(
|
||||
const fvPatchFieldMapper& m
|
||||
)
|
||||
{
|
||||
scalarField::autoMap(m);
|
||||
Tinf_.autoMap(m);
|
||||
alphaWall_.autoMap(m);
|
||||
}
|
||||
|
||||
|
||||
void Foam::wallHeatTransferFvPatchScalarField::rmap
|
||||
(
|
||||
const fvPatchScalarField& ptf,
|
||||
const labelList& addr
|
||||
)
|
||||
{
|
||||
mixedFvPatchScalarField::rmap(ptf, addr);
|
||||
|
||||
const wallHeatTransferFvPatchScalarField& tiptf =
|
||||
refCast<const wallHeatTransferFvPatchScalarField>(ptf);
|
||||
|
||||
Tinf_.rmap(tiptf.Tinf_, addr);
|
||||
alphaWall_.rmap(tiptf.alphaWall_, addr);
|
||||
}
|
||||
|
||||
|
||||
void Foam::wallHeatTransferFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
if (updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const fvPatchScalarField& Cpw =
|
||||
patch().lookupPatchField<volScalarField, scalar>("Cp");
|
||||
|
||||
const fvPatchScalarField& kByCpw =
|
||||
patch().lookupPatchField<volScalarField, scalar>("kByCp");
|
||||
|
||||
valueFraction() =
|
||||
1.0/
|
||||
(
|
||||
1.0
|
||||
+ Cpw*kByCpw*patch().deltaCoeffs()/alphaWall_
|
||||
);
|
||||
|
||||
mixedFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
void Foam::wallHeatTransferFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchScalarField::write(os);
|
||||
Tinf_.writeEntry("Tinf", os);
|
||||
alphaWall_.writeEntry("alphaWall", os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makePatchTypeField(fvPatchScalarField, wallHeatTransferFvPatchScalarField);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,194 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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::wallHeatTransferFvPatchScalarField
|
||||
|
||||
Description
|
||||
Enthalpy boundary conditions for wall heat transfer
|
||||
|
||||
SourceFiles
|
||||
wallHeatTransferFvPatchScalarField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef wallHeatTransferFvPatchScalarField_H
|
||||
#define wallHeatTransferFvPatchScalarField_H
|
||||
|
||||
#include "mixedFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class wallHeatTransferFvPatch Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class wallHeatTransferFvPatchScalarField
|
||||
:
|
||||
public mixedFvPatchScalarField
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Tinf
|
||||
scalarField Tinf_;
|
||||
|
||||
//- alphaWall
|
||||
scalarField alphaWall_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("wallHeatTransfer");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
wallHeatTransferFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
wallHeatTransferFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given wallHeatTransferFvPatchScalarField
|
||||
// onto a new patch
|
||||
wallHeatTransferFvPatchScalarField
|
||||
(
|
||||
const wallHeatTransferFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
wallHeatTransferFvPatchScalarField
|
||||
(
|
||||
const wallHeatTransferFvPatchScalarField&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<fvPatchScalarField> clone() const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new wallHeatTransferFvPatchScalarField(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
wallHeatTransferFvPatchScalarField
|
||||
(
|
||||
const wallHeatTransferFvPatchScalarField&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<fvPatchScalarField> clone
|
||||
(
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new wallHeatTransferFvPatchScalarField(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
// Access
|
||||
|
||||
//- Return Tinf
|
||||
const scalarField& Tinf() const
|
||||
{
|
||||
return Tinf_;
|
||||
}
|
||||
|
||||
//- Return reference to Tinf to allow adjustment
|
||||
scalarField& Tinf()
|
||||
{
|
||||
return Tinf_;
|
||||
}
|
||||
|
||||
//- Return alphaWall
|
||||
const scalarField& alphaWall() const
|
||||
{
|
||||
return alphaWall_;
|
||||
}
|
||||
|
||||
//- Return reference to alphaWall to allow adjustment
|
||||
scalarField& alphaWall()
|
||||
{
|
||||
return alphaWall_;
|
||||
}
|
||||
|
||||
|
||||
// Mapping functions
|
||||
|
||||
//- Map (and resize as needed) from self given a mapping object
|
||||
virtual void autoMap
|
||||
(
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
||||
virtual void rmap
|
||||
(
|
||||
const fvPatchScalarField&,
|
||||
const labelList&
|
||||
);
|
||||
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,7 +1,4 @@
|
||||
{
|
||||
rho1 = eos1->rho(p, T);
|
||||
rho2 = eos2->rho(p, T);
|
||||
|
||||
volScalarField rAU("rAU", 1.0/UEqn.A());
|
||||
surfaceScalarField rAUf("Dp", fvc::interpolate(rAU));
|
||||
|
||||
@ -91,9 +88,15 @@
|
||||
|
||||
p = max(p_rgh + (alpha1*rho1 + alpha2*rho2)*gh, pMin);
|
||||
|
||||
rho1 = eos1->rho(p, T);
|
||||
rho2 = eos2->rho(p, T);
|
||||
// thermo.correct();
|
||||
|
||||
Info<< "max(U) " << max(mag(U)).value() << endl;
|
||||
Info<< "min(p_rgh) " << min(p_rgh).value() << endl;
|
||||
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
if (thermo.dpdt())
|
||||
{
|
||||
dpdt = fvc::ddt(p);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
twoPhaseThermo.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libtwoPhaseThermo
|
||||
@ -0,0 +1,11 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
LIB_LIBS = \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lincompressibleTransportModels \
|
||||
-lfiniteVolume
|
||||
@ -0,0 +1,323 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 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/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "twoPhaseThermo.H"
|
||||
#include "gradientEnergyFvPatchScalarField.H"
|
||||
#include "mixedEnergyFvPatchScalarField.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(twoPhaseThermo, 0);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::twoPhaseThermo::twoPhaseThermo
|
||||
(
|
||||
const twoPhaseMixture& twoPhaseProperties
|
||||
)
|
||||
:
|
||||
rhoThermo(twoPhaseProperties.alpha1().mesh(), word::null),
|
||||
tpm_(twoPhaseProperties),
|
||||
thermo1_(rhoThermo::New(tpm_.alpha1().mesh(), tpm_.phase1Name())),
|
||||
thermo2_(rhoThermo::New(tpm_.alpha1().mesh(), tpm_.phase2Name()))
|
||||
{
|
||||
thermo1_->validate(tpm_.phase1Name(), "e");
|
||||
thermo2_->validate(tpm_.phase2Name(), "e");
|
||||
|
||||
rho_ = tpm_.alpha1()*thermo1_->rho() + tpm_.alpha2()*thermo2_->rho();
|
||||
|
||||
correct();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::twoPhaseThermo::~twoPhaseThermo()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::twoPhaseThermo::correct()
|
||||
{
|
||||
thermo1_->he() = thermo1_->he(p_, T_);
|
||||
thermo1_->correct();
|
||||
|
||||
thermo2_->he() = thermo2_->he(p_, T_);
|
||||
thermo2_->correct();
|
||||
|
||||
psi_ = tpm_.alpha1()*thermo1_->psi() + tpm_.alpha2()*thermo2_->psi();
|
||||
mu_ = tpm_.alpha1()*thermo1_->mu() + tpm_.alpha2()*thermo2_->mu();
|
||||
alpha_ = tpm_.alpha1()*thermo1_->alpha() + tpm_.alpha2()*thermo2_->alpha();
|
||||
}
|
||||
|
||||
|
||||
bool Foam::twoPhaseThermo::incompressible() const
|
||||
{
|
||||
return thermo1_->incompressible() && thermo2_->incompressible();
|
||||
}
|
||||
|
||||
|
||||
bool Foam::twoPhaseThermo::isochoric() const
|
||||
{
|
||||
return thermo1_->isochoric() && thermo2_->isochoric();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::twoPhaseThermo::he
|
||||
(
|
||||
const volScalarField& p,
|
||||
const volScalarField& T
|
||||
) const
|
||||
{
|
||||
return tpm_.alpha1()*thermo1_->he(p, T) + tpm_.alpha2()*thermo2_->he(p, T);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseThermo::he
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const labelList& cells
|
||||
) const
|
||||
{
|
||||
return
|
||||
scalarField(tpm_.alpha1(), cells)*thermo1_->he(p, T, cells)
|
||||
+ scalarField(tpm_.alpha2(), cells)*thermo2_->he(p, T, cells);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseThermo::he
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
return
|
||||
tpm_.alpha1().boundaryField()[patchi]*thermo1_->he(p, T, patchi)
|
||||
+ tpm_.alpha2().boundaryField()[patchi]*thermo2_->he(p, T, patchi);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::twoPhaseThermo::hc() const
|
||||
{
|
||||
return tpm_.alpha1()*thermo1_->hc() + tpm_.alpha2()*thermo2_->hc();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseThermo::THE
|
||||
(
|
||||
const scalarField& h,
|
||||
const scalarField& p,
|
||||
const scalarField& T0,
|
||||
const labelList& cells
|
||||
) const
|
||||
{
|
||||
notImplemented("twoPhaseThermo::THE(...)");
|
||||
return T0;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseThermo::THE
|
||||
(
|
||||
const scalarField& h,
|
||||
const scalarField& p,
|
||||
const scalarField& T0,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
notImplemented("twoPhaseThermo::THE(...)");
|
||||
return T0;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::twoPhaseThermo::Cp() const
|
||||
{
|
||||
return tpm_.alpha1()*thermo1_->Cp() + tpm_.alpha2()*thermo2_->Cp();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseThermo::Cp
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
return
|
||||
tpm_.alpha1().boundaryField()[patchi]*thermo1_->Cp(p, T, patchi)
|
||||
+ tpm_.alpha2().boundaryField()[patchi]*thermo2_->Cp(p, T, patchi);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::twoPhaseThermo::Cv() const
|
||||
{
|
||||
return tpm_.alpha1()*thermo1_->Cv() + tpm_.alpha2()*thermo2_->Cv();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseThermo::Cv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
return
|
||||
tpm_.alpha1().boundaryField()[patchi]*thermo1_->Cv(p, T, patchi)
|
||||
+ tpm_.alpha2().boundaryField()[patchi]*thermo2_->Cv(p, T, patchi);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::twoPhaseThermo::gamma() const
|
||||
{
|
||||
return tpm_.alpha1()*thermo1_->gamma() + tpm_.alpha2()*thermo2_->gamma();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseThermo::gamma
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
return
|
||||
tpm_.alpha1().boundaryField()[patchi]*thermo1_->gamma(p, T, patchi)
|
||||
+ tpm_.alpha2().boundaryField()[patchi]*thermo2_->gamma(p, T, patchi);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::twoPhaseThermo::Cpv() const
|
||||
{
|
||||
return tpm_.alpha1()*thermo1_->Cpv() + tpm_.alpha2()*thermo2_->Cpv();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseThermo::Cpv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
return
|
||||
tpm_.alpha1().boundaryField()[patchi]*thermo1_->Cpv(p, T, patchi)
|
||||
+ tpm_.alpha2().boundaryField()[patchi]*thermo2_->Cpv(p, T, patchi);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::twoPhaseThermo::CpByCpv() const
|
||||
{
|
||||
return
|
||||
tpm_.alpha1()*thermo1_->CpByCpv()
|
||||
+ tpm_.alpha2()*thermo2_->CpByCpv();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseThermo::CpByCpv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
return
|
||||
tpm_.alpha1().boundaryField()[patchi]*thermo1_->CpByCpv(p, T, patchi)
|
||||
+ tpm_.alpha2().boundaryField()[patchi]*thermo2_->CpByCpv(p, T, patchi);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::twoPhaseThermo::kappa() const
|
||||
{
|
||||
return tpm_.alpha1()*thermo1_->kappa() + tpm_.alpha2()*thermo2_->kappa();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseThermo::kappa
|
||||
(
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
return
|
||||
tpm_.alpha1().boundaryField()[patchi]*thermo1_->kappa(patchi)
|
||||
+ tpm_.alpha2().boundaryField()[patchi]*thermo2_->kappa(patchi);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::twoPhaseThermo::kappaEff
|
||||
(
|
||||
const volScalarField& alphat
|
||||
) const
|
||||
{
|
||||
return
|
||||
tpm_.alpha1()*thermo1_->kappaEff(alphat)
|
||||
+ tpm_.alpha2()*thermo2_->kappaEff(alphat);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseThermo::kappaEff
|
||||
(
|
||||
const scalarField& alphat,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
return
|
||||
tpm_.alpha1().boundaryField()[patchi]*thermo1_->kappaEff(alphat, patchi)
|
||||
+ tpm_.alpha2().boundaryField()[patchi]*thermo2_->kappaEff(alphat, patchi)
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::twoPhaseThermo::alphaEff
|
||||
(
|
||||
const volScalarField& alphat
|
||||
) const
|
||||
{
|
||||
return
|
||||
tpm_.alpha1()*thermo1_->alphaEff(alphat)
|
||||
+ tpm_.alpha2()*thermo2_->alphaEff(alphat);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseThermo::alphaEff
|
||||
(
|
||||
const scalarField& alphat,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
return
|
||||
tpm_.alpha1().boundaryField()[patchi]*thermo1_->alphaEff(alphat, patchi)
|
||||
+ tpm_.alpha2().boundaryField()[patchi]*thermo2_->alphaEff(alphat, patchi)
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,277 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 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::twoPhaseThermo
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
twoPhaseThermoI.H
|
||||
twoPhaseThermo.C
|
||||
twoPhaseThermoIO.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef twoPhaseThermo_H
|
||||
#define twoPhaseThermo_H
|
||||
|
||||
#include "rhoThermo.H"
|
||||
#include "twoPhaseMixture.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class twoPhaseThermo Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class twoPhaseThermo
|
||||
:
|
||||
public rhoThermo
|
||||
{
|
||||
// Private data
|
||||
|
||||
const twoPhaseMixture& tpm_;
|
||||
|
||||
//- Thermo-package of phase 1
|
||||
autoPtr<rhoThermo> thermo1_;
|
||||
|
||||
//- Thermo-package of phase 2
|
||||
autoPtr<rhoThermo> thermo2_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("twoPhaseThermo");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from mesh and phase fractions
|
||||
twoPhaseThermo
|
||||
(
|
||||
const twoPhaseMixture& twoPhaseProperties
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~twoPhaseThermo();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
const rhoThermo& thermo1() const
|
||||
{
|
||||
return thermo1_();
|
||||
}
|
||||
|
||||
const rhoThermo& thermo2() const
|
||||
{
|
||||
return thermo2_();
|
||||
}
|
||||
|
||||
//- Update properties
|
||||
virtual void correct();
|
||||
|
||||
//- Return true if the equation of state is incompressible
|
||||
// i.e. rho != f(p)
|
||||
virtual bool incompressible() const;
|
||||
|
||||
//- Return true if the equation of state is isochoric
|
||||
// i.e. rho = const
|
||||
virtual bool isochoric() const;
|
||||
|
||||
|
||||
// Access to thermodynamic state variables
|
||||
|
||||
//- Enthalpy/Internal energy [J/kg]
|
||||
// Non-const access allowed for transport equations
|
||||
virtual volScalarField& he()
|
||||
{
|
||||
notImplemented("twoPhaseThermo::he()");
|
||||
return thermo1_->he();
|
||||
}
|
||||
|
||||
//- Enthalpy/Internal energy [J/kg]
|
||||
virtual const volScalarField& he() const
|
||||
{
|
||||
notImplemented("twoPhaseThermo::he() const");
|
||||
return thermo1_->he();
|
||||
}
|
||||
|
||||
//- Enthalpy/Internal energy
|
||||
// for given pressure and temperature [J/kg]
|
||||
virtual tmp<volScalarField> he
|
||||
(
|
||||
const volScalarField& p,
|
||||
const volScalarField& T
|
||||
) const;
|
||||
|
||||
//- Enthalpy/Internal energy for cell-set [J/kg]
|
||||
virtual tmp<scalarField> he
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const labelList& cells
|
||||
) const;
|
||||
|
||||
//- Enthalpy/Internal energy for patch [J/kg]
|
||||
virtual tmp<scalarField> he
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
|
||||
//- Chemical enthalpy [J/kg]
|
||||
virtual tmp<volScalarField> hc() const;
|
||||
|
||||
//- Temperature from enthalpy/internal energy for cell-set
|
||||
virtual tmp<scalarField> THE
|
||||
(
|
||||
const scalarField& h,
|
||||
const scalarField& p,
|
||||
const scalarField& T0, // starting temperature
|
||||
const labelList& cells
|
||||
) const;
|
||||
|
||||
//- Temperature from enthalpy/internal energy for patch
|
||||
virtual tmp<scalarField> THE
|
||||
(
|
||||
const scalarField& h,
|
||||
const scalarField& p,
|
||||
const scalarField& T0, // starting temperature
|
||||
const label patchi
|
||||
) const;
|
||||
|
||||
|
||||
// Fields derived from thermodynamic state variables
|
||||
|
||||
//- Heat capacity at constant pressure [J/kg/K]
|
||||
virtual tmp<volScalarField> Cp() const;
|
||||
|
||||
//- Heat capacity at constant pressure for patch [J/kg/K]
|
||||
virtual tmp<scalarField> Cp
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
|
||||
//- Heat capacity at constant volume [J/kg/K]
|
||||
virtual tmp<volScalarField> Cv() const;
|
||||
|
||||
//- Heat capacity at constant volume for patch [J/kg/K]
|
||||
virtual tmp<scalarField> Cv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
|
||||
//- gamma = Cp/Cv []
|
||||
virtual tmp<volScalarField> gamma() const;
|
||||
|
||||
//- gamma = Cp/Cv for patch []
|
||||
virtual tmp<scalarField> gamma
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
|
||||
//- Heat capacity at constant pressure/volume [J/kg/K]
|
||||
virtual tmp<volScalarField> Cpv() const;
|
||||
|
||||
//- Heat capacity at constant pressure/volume for patch [J/kg/K]
|
||||
virtual tmp<scalarField> Cpv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
|
||||
//- Heat capacity ratio []
|
||||
virtual tmp<volScalarField> CpByCpv() const;
|
||||
|
||||
//- Heat capacity ratio for patch []
|
||||
virtual tmp<scalarField> CpByCpv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
|
||||
|
||||
// Fields derived from transport state variables
|
||||
|
||||
//- Thermal diffusivity for temperature of mixture [J/m/s/K]
|
||||
virtual tmp<volScalarField> kappa() const;
|
||||
|
||||
//- Thermal diffusivity of mixture for patch [J/m/s/K]
|
||||
virtual tmp<scalarField> kappa
|
||||
(
|
||||
const label patchi
|
||||
) const;
|
||||
|
||||
//- Effective thermal diffusivity of mixture [J/m/s/K]
|
||||
virtual tmp<volScalarField> kappaEff
|
||||
(
|
||||
const volScalarField& alphat
|
||||
) const;
|
||||
|
||||
//- Effective thermal diffusivity of mixture for patch [J/m/s/K]
|
||||
virtual tmp<scalarField> kappaEff
|
||||
(
|
||||
const scalarField& alphat,
|
||||
const label patchi
|
||||
) const;
|
||||
|
||||
//- Effective thermal diffusivity of mixture [J/m/s/K]
|
||||
virtual tmp<volScalarField> alphaEff
|
||||
(
|
||||
const volScalarField& alphat
|
||||
) const;
|
||||
|
||||
//- Effective thermal diffusivity of mixture for patch [J/m/s/K]
|
||||
virtual tmp<scalarField> alphaEff
|
||||
(
|
||||
const scalarField& alphat,
|
||||
const label patchi
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -18,7 +18,7 @@
|
||||
)
|
||||
+ fvc::flux
|
||||
(
|
||||
-fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
|
||||
-fvc::flux(-phir, alpha2, alpharScheme),
|
||||
alpha1,
|
||||
alpharScheme
|
||||
)
|
||||
@ -27,6 +27,7 @@
|
||||
MULES::explicitLTSSolve(alpha1, phi, phiAlpha, 1, 0);
|
||||
//MULES::explicitSolve(alpha1, phi, phiAlpha, 1, 0);
|
||||
|
||||
alpha2 = 1.0 - alpha1;
|
||||
rhoPhi = phiAlpha*(rho1 - rho2) + phi*rho2;
|
||||
}
|
||||
|
||||
|
||||
@ -23,4 +23,4 @@ else
|
||||
#include "alphaEqn.H"
|
||||
}
|
||||
|
||||
rho == alpha1*rho1 + (scalar(1) - alpha1)*rho2;
|
||||
rho == alpha1*rho1 + alpha2*rho2;
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
)
|
||||
+ fvc::flux
|
||||
(
|
||||
-fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
|
||||
-fvc::flux(-phir, alpha2, alpharScheme),
|
||||
alpha1,
|
||||
alpharScheme
|
||||
)
|
||||
@ -26,6 +26,7 @@
|
||||
|
||||
MULES::explicitSolve(alpha1, phi, phiAlpha, 1, 0);
|
||||
|
||||
alpha2 = 1.0 - alpha1;
|
||||
rhoPhi = phiAlpha*(rho1 - rho2) + phi*rho2;
|
||||
}
|
||||
|
||||
|
||||
@ -23,4 +23,4 @@ else
|
||||
#include "alphaEqn.H"
|
||||
}
|
||||
|
||||
rho == alpha1*rho1 + (scalar(1) - alpha1)*rho2;
|
||||
rho == alpha1*rho1 + alpha2*rho2;
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
twoPhaseMixture twoPhaseProperties(U, phi);
|
||||
|
||||
volScalarField& alpha1(twoPhaseProperties.alpha1());
|
||||
volScalarField& alpha2(twoPhaseProperties.alpha2());
|
||||
|
||||
const dimensionedScalar& rho1 = twoPhaseProperties.rho1();
|
||||
const dimensionedScalar& rho2 = twoPhaseProperties.rho2();
|
||||
@ -48,7 +49,7 @@
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT
|
||||
),
|
||||
alpha1*rho1 + (scalar(1) - alpha1)*rho2,
|
||||
alpha1*rho1 + alpha2*rho2,
|
||||
alpha1.boundaryField().types()
|
||||
);
|
||||
rho.oldTime();
|
||||
|
||||
@ -49,8 +49,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
#include "continuityErrs.H"
|
||||
|
||||
p == p_rgh + rho*gh;
|
||||
|
||||
if (p_rgh.needReference())
|
||||
|
||||
@ -12,7 +12,8 @@
|
||||
|
||||
alpha1Eqn.solve();
|
||||
|
||||
alpha2 = 1.0 - alpha1;
|
||||
rhoPhi += alpha1Eqn.flux()*(rho1 - rho2);
|
||||
}
|
||||
|
||||
rho = alpha1*rho1 + (scalar(1) - alpha1)*rho2;
|
||||
rho = alpha1*rho1 + alpha2*rho2;
|
||||
|
||||
@ -23,4 +23,4 @@ else
|
||||
#include "alphaEqn.H"
|
||||
}
|
||||
|
||||
rho == alpha1*rho1 + (scalar(1) - alpha1)*rho2;
|
||||
rho == alpha1*rho1 + alpha2*rho2;
|
||||
|
||||
@ -32,6 +32,7 @@
|
||||
twoPhaseMixture twoPhaseProperties(U, phi);
|
||||
|
||||
volScalarField& alpha1(twoPhaseProperties.alpha1());
|
||||
volScalarField& alpha2(twoPhaseProperties.alpha2());
|
||||
|
||||
const dimensionedScalar& rho1 = twoPhaseProperties.rho1();
|
||||
const dimensionedScalar& rho2 = twoPhaseProperties.rho2();
|
||||
@ -42,7 +43,7 @@
|
||||
dimensionedScalar alphatab(twoPhaseProperties.lookup("alphatab"));
|
||||
|
||||
// Need to store rho for ddt(rho, U)
|
||||
volScalarField rho("rho", alpha1*rho1 + (scalar(1) - alpha1)*rho2);
|
||||
volScalarField rho("rho", alpha1*rho1 + alpha2*rho2);
|
||||
rho.oldTime();
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -576,9 +576,6 @@ public:
|
||||
|
||||
// Geometric checks. Selectively override primitiveMesh functionality.
|
||||
|
||||
//- Check boundary for closedness
|
||||
virtual bool checkClosedBoundary(const bool report = false) const;
|
||||
|
||||
//- Check non-orthogonality
|
||||
virtual bool checkFaceOrthogonality
|
||||
(
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -516,15 +516,17 @@ bool Foam::polyMesh::checkCellDeterminant
|
||||
}
|
||||
|
||||
|
||||
bool Foam::polyMesh::checkClosedBoundary(const bool report) const
|
||||
{
|
||||
return primitiveMesh::checkClosedBoundary
|
||||
(
|
||||
faceAreas(),
|
||||
report,
|
||||
syncTools::getInternalOrCoupledFaces(*this)
|
||||
);
|
||||
}
|
||||
//- Could override checkClosedBoundary to not look at (collocated!) coupled
|
||||
// faces
|
||||
//bool Foam::polyMesh::checkClosedBoundary(const bool report) const
|
||||
//{
|
||||
// return primitiveMesh::checkClosedBoundary
|
||||
// (
|
||||
// faceAreas(),
|
||||
// report,
|
||||
// syncTools::getInternalOrCollocatedCoupledFaces(*this)
|
||||
// );
|
||||
//}
|
||||
|
||||
|
||||
bool Foam::polyMesh::checkFaceOrthogonality
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -64,7 +64,7 @@ bool Foam::primitiveMesh::checkClosedBoundary
|
||||
|
||||
for (label faceI = nInternalFaces(); faceI < areas.size(); faceI++)
|
||||
{
|
||||
if (internalOrCoupledFaces.size() && !internalOrCoupledFaces[faceI])
|
||||
if (!internalOrCoupledFaces.size() || !internalOrCoupledFaces[faceI])
|
||||
{
|
||||
sumClosed += areas[faceI];
|
||||
sumMagClosedBoundary += mag(areas[faceI]);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -105,13 +105,13 @@ kappa() const
|
||||
{
|
||||
case FLUID:
|
||||
{
|
||||
const compressible::turbulenceModel& model =
|
||||
const compressible::turbulenceModel& turbModel =
|
||||
this->db().lookupObject<compressible::turbulenceModel>
|
||||
(
|
||||
"turbulenceModel"
|
||||
);
|
||||
|
||||
return model.kappaEff(patch().index());
|
||||
return turbModel.kappaEff(patch().index());
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ set -x
|
||||
wclean $makeType regionModel
|
||||
wclean $makeType pyrolysisModels
|
||||
wclean $makeType surfaceFilmModels
|
||||
wclean $makeType thermoBaffleModels
|
||||
wclean $makeType thermalBaffleModels
|
||||
wclean $makeType regionCoupling
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ set -x
|
||||
wmake $makeType regionModel
|
||||
wmake $makeType pyrolysisModels
|
||||
wmake $makeType surfaceFilmModels
|
||||
wmake $makeType thermoBaffleModels
|
||||
wmake $makeType thermalBaffleModels
|
||||
wmake $makeType regionCoupling
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -54,7 +54,7 @@ makeDeltaCoeffs(scalarField& dc) const
|
||||
const modelType& region1D =
|
||||
patch().boundaryMesh().mesh().time().lookupObject<modelType>
|
||||
(
|
||||
"thermoBaffleProperties"
|
||||
"thermalBaffleProperties"
|
||||
);
|
||||
|
||||
dc = 2.0/(pp.thickness()/region1D.nLayers());
|
||||
|
||||
9
src/regionModels/thermalBaffleModels/Make/files
Normal file
9
src/regionModels/thermalBaffleModels/Make/files
Normal file
@ -0,0 +1,9 @@
|
||||
thermalBaffleModel/thermalBaffleModel.C
|
||||
thermalBaffleModel/thermalBaffleModelNew.C
|
||||
thermalBaffle/thermalBaffle.C
|
||||
noThermo/noThermo.C
|
||||
|
||||
derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C
|
||||
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libthermalBaffleModels
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,7 +23,7 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "thermoBaffleFvPatchScalarField.H"
|
||||
#include "thermalBaffleFvPatchScalarField.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -35,8 +35,8 @@ namespace compressible
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
thermoBaffleFvPatchScalarField::
|
||||
thermoBaffleFvPatchScalarField
|
||||
thermalBaffleFvPatchScalarField::
|
||||
thermalBaffleFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
@ -49,10 +49,10 @@ thermoBaffleFvPatchScalarField
|
||||
{}
|
||||
|
||||
|
||||
thermoBaffleFvPatchScalarField::
|
||||
thermoBaffleFvPatchScalarField
|
||||
thermalBaffleFvPatchScalarField::
|
||||
thermalBaffleFvPatchScalarField
|
||||
(
|
||||
const thermoBaffleFvPatchScalarField& ptf,
|
||||
const thermalBaffleFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
@ -71,8 +71,8 @@ thermoBaffleFvPatchScalarField
|
||||
{}
|
||||
|
||||
|
||||
thermoBaffleFvPatchScalarField::
|
||||
thermoBaffleFvPatchScalarField
|
||||
thermalBaffleFvPatchScalarField::
|
||||
thermalBaffleFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
@ -88,8 +88,8 @@ thermoBaffleFvPatchScalarField
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"thermoBaffleFvPatchScalarField::"
|
||||
"thermoBaffleFvPatchScalarField\n"
|
||||
"thermalBaffleFvPatchScalarField::"
|
||||
"thermalBaffleFvPatchScalarField\n"
|
||||
"(\n"
|
||||
" const fvPatch& p,\n"
|
||||
" const DimensionedField<scalar, volMesh>& iF,\n"
|
||||
@ -110,7 +110,7 @@ thermoBaffleFvPatchScalarField
|
||||
|
||||
const fvMesh& thisMesh = patch().boundaryMesh().mesh();
|
||||
|
||||
typedef regionModels::thermoBaffleModels::thermoBaffleModel baffle;
|
||||
typedef regionModels::thermalBaffleModels::thermalBaffleModel baffle;
|
||||
|
||||
if
|
||||
(
|
||||
@ -127,10 +127,10 @@ thermoBaffleFvPatchScalarField
|
||||
}
|
||||
|
||||
|
||||
thermoBaffleFvPatchScalarField::
|
||||
thermoBaffleFvPatchScalarField
|
||||
thermalBaffleFvPatchScalarField::
|
||||
thermalBaffleFvPatchScalarField
|
||||
(
|
||||
const thermoBaffleFvPatchScalarField& ptf,
|
||||
const thermalBaffleFvPatchScalarField& ptf,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
@ -144,7 +144,7 @@ thermoBaffleFvPatchScalarField
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
void thermoBaffleFvPatchScalarField::autoMap
|
||||
void thermalBaffleFvPatchScalarField::autoMap
|
||||
(
|
||||
const fvPatchFieldMapper& m
|
||||
)
|
||||
@ -153,7 +153,7 @@ void thermoBaffleFvPatchScalarField::autoMap
|
||||
}
|
||||
|
||||
|
||||
void thermoBaffleFvPatchScalarField::rmap
|
||||
void thermalBaffleFvPatchScalarField::rmap
|
||||
(
|
||||
const fvPatchScalarField& ptf,
|
||||
const labelList& addr
|
||||
@ -163,7 +163,7 @@ void thermoBaffleFvPatchScalarField::rmap
|
||||
}
|
||||
|
||||
|
||||
void thermoBaffleFvPatchScalarField::updateCoeffs()
|
||||
void thermalBaffleFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
if (this->updated())
|
||||
{
|
||||
@ -181,7 +181,7 @@ void thermoBaffleFvPatchScalarField::updateCoeffs()
|
||||
}
|
||||
|
||||
|
||||
void thermoBaffleFvPatchScalarField::write(Ostream& os) const
|
||||
void thermalBaffleFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::write(os);
|
||||
|
||||
@ -189,9 +189,9 @@ void thermoBaffleFvPatchScalarField::write(Ostream& os) const
|
||||
|
||||
if (thisMesh.name() == polyMesh::defaultRegion && owner_)
|
||||
{
|
||||
word thermoModel = dict_.lookup("thermoBaffleModel");
|
||||
word thermoModel = dict_.lookup("thermalBaffleModel");
|
||||
|
||||
os.writeKeyword("thermoBaffleModel")
|
||||
os.writeKeyword("thermalBaffleModel")
|
||||
<< thermoModel
|
||||
<< token::END_STATEMENT << nl;
|
||||
|
||||
@ -227,7 +227,7 @@ void thermoBaffleFvPatchScalarField::write(Ostream& os) const
|
||||
makePatchTypeField
|
||||
(
|
||||
fvPatchScalarField,
|
||||
thermoBaffleFvPatchScalarField
|
||||
thermalBaffleFvPatchScalarField
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::thermoBaffleFvPatchScalarField
|
||||
Foam::thermalBaffleFvPatchScalarField
|
||||
|
||||
Group
|
||||
grpThermoBoundaryConditions
|
||||
@ -56,11 +56,11 @@ Description
|
||||
|
||||
|
||||
// Thermo baffle model
|
||||
thermoBaffleModel thermoBaffle;
|
||||
thermalBaffleModel thermalBaffle;
|
||||
regionName baffleRegion;
|
||||
infoOutput yes;
|
||||
active yes;
|
||||
thermoBaffleCoeffs
|
||||
thermalBaffleCoeffs
|
||||
{
|
||||
}
|
||||
|
||||
@ -112,20 +112,20 @@ Description
|
||||
|
||||
SeeAlso
|
||||
Foam::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
|
||||
Foam::regionModels::thermoBaffleModels::thermoBaffleModel
|
||||
Foam::regionModels::thermalBaffleModels::thermalBaffleModel
|
||||
|
||||
SourceFiles
|
||||
thermoBaffleFvPatchScalarField.C
|
||||
thermalBaffleFvPatchScalarField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef thermoBaffleFvPatchScalarField_H
|
||||
#define thermoBaffleFvPatchScalarField_H
|
||||
#ifndef thermalBaffleFvPatchScalarField_H
|
||||
#define thermalBaffleFvPatchScalarField_H
|
||||
|
||||
|
||||
#include "autoPtr.H"
|
||||
#include "regionModel.H"
|
||||
#include "thermoBaffleModel.H"
|
||||
#include "thermalBaffleModel.H"
|
||||
#include "turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -137,10 +137,10 @@ namespace compressible
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class thermoBaffleFvPatchScalarField Declaration
|
||||
Class thermalBaffleFvPatchScalarField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class thermoBaffleFvPatchScalarField
|
||||
class thermalBaffleFvPatchScalarField
|
||||
:
|
||||
public turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
|
||||
{
|
||||
@ -150,7 +150,7 @@ class thermoBaffleFvPatchScalarField
|
||||
bool owner_;
|
||||
|
||||
//- Thermal baffle
|
||||
autoPtr<regionModels::thermoBaffleModels::thermoBaffleModel> baffle_;
|
||||
autoPtr<regionModels::thermalBaffleModels::thermalBaffleModel> baffle_;
|
||||
|
||||
//- Dictionary
|
||||
dictionary dict_;
|
||||
@ -159,20 +159,20 @@ class thermoBaffleFvPatchScalarField
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("compressible::thermoBaffle");
|
||||
TypeName("compressible::thermalBaffle");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
thermoBaffleFvPatchScalarField
|
||||
thermalBaffleFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
thermoBaffleFvPatchScalarField
|
||||
thermalBaffleFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
@ -180,10 +180,10 @@ public:
|
||||
);
|
||||
|
||||
//- Construct by mapping given
|
||||
// thermoBaffleFvPatchScalarField onto a new patch
|
||||
thermoBaffleFvPatchScalarField
|
||||
// thermalBaffleFvPatchScalarField onto a new patch
|
||||
thermalBaffleFvPatchScalarField
|
||||
(
|
||||
const thermoBaffleFvPatchScalarField&,
|
||||
const thermalBaffleFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
@ -195,14 +195,14 @@ public:
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new thermoBaffleFvPatchScalarField(*this)
|
||||
new thermalBaffleFvPatchScalarField(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
thermoBaffleFvPatchScalarField
|
||||
thermalBaffleFvPatchScalarField
|
||||
(
|
||||
const thermoBaffleFvPatchScalarField&,
|
||||
const thermalBaffleFvPatchScalarField&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
@ -214,7 +214,7 @@ public:
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new thermoBaffleFvPatchScalarField(*this, iF)
|
||||
new thermalBaffleFvPatchScalarField(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -33,15 +33,15 @@ namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace thermoBaffleModels
|
||||
namespace thermalBaffleModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(noThermo, 0);
|
||||
|
||||
addToRunTimeSelectionTable(thermoBaffleModel, noThermo, mesh);
|
||||
addToRunTimeSelectionTable(thermoBaffleModel, noThermo, dictionary);
|
||||
addToRunTimeSelectionTable(thermalBaffleModel, noThermo, mesh);
|
||||
addToRunTimeSelectionTable(thermalBaffleModel, noThermo, dictionary);
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
@ -55,7 +55,7 @@ bool noThermo::read()
|
||||
|
||||
noThermo::noThermo(const word& modelType, const fvMesh& mesh)
|
||||
:
|
||||
thermoBaffleModel(mesh)
|
||||
thermalBaffleModel(mesh)
|
||||
{}
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ noThermo::noThermo
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
thermoBaffleModel(modelType, mesh, dict)
|
||||
thermalBaffleModel(modelType, mesh, dict)
|
||||
{}
|
||||
|
||||
|
||||
@ -157,7 +157,7 @@ const solidThermo& noThermo::thermo() const
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace thermoBaffleModels
|
||||
} // End namespace thermalBaffleModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -35,7 +35,7 @@ SourceFiles
|
||||
#ifndef noThermo_H
|
||||
#define noThermo_H
|
||||
|
||||
#include "thermoBaffleModel.H"
|
||||
#include "thermalBaffleModel.H"
|
||||
#include "volFieldsFwd.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -44,7 +44,7 @@ namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace thermoBaffleModels
|
||||
namespace thermalBaffleModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
@ -53,7 +53,7 @@ namespace thermoBaffleModels
|
||||
|
||||
class noThermo
|
||||
:
|
||||
public thermoBaffleModel
|
||||
public thermalBaffleModel
|
||||
{
|
||||
private:
|
||||
|
||||
@ -139,7 +139,7 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace thermoBaffleModels
|
||||
} // End namespace thermalBaffleModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,7 +24,7 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "thermoBaffle.H"
|
||||
#include "thermalBaffle.H"
|
||||
|
||||
#include "fvm.H"
|
||||
#include "fvcDiv.H"
|
||||
@ -39,37 +39,37 @@ namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace thermoBaffleModels
|
||||
namespace thermalBaffleModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(thermoBaffle, 0);
|
||||
defineTypeNameAndDebug(thermalBaffle, 0);
|
||||
|
||||
addToRunTimeSelectionTable(thermoBaffleModel, thermoBaffle, mesh);
|
||||
addToRunTimeSelectionTable(thermoBaffleModel, thermoBaffle, dictionary);
|
||||
addToRunTimeSelectionTable(thermalBaffleModel, thermalBaffle, mesh);
|
||||
addToRunTimeSelectionTable(thermalBaffleModel, thermalBaffle, dictionary);
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
bool thermoBaffle::read()
|
||||
bool thermalBaffle::read()
|
||||
{
|
||||
this->solution().lookup("nNonOrthCorr") >> nNonOrthCorr_;
|
||||
return regionModel1D::read();
|
||||
}
|
||||
|
||||
|
||||
bool thermoBaffle::read(const dictionary& dict)
|
||||
bool thermalBaffle::read(const dictionary& dict)
|
||||
{
|
||||
this->solution().lookup("nNonOrthCorr") >> nNonOrthCorr_;
|
||||
return regionModel1D::read(dict);
|
||||
}
|
||||
|
||||
|
||||
void thermoBaffle::solveEnergy()
|
||||
void thermalBaffle::solveEnergy()
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "thermoBaffle::solveEnergy()" << endl;
|
||||
Info<< "thermalBaffle::solveEnergy()" << endl;
|
||||
}
|
||||
|
||||
const polyBoundaryMesh& rbm = regionMesh().boundaryMesh();
|
||||
@ -157,14 +157,14 @@ void thermoBaffle::solveEnergy()
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
thermoBaffle::thermoBaffle
|
||||
thermalBaffle::thermalBaffle
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
thermoBaffleModel(modelType, mesh, dict),
|
||||
thermalBaffleModel(modelType, mesh, dict),
|
||||
nNonOrthCorr_(readLabel(solution().lookup("nNonOrthCorr"))),
|
||||
thermo_(solidThermo::New(regionMesh(), dict)),
|
||||
h_(thermo_->he()),
|
||||
@ -218,13 +218,13 @@ thermoBaffle::thermoBaffle
|
||||
}
|
||||
|
||||
|
||||
thermoBaffle::thermoBaffle
|
||||
thermalBaffle::thermalBaffle
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
thermoBaffleModel(modelType, mesh),
|
||||
thermalBaffleModel(modelType, mesh),
|
||||
nNonOrthCorr_(readLabel(solution().lookup("nNonOrthCorr"))),
|
||||
thermo_(solidThermo::New(regionMesh())),
|
||||
h_(thermo_->he()),
|
||||
@ -279,13 +279,13 @@ thermoBaffle::thermoBaffle
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoBaffle::~thermoBaffle()
|
||||
thermalBaffle::~thermalBaffle()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void thermoBaffle::init()
|
||||
void thermalBaffle::init()
|
||||
{
|
||||
if (oneD_ && !constantThickness_)
|
||||
{
|
||||
@ -294,7 +294,7 @@ void thermoBaffle::init()
|
||||
|
||||
if (Qsb!= thickness_.size())
|
||||
{
|
||||
FatalErrorIn("thermoBaffle::init()")
|
||||
FatalErrorIn("thermalBaffle::init()")
|
||||
<< "the boundary field of Qs is "
|
||||
<< Qsb << " and " << nl
|
||||
<< "the field 'thickness' is " << thickness_.size() << nl
|
||||
@ -304,11 +304,11 @@ void thermoBaffle::init()
|
||||
}
|
||||
|
||||
|
||||
void thermoBaffle::preEvolveRegion()
|
||||
void thermalBaffle::preEvolveRegion()
|
||||
{}
|
||||
|
||||
|
||||
void thermoBaffle::evolveRegion()
|
||||
void thermalBaffle::evolveRegion()
|
||||
{
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr_; nonOrth++)
|
||||
{
|
||||
@ -317,43 +317,43 @@ void thermoBaffle::evolveRegion()
|
||||
}
|
||||
|
||||
|
||||
const tmp<volScalarField> thermoBaffle::Cp() const
|
||||
const tmp<volScalarField> thermalBaffle::Cp() const
|
||||
{
|
||||
return thermo_->Cp();
|
||||
}
|
||||
|
||||
|
||||
const volScalarField& thermoBaffle::kappaRad() const
|
||||
const volScalarField& thermalBaffle::kappaRad() const
|
||||
{
|
||||
return radiation_->absorptionEmission().a();
|
||||
}
|
||||
|
||||
|
||||
const volScalarField& thermoBaffle::rho() const
|
||||
const volScalarField& thermalBaffle::rho() const
|
||||
{
|
||||
return thermo_->rho();
|
||||
}
|
||||
|
||||
|
||||
const volScalarField& thermoBaffle::kappa() const
|
||||
const volScalarField& thermalBaffle::kappa() const
|
||||
{
|
||||
return thermo_->kappa();
|
||||
}
|
||||
|
||||
|
||||
const volScalarField& thermoBaffle::T() const
|
||||
const volScalarField& thermalBaffle::T() const
|
||||
{
|
||||
return thermo_->T();
|
||||
}
|
||||
|
||||
|
||||
const solidThermo& thermoBaffle::thermo() const
|
||||
const solidThermo& thermalBaffle::thermo() const
|
||||
{
|
||||
return thermo_;
|
||||
}
|
||||
|
||||
|
||||
void thermoBaffle::info() const
|
||||
void thermalBaffle::info() const
|
||||
{
|
||||
const labelList& coupledPatches = intCoupledPatchIDs();
|
||||
|
||||
@ -375,7 +375,7 @@ void thermoBaffle::info() const
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // end namespace thermoBaffleModels
|
||||
} // end namespace thermalBaffleModels
|
||||
} // end namespace regionModels
|
||||
} // end namespace Foam
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -22,21 +22,21 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::thermoBaffle
|
||||
Foam::thermalBaffle
|
||||
|
||||
Description
|
||||
2D thermal baffle
|
||||
|
||||
SourceFiles
|
||||
thermoBaffle.C
|
||||
thermoBaffleI.H
|
||||
thermalBaffle.C
|
||||
thermalBaffleI.H
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef thermoBaffle_H
|
||||
#define thermoBaffle_H
|
||||
#ifndef thermalBaffle_H
|
||||
#define thermalBaffle_H
|
||||
|
||||
#include "thermoBaffleModel.H"
|
||||
#include "thermalBaffleModel.H"
|
||||
#include "volFieldsFwd.H"
|
||||
|
||||
|
||||
@ -46,29 +46,29 @@ namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace thermoBaffleModels
|
||||
namespace thermalBaffleModels
|
||||
{
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class thermoBaffle Declaration
|
||||
Class thermalBaffle Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class thermoBaffle
|
||||
class thermalBaffle
|
||||
:
|
||||
public thermoBaffleModel
|
||||
public thermalBaffleModel
|
||||
{
|
||||
private:
|
||||
|
||||
// Private member functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
thermoBaffle(const thermoBaffle&);
|
||||
thermalBaffle(const thermalBaffle&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const thermoBaffle&);
|
||||
void operator=(const thermalBaffle&);
|
||||
|
||||
//- Initialize thermoBaffle
|
||||
//- Initialize thermalBaffle
|
||||
void init();
|
||||
|
||||
|
||||
@ -124,16 +124,16 @@ protected:
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("thermoBaffle");
|
||||
TypeName("thermalBaffle");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
thermoBaffle(const word& modelType, const fvMesh& mesh);
|
||||
thermalBaffle(const word& modelType, const fvMesh& mesh);
|
||||
|
||||
//- Construct from components and dict
|
||||
thermoBaffle
|
||||
thermalBaffle
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
@ -142,7 +142,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~thermoBaffle();
|
||||
virtual ~thermalBaffle();
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -205,13 +205,13 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace thermoBaffleModels
|
||||
} // End namespace thermalBaffleModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "thermoBaffleI.H"
|
||||
#include "thermalBaffleI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,7 +24,7 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "thermoBaffle.H"
|
||||
#include "thermalBaffle.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -33,12 +33,12 @@ namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace thermoBaffleModels
|
||||
namespace thermalBaffleModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
inline tmp<scalarField> thermoBaffle::he
|
||||
inline tmp<scalarField> thermalBaffle::he
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
@ -49,7 +49,7 @@ inline tmp<scalarField> thermoBaffle::he
|
||||
}
|
||||
|
||||
|
||||
inline tmp<volScalarField> thermoBaffle::he() const
|
||||
inline tmp<volScalarField> thermalBaffle::he() const
|
||||
{
|
||||
return thermo_->he();
|
||||
}
|
||||
@ -57,7 +57,7 @@ inline tmp<volScalarField> thermoBaffle::he() const
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace thermoBaffleModels
|
||||
} // End namespace thermalBaffleModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,7 +23,7 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "thermoBaffleModel.H"
|
||||
#include "thermalBaffleModel.H"
|
||||
#include "fvMesh.H"
|
||||
#include "mappedVariableThicknessWallPolyPatch.H"
|
||||
#include "wedgePolyPatch.H"
|
||||
@ -34,33 +34,33 @@ namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace thermoBaffleModels
|
||||
namespace thermalBaffleModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(thermoBaffleModel, 0);
|
||||
defineRunTimeSelectionTable(thermoBaffleModel, mesh);
|
||||
defineRunTimeSelectionTable(thermoBaffleModel, dictionary);
|
||||
defineTypeNameAndDebug(thermalBaffleModel, 0);
|
||||
defineRunTimeSelectionTable(thermalBaffleModel, mesh);
|
||||
defineRunTimeSelectionTable(thermalBaffleModel, dictionary);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
bool thermoBaffleModel::read()
|
||||
bool thermalBaffleModel::read()
|
||||
{
|
||||
regionModel1D::read();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool thermoBaffleModel::read(const dictionary& dict)
|
||||
bool thermalBaffleModel::read(const dictionary& dict)
|
||||
{
|
||||
regionModel1D::read(dict);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void thermoBaffleModel::init()
|
||||
void thermalBaffleModel::init()
|
||||
{
|
||||
if (active_)
|
||||
{
|
||||
@ -116,7 +116,7 @@ void thermoBaffleModel::init()
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"thermoBaffleModel::thermoBaffleModel"
|
||||
"thermalBaffleModel::thermalBaffleModel"
|
||||
"("
|
||||
" const word&,"
|
||||
" const fvMesh&"
|
||||
@ -133,7 +133,7 @@ void thermoBaffleModel::init()
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"thermoBaffleModel::thermoBaffleModel"
|
||||
"thermalBaffleModel::thermalBaffleModel"
|
||||
"("
|
||||
" const word&,"
|
||||
" const fvMesh&"
|
||||
@ -164,12 +164,12 @@ void thermoBaffleModel::init()
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"thermoBaffleModel::thermoBaffleModel"
|
||||
"thermalBaffleModel::thermalBaffleModel"
|
||||
"("
|
||||
" const word&,"
|
||||
" const fvMesh&"
|
||||
")"
|
||||
) << " coupled patches in thermoBaffle are " << nl
|
||||
) << " coupled patches in thermalBaffle are " << nl
|
||||
<< " different sizes from list thickness" << nl
|
||||
<< exit(FatalError);
|
||||
}
|
||||
@ -199,7 +199,7 @@ void thermoBaffleModel::init()
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
thermoBaffleModel::thermoBaffleModel(const fvMesh& mesh)
|
||||
thermalBaffleModel::thermalBaffleModel(const fvMesh& mesh)
|
||||
:
|
||||
regionModel1D(mesh),
|
||||
thickness_(),
|
||||
@ -209,7 +209,7 @@ thermoBaffleModel::thermoBaffleModel(const fvMesh& mesh)
|
||||
{}
|
||||
|
||||
|
||||
thermoBaffleModel::thermoBaffleModel
|
||||
thermalBaffleModel::thermalBaffleModel
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
@ -217,7 +217,7 @@ thermoBaffleModel::thermoBaffleModel
|
||||
|
||||
)
|
||||
:
|
||||
regionModel1D(mesh, "thermoBaffle", modelType, dict, true),
|
||||
regionModel1D(mesh, "thermalBaffle", modelType, dict, true),
|
||||
thickness_(),
|
||||
delta_("delta", dimLength, 0.0),
|
||||
oneD_(false),
|
||||
@ -227,9 +227,13 @@ thermoBaffleModel::thermoBaffleModel
|
||||
}
|
||||
|
||||
|
||||
thermoBaffleModel::thermoBaffleModel(const word& modelType, const fvMesh& mesh)
|
||||
thermalBaffleModel::thermalBaffleModel
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
regionModel1D(mesh, "thermoBaffle", modelType),
|
||||
regionModel1D(mesh, "thermalBaffle", modelType),
|
||||
thickness_(),
|
||||
delta_("delta", dimLength, 0.0),
|
||||
oneD_(false),
|
||||
@ -241,19 +245,19 @@ thermoBaffleModel::thermoBaffleModel(const word& modelType, const fvMesh& mesh)
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoBaffleModel::~thermoBaffleModel()
|
||||
thermalBaffleModel::~thermalBaffleModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void thermoBaffleModel::preEvolveRegion()
|
||||
void thermalBaffleModel::preEvolveRegion()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace thermoBaffleModels
|
||||
} // End namespace thermalBaffleModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -22,17 +22,17 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::thermoBaffleModel
|
||||
Foam::thermalBaffleModel
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
thermoBaffleModel.C
|
||||
thermalBaffleModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef thermoBaffleModel_H
|
||||
#define thermoBaffleModel_H
|
||||
#ifndef thermalBaffleModel_H
|
||||
#define thermalBaffleModel_H
|
||||
|
||||
#include "runTimeSelectionTables.H"
|
||||
#include "scalarIOField.H"
|
||||
@ -49,14 +49,14 @@ namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace thermoBaffleModels
|
||||
namespace thermalBaffleModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class thermoBaffleModel Declaration
|
||||
Class thermalBaffleModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class thermoBaffleModel
|
||||
class thermalBaffleModel
|
||||
:
|
||||
public regionModel1D
|
||||
{
|
||||
@ -65,10 +65,10 @@ private:
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
thermoBaffleModel(const thermoBaffleModel&);
|
||||
thermalBaffleModel(const thermalBaffleModel&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const thermoBaffleModel&);
|
||||
void operator=(const thermalBaffleModel&);
|
||||
|
||||
//- Initialize thermal Baffle
|
||||
void init();
|
||||
@ -103,7 +103,7 @@ protected:
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("thermoBaffleModel");
|
||||
TypeName("thermalBaffleModel");
|
||||
|
||||
|
||||
// Declare runtime constructor selection tables
|
||||
@ -111,7 +111,7 @@ public:
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
thermoBaffleModel,
|
||||
thermalBaffleModel,
|
||||
mesh,
|
||||
(
|
||||
const word& modelType,
|
||||
@ -123,7 +123,7 @@ public:
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
thermoBaffleModel,
|
||||
thermalBaffleModel,
|
||||
dictionary,
|
||||
(
|
||||
const word& modelType,
|
||||
@ -137,13 +137,13 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct null from mesh
|
||||
thermoBaffleModel(const fvMesh& mesh);
|
||||
thermalBaffleModel(const fvMesh& mesh);
|
||||
|
||||
//- Construct from type name and mesh
|
||||
thermoBaffleModel(const word& modelType, const fvMesh& mesh);
|
||||
thermalBaffleModel(const word& modelType, const fvMesh& mesh);
|
||||
|
||||
//- Construct from type name and mesh and dict
|
||||
thermoBaffleModel
|
||||
thermalBaffleModel
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
@ -154,10 +154,10 @@ public:
|
||||
// Selectors
|
||||
|
||||
//- Return a reference to the selected model
|
||||
static autoPtr<thermoBaffleModel> New(const fvMesh& mesh);
|
||||
static autoPtr<thermalBaffleModel> New(const fvMesh& mesh);
|
||||
|
||||
//- Return a reference to the selected model using dictionary
|
||||
static autoPtr<thermoBaffleModel> New
|
||||
static autoPtr<thermalBaffleModel> New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
@ -165,7 +165,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~thermoBaffleModel();
|
||||
virtual ~thermalBaffleModel();
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -227,7 +227,7 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace thermoBaffleModels
|
||||
} // End namespace thermalBaffleModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
@ -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-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,7 +23,7 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "thermoBaffleModel.H"
|
||||
#include "thermalBaffleModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -31,20 +31,20 @@ namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace thermoBaffleModels
|
||||
namespace thermalBaffleModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||
|
||||
autoPtr<thermoBaffleModel> thermoBaffleModel::New(const fvMesh& mesh)
|
||||
autoPtr<thermalBaffleModel> thermalBaffleModel::New(const fvMesh& mesh)
|
||||
{
|
||||
word modelType;
|
||||
{
|
||||
IOdictionary thermoBafflePropertiesDict
|
||||
IOdictionary thermalBafflePropertiesDict
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"thermoBaffleProperties",
|
||||
"thermalBaffleProperties",
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
@ -53,7 +53,7 @@ autoPtr<thermoBaffleModel> thermoBaffleModel::New(const fvMesh& mesh)
|
||||
)
|
||||
);
|
||||
|
||||
thermoBafflePropertiesDict.lookup("thermoBaffleModel") >> modelType;
|
||||
thermalBafflePropertiesDict.lookup("thermalBaffleModel") >> modelType;
|
||||
}
|
||||
|
||||
Info<< "Selecting baffle model " << modelType << endl;
|
||||
@ -64,25 +64,25 @@ autoPtr<thermoBaffleModel> thermoBaffleModel::New(const fvMesh& mesh)
|
||||
if (cstrIter == meshConstructorTablePtr_->end())
|
||||
{
|
||||
|
||||
FatalErrorIn("thermoBaffleModel::New(const fvMesh&)")
|
||||
<< "Unknown thermoBaffleModel type " << modelType
|
||||
FatalErrorIn("thermalBaffleModel::New(const fvMesh&)")
|
||||
<< "Unknown thermalBaffleModel type " << modelType
|
||||
<< nl << nl
|
||||
<< "Valid thermoBaffleModel types are:" << nl
|
||||
<< "Valid thermalBaffleModel types are:" << nl
|
||||
<< meshConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<thermoBaffleModel>(cstrIter()(modelType, mesh));
|
||||
return autoPtr<thermalBaffleModel>(cstrIter()(modelType, mesh));
|
||||
}
|
||||
|
||||
|
||||
autoPtr<thermoBaffleModel> thermoBaffleModel::New
|
||||
autoPtr<thermalBaffleModel> thermalBaffleModel::New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word modelType = dict.lookup("thermoBaffleModel");
|
||||
word modelType = dict.lookup("thermalBaffleModel");
|
||||
|
||||
Info<< "Selecting baffle model " << modelType << endl;
|
||||
|
||||
@ -92,21 +92,23 @@ autoPtr<thermoBaffleModel> thermoBaffleModel::New
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
|
||||
FatalErrorIn("thermoBaffleModel::New(const fvMesh&, const dictionary&)")
|
||||
<< "Unknown thermoBaffleModel type " << modelType
|
||||
FatalErrorIn
|
||||
(
|
||||
"thermalBaffleModel::New(const fvMesh&, const dictionary&)"
|
||||
) << "Unknown thermalBaffleModel type " << modelType
|
||||
<< nl << nl
|
||||
<< "Valid thermoBaffleModel types are:" << nl
|
||||
<< "Valid thermalBaffleModel types are:" << nl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<thermoBaffleModel>(cstrIter()(modelType, mesh, dict));
|
||||
return autoPtr<thermalBaffleModel>(cstrIter()(modelType, mesh, dict));
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace thermoBaffleModels
|
||||
} // End namespace thermalBaffleModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
@ -1,9 +0,0 @@
|
||||
thermoBaffleModel/thermoBaffleModel.C
|
||||
thermoBaffleModel/thermoBaffleModelNew.C
|
||||
thermoBaffle/thermoBaffle.C
|
||||
noThermo/noThermo.C
|
||||
|
||||
derivedFvPatchFields/thermoBaffle/thermoBaffleFvPatchScalarField.C
|
||||
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libthermoBaffleModels
|
||||
@ -14,6 +14,4 @@ derivedFvPatchFields/mixedEnergy/mixedEnergyFvPatchScalarField.C
|
||||
derivedFvPatchFields/energyJump/energyJump/energyJumpFvPatchScalarField.C
|
||||
derivedFvPatchFields/energyJump/energyJumpAMI/energyJumpAMIFvPatchScalarField.C
|
||||
|
||||
derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libfluidThermophysicalModels
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,6 +24,14 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "basicThermo.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "fixedEnergyFvPatchScalarField.H"
|
||||
#include "gradientEnergyFvPatchScalarField.H"
|
||||
#include "mixedEnergyFvPatchScalarField.H"
|
||||
#include "fixedJumpFvPatchFields.H"
|
||||
#include "fixedJumpAMIFvPatchFields.H"
|
||||
#include "energyJumpFvPatchScalarField.H"
|
||||
#include "energyJumpAMIFvPatchScalarField.H"
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
|
||||
@ -36,6 +44,84 @@ namespace Foam
|
||||
|
||||
const Foam::word Foam::basicThermo::dictName("thermophysicalProperties");
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
Foam::wordList Foam::basicThermo::heBoundaryBaseTypes()
|
||||
{
|
||||
const volScalarField::GeometricBoundaryField& tbf =
|
||||
this->T_.boundaryField();
|
||||
|
||||
wordList hbt(tbf.size(), word::null);
|
||||
|
||||
forAll(tbf, patchi)
|
||||
{
|
||||
if (isA<fixedJumpFvPatchScalarField>(tbf[patchi]))
|
||||
{
|
||||
const fixedJumpFvPatchScalarField& pf =
|
||||
dynamic_cast<const fixedJumpFvPatchScalarField&>(tbf[patchi]);
|
||||
|
||||
hbt[patchi] = pf.interfaceFieldType();
|
||||
}
|
||||
else if (isA<fixedJumpAMIFvPatchScalarField>(tbf[patchi]))
|
||||
{
|
||||
const fixedJumpAMIFvPatchScalarField& pf =
|
||||
dynamic_cast<const fixedJumpAMIFvPatchScalarField&>
|
||||
(
|
||||
tbf[patchi]
|
||||
);
|
||||
|
||||
hbt[patchi] = pf.interfaceFieldType();
|
||||
}
|
||||
}
|
||||
|
||||
return hbt;
|
||||
}
|
||||
|
||||
|
||||
Foam::wordList Foam::basicThermo::heBoundaryTypes()
|
||||
{
|
||||
const volScalarField::GeometricBoundaryField& tbf =
|
||||
this->T_.boundaryField();
|
||||
|
||||
wordList hbt = tbf.types();
|
||||
|
||||
forAll(tbf, patchi)
|
||||
{
|
||||
if (isA<fixedValueFvPatchScalarField>(tbf[patchi]))
|
||||
{
|
||||
hbt[patchi] = fixedEnergyFvPatchScalarField::typeName;
|
||||
}
|
||||
else if
|
||||
(
|
||||
isA<zeroGradientFvPatchScalarField>(tbf[patchi])
|
||||
|| isA<fixedGradientFvPatchScalarField>(tbf[patchi])
|
||||
)
|
||||
{
|
||||
hbt[patchi] = gradientEnergyFvPatchScalarField::typeName;
|
||||
}
|
||||
else if (isA<mixedFvPatchScalarField>(tbf[patchi]))
|
||||
{
|
||||
hbt[patchi] = mixedEnergyFvPatchScalarField::typeName;
|
||||
}
|
||||
else if (isA<fixedJumpFvPatchScalarField>(tbf[patchi]))
|
||||
{
|
||||
hbt[patchi] = energyJumpFvPatchScalarField::typeName;
|
||||
}
|
||||
else if (isA<fixedJumpAMIFvPatchScalarField>(tbf[patchi]))
|
||||
{
|
||||
hbt[patchi] = energyJumpAMIFvPatchScalarField::typeName;
|
||||
}
|
||||
else if (tbf[patchi].type() == "energyRegionCoupledFvPatchScalarField")
|
||||
{
|
||||
hbt[patchi] = "energyRegionCoupledFvPatchScalarField";
|
||||
}
|
||||
}
|
||||
|
||||
return hbt;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::volScalarField& Foam::basicThermo::lookupOrConstruct
|
||||
@ -395,6 +481,12 @@ const Foam::volScalarField& Foam::basicThermo::T() const
|
||||
}
|
||||
|
||||
|
||||
Foam::volScalarField& Foam::basicThermo::T()
|
||||
{
|
||||
return T_;
|
||||
}
|
||||
|
||||
|
||||
const Foam::volScalarField& Foam::basicThermo::alpha() const
|
||||
{
|
||||
return alpha_;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -77,6 +77,9 @@ protected:
|
||||
//- Should the dpdt term be included in the enthalpy equation
|
||||
Switch dpdt_;
|
||||
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
//- Construct as copy (not implemented)
|
||||
basicThermo(const basicThermo&);
|
||||
|
||||
@ -86,6 +89,14 @@ protected:
|
||||
const char* name
|
||||
) const;
|
||||
|
||||
//- Return the enthalpy/internal energy field boundary types
|
||||
// by interrogating the temperature field boundary types
|
||||
wordList heBoundaryTypes();
|
||||
|
||||
//- Return the enthalpy/internal energy field boundary base types
|
||||
// by interrogating the temperature field boundary types
|
||||
wordList heBoundaryBaseTypes();
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -314,6 +325,10 @@ public:
|
||||
//- Temperature [K]
|
||||
virtual const volScalarField& T() const;
|
||||
|
||||
//- Temperature [K]
|
||||
// Non-const access allowed for transport equations
|
||||
virtual volScalarField& T();
|
||||
|
||||
//- Heat capacity at constant pressure [J/kg/K]
|
||||
virtual tmp<volScalarField> Cp() const = 0;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,94 +24,11 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "heThermo.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "fixedEnergyFvPatchScalarField.H"
|
||||
#include "gradientEnergyFvPatchScalarField.H"
|
||||
#include "mixedEnergyFvPatchScalarField.H"
|
||||
#include "fixedJumpFvPatchFields.H"
|
||||
#include "fixedJumpAMIFvPatchFields.H"
|
||||
#include "energyJumpFvPatchScalarField.H"
|
||||
#include "energyJumpAMIFvPatchScalarField.H"
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class BasicThermo, class MixtureType>
|
||||
Foam::wordList Foam::heThermo<BasicThermo, MixtureType>::heBoundaryBaseTypes()
|
||||
{
|
||||
const volScalarField::GeometricBoundaryField& tbf =
|
||||
this->T_.boundaryField();
|
||||
|
||||
wordList hbt(tbf.size(), word::null);
|
||||
|
||||
forAll(tbf, patchi)
|
||||
{
|
||||
if (isA<fixedJumpFvPatchScalarField>(tbf[patchi]))
|
||||
{
|
||||
const fixedJumpFvPatchScalarField& pf =
|
||||
dynamic_cast<const fixedJumpFvPatchScalarField&>(tbf[patchi]);
|
||||
|
||||
hbt[patchi] = pf.interfaceFieldType();
|
||||
}
|
||||
else if (isA<fixedJumpAMIFvPatchScalarField>(tbf[patchi]))
|
||||
{
|
||||
const fixedJumpAMIFvPatchScalarField& pf =
|
||||
dynamic_cast<const fixedJumpAMIFvPatchScalarField&>
|
||||
(
|
||||
tbf[patchi]
|
||||
);
|
||||
|
||||
hbt[patchi] = pf.interfaceFieldType();
|
||||
}
|
||||
}
|
||||
|
||||
return hbt;
|
||||
}
|
||||
|
||||
|
||||
template<class BasicThermo, class MixtureType>
|
||||
Foam::wordList Foam::heThermo<BasicThermo, MixtureType>::heBoundaryTypes()
|
||||
{
|
||||
const volScalarField::GeometricBoundaryField& tbf =
|
||||
this->T_.boundaryField();
|
||||
|
||||
wordList hbt = tbf.types();
|
||||
|
||||
forAll(tbf, patchi)
|
||||
{
|
||||
if (isA<fixedValueFvPatchScalarField>(tbf[patchi]))
|
||||
{
|
||||
hbt[patchi] = fixedEnergyFvPatchScalarField::typeName;
|
||||
}
|
||||
else if
|
||||
(
|
||||
isA<zeroGradientFvPatchScalarField>(tbf[patchi])
|
||||
|| isA<fixedGradientFvPatchScalarField>(tbf[patchi])
|
||||
)
|
||||
{
|
||||
hbt[patchi] = gradientEnergyFvPatchScalarField::typeName;
|
||||
}
|
||||
else if (isA<mixedFvPatchScalarField>(tbf[patchi]))
|
||||
{
|
||||
hbt[patchi] = mixedEnergyFvPatchScalarField::typeName;
|
||||
}
|
||||
else if (isA<fixedJumpFvPatchScalarField>(tbf[patchi]))
|
||||
{
|
||||
hbt[patchi] = energyJumpFvPatchScalarField::typeName;
|
||||
}
|
||||
else if (isA<fixedJumpAMIFvPatchScalarField>(tbf[patchi]))
|
||||
{
|
||||
hbt[patchi] = energyJumpAMIFvPatchScalarField::typeName;
|
||||
}
|
||||
else if (tbf[patchi].type() == "energyRegionCoupledFvPatchScalarField")
|
||||
{
|
||||
hbt[patchi] = "energyRegionCoupledFvPatchScalarField";
|
||||
}
|
||||
}
|
||||
|
||||
return hbt;
|
||||
}
|
||||
|
||||
|
||||
template<class BasicThermo, class MixtureType>
|
||||
void Foam::heThermo<BasicThermo, MixtureType>::
|
||||
heBoundaryCorrection(volScalarField& h)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -64,14 +64,6 @@ protected:
|
||||
|
||||
// Enthalpy/Internal energy
|
||||
|
||||
//- Return the enthalpy/internal energy field boundary types
|
||||
// by interrogating the temperature field boundary types
|
||||
wordList heBoundaryTypes();
|
||||
|
||||
//- Return the enthalpy/internal energy field boundary base types
|
||||
// by interrogating the temperature field boundary types
|
||||
wordList heBoundaryBaseTypes();
|
||||
|
||||
//- Correct the enthalpy/internal energy field boundaries
|
||||
void heBoundaryCorrection(volScalarField& he);
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@ public:
|
||||
(mesh, phaseName)
|
||||
);
|
||||
|
||||
// Declare run-time constructor selection tables
|
||||
// Declare run-time constructor selection tables
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -32,6 +32,7 @@ template<class Specie>
|
||||
Foam::perfectFluid<Specie>::perfectFluid(Istream& is)
|
||||
:
|
||||
Specie(is),
|
||||
R_(readScalar(is)),
|
||||
rho0_(readScalar(is))
|
||||
{
|
||||
is.check("perfectFluid<Specie>::perfectFluid(Istream& is)");
|
||||
@ -42,6 +43,7 @@ template<class Specie>
|
||||
Foam::perfectFluid<Specie>::perfectFluid(const dictionary& dict)
|
||||
:
|
||||
Specie(dict),
|
||||
R_(readScalar(dict.subDict("equationOfState").lookup("R"))),
|
||||
rho0_(readScalar(dict.subDict("equationOfState").lookup("rho0")))
|
||||
{}
|
||||
|
||||
@ -54,6 +56,7 @@ void Foam::perfectFluid<Specie>::write(Ostream& os) const
|
||||
Specie::write(os);
|
||||
|
||||
dictionary dict("equationOfState");
|
||||
dict.add("R", R_);
|
||||
dict.add("rho0", rho0_);
|
||||
|
||||
os << indent << dict.dictName() << dict;
|
||||
@ -66,6 +69,7 @@ template<class Specie>
|
||||
Foam::Ostream& Foam::operator<<(Ostream& os, const perfectFluid<Specie>& pf)
|
||||
{
|
||||
os << static_cast<const Specie&>(pf)
|
||||
<< token::SPACE << pf.R_
|
||||
<< token::SPACE << pf.rho0_;
|
||||
|
||||
os.check("Ostream& operator<<(Ostream&, const perfectFluid<Specie>&)");
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -94,15 +94,24 @@ class perfectFluid
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Fluid constant
|
||||
scalar R_;
|
||||
|
||||
//- The reference density
|
||||
scalar rho0_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
inline perfectFluid(const Specie& sp, const scalar rho0);
|
||||
inline perfectFluid
|
||||
(
|
||||
const Specie& sp,
|
||||
const scalar R,
|
||||
const scalar rho0
|
||||
);
|
||||
|
||||
//- Construct from Istream
|
||||
perfectFluid(Istream&);
|
||||
@ -140,6 +149,9 @@ public:
|
||||
//- Is the equation of state is isochoric i.e. rho = const
|
||||
static const bool isochoric = false;
|
||||
|
||||
//- Return fluid constant [J/(kg K)]
|
||||
inline scalar R() const;
|
||||
|
||||
//- Return density [kg/m^3]
|
||||
inline scalar rho(scalar p, scalar T) const;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -31,10 +31,12 @@ template<class Specie>
|
||||
inline Foam::perfectFluid<Specie>::perfectFluid
|
||||
(
|
||||
const Specie& sp,
|
||||
const scalar R,
|
||||
const scalar rho0
|
||||
)
|
||||
:
|
||||
Specie(sp),
|
||||
R_(R),
|
||||
rho0_(rho0)
|
||||
{}
|
||||
|
||||
@ -49,6 +51,7 @@ inline Foam::perfectFluid<Specie>::perfectFluid
|
||||
)
|
||||
:
|
||||
Specie(name, pf),
|
||||
R_(pf.R_),
|
||||
rho0_(pf.rho0_)
|
||||
{}
|
||||
|
||||
@ -82,6 +85,13 @@ Foam::perfectFluid<Specie>::New
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::perfectFluid<Specie>::R() const
|
||||
{
|
||||
return R_;
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::perfectFluid<Specie>::rho(scalar p, scalar T) const
|
||||
{
|
||||
@ -106,7 +116,7 @@ inline Foam::scalar Foam::perfectFluid<Specie>::Z(scalar, scalar) const
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::perfectFluid<Specie>::cpMcv(scalar, scalar) const
|
||||
{
|
||||
return this->RR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -125,6 +135,7 @@ inline void Foam::perfectFluid<Specie>::operator+=
|
||||
molr1 /= this->nMoles();
|
||||
scalar molr2 = pf.nMoles()/this->nMoles();
|
||||
|
||||
R_ = 1.0/(molr1/R_ + molr2/pf.R_);
|
||||
rho0_ = molr1*rho0_ + molr2*pf.rho0_;
|
||||
}
|
||||
|
||||
@ -142,6 +153,7 @@ inline void Foam::perfectFluid<Specie>::operator-=
|
||||
molr1 /= this->nMoles();
|
||||
scalar molr2 = pf.nMoles()/this->nMoles();
|
||||
|
||||
R_ = 1.0/(molr1/R_ - molr2/pf.R_);
|
||||
rho0_ = molr1*rho0_ - molr2*pf.rho0_;
|
||||
}
|
||||
|
||||
@ -170,6 +182,7 @@ inline Foam::perfectFluid<Specie> Foam::operator+
|
||||
(
|
||||
static_cast<const Specie&>(pf1)
|
||||
+ static_cast<const Specie&>(pf2),
|
||||
1.0/(molr1/pf1.R_ + molr2/pf2.R_),
|
||||
molr1*pf1.rho0_ + molr2*pf2.rho0_
|
||||
);
|
||||
}
|
||||
@ -190,6 +203,7 @@ inline Foam::perfectFluid<Specie> Foam::operator-
|
||||
(
|
||||
static_cast<const Specie&>(pf1)
|
||||
- static_cast<const Specie&>(pf2),
|
||||
1.0/(molr1/pf1.R_ - molr2/pf2.R_),
|
||||
molr1*pf1.rho0_ - molr2*pf2.rho0_
|
||||
);
|
||||
}
|
||||
@ -202,7 +216,12 @@ inline Foam::perfectFluid<Specie> Foam::operator*
|
||||
const perfectFluid<Specie>& pf
|
||||
)
|
||||
{
|
||||
return perfectFluid<Specie>(s*static_cast<const Specie&>(pf), pf.rho0_);
|
||||
return perfectFluid<Specie>
|
||||
(
|
||||
s*static_cast<const Specie&>(pf),
|
||||
pf.R_,
|
||||
pf.rho0_
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -54,7 +54,8 @@ Foam::twoPhaseMixture::twoPhaseMixture
|
||||
(
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi,
|
||||
const word& alpha1Name
|
||||
const word& alpha1Name,
|
||||
const word& alpha2Name
|
||||
)
|
||||
:
|
||||
transportModel(U, phi),
|
||||
@ -102,6 +103,17 @@ Foam::twoPhaseMixture::twoPhaseMixture
|
||||
U_.mesh()
|
||||
),
|
||||
|
||||
alpha2_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
found("phases") ? word("alpha" + phase2Name_) : alpha2Name,
|
||||
U_.time().timeName(),
|
||||
U_.db()
|
||||
),
|
||||
1.0 - alpha1_
|
||||
),
|
||||
|
||||
nu_
|
||||
(
|
||||
IOobject
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -70,6 +70,7 @@ protected:
|
||||
const surfaceScalarField& phi_;
|
||||
|
||||
volScalarField alpha1_;
|
||||
volScalarField alpha2_;
|
||||
|
||||
volScalarField nu_;
|
||||
|
||||
@ -89,7 +90,8 @@ public:
|
||||
(
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi,
|
||||
const word& alpha1Name = "alpha1"
|
||||
const word& alpha1Name = "alpha1",
|
||||
const word& alpha2Name = "alpha2"
|
||||
);
|
||||
|
||||
|
||||
@ -122,6 +124,18 @@ public:
|
||||
return alpha1_;
|
||||
}
|
||||
|
||||
//- Return the phase-fraction of phase 2
|
||||
const volScalarField& alpha2() const
|
||||
{
|
||||
return alpha2_;
|
||||
}
|
||||
|
||||
//- Return the phase-fraction of phase 2
|
||||
volScalarField& alpha2()
|
||||
{
|
||||
return alpha2_;
|
||||
}
|
||||
|
||||
//- Return const-access to phase1 viscosityModel
|
||||
const viscosityModel& nuModel1() const
|
||||
{
|
||||
|
||||
@ -4,10 +4,10 @@ laminar/laminar.C
|
||||
derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C
|
||||
derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C
|
||||
derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
|
||||
derivedFvPatchFields/thermoBaffle1D/thermoBaffle1DFvPatchScalarFields.C
|
||||
derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.C
|
||||
derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C
|
||||
derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C
|
||||
derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C
|
||||
|
||||
derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libcompressibleTurbulenceModel
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -92,13 +92,13 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa
|
||||
{
|
||||
case BASICTHERMO:
|
||||
{
|
||||
const compressible::turbulenceModel& model =
|
||||
const compressible::turbulenceModel& turbModel =
|
||||
mesh.lookupObject<compressible::turbulenceModel>
|
||||
(
|
||||
"turbulenceModel"
|
||||
);
|
||||
|
||||
return model.kappaEff(patch_.index());
|
||||
return turbModel.kappaEff(patch_.index());
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -39,8 +39,8 @@ namespace compressible
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class solidType>
|
||||
thermoBaffle1DFvPatchScalarField<solidType>::
|
||||
thermoBaffle1DFvPatchScalarField
|
||||
thermalBaffle1DFvPatchScalarField<solidType>::
|
||||
thermalBaffle1DFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
@ -56,10 +56,10 @@ thermoBaffle1DFvPatchScalarField
|
||||
|
||||
|
||||
template<class solidType>
|
||||
thermoBaffle1DFvPatchScalarField<solidType>::
|
||||
thermoBaffle1DFvPatchScalarField
|
||||
thermalBaffle1DFvPatchScalarField<solidType>::
|
||||
thermalBaffle1DFvPatchScalarField
|
||||
(
|
||||
const thermoBaffle1DFvPatchScalarField& ptf,
|
||||
const thermalBaffle1DFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
@ -75,8 +75,8 @@ thermoBaffle1DFvPatchScalarField
|
||||
|
||||
|
||||
template<class solidType>
|
||||
thermoBaffle1DFvPatchScalarField<solidType>::
|
||||
thermoBaffle1DFvPatchScalarField
|
||||
thermalBaffle1DFvPatchScalarField<solidType>::
|
||||
thermalBaffle1DFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
@ -94,8 +94,8 @@ thermoBaffle1DFvPatchScalarField
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"thermoBaffle1DFvPatchScalarField::"
|
||||
"thermoBaffle1DFvPatchScalarField"
|
||||
"thermalBaffle1DFvPatchScalarField::"
|
||||
"thermalBaffle1DFvPatchScalarField"
|
||||
"("
|
||||
"const fvPatch&,\n"
|
||||
"const DimensionedField<scalar, volMesh>&, "
|
||||
@ -130,10 +130,10 @@ thermoBaffle1DFvPatchScalarField
|
||||
|
||||
|
||||
template<class solidType>
|
||||
thermoBaffle1DFvPatchScalarField<solidType>::
|
||||
thermoBaffle1DFvPatchScalarField
|
||||
thermalBaffle1DFvPatchScalarField<solidType>::
|
||||
thermalBaffle1DFvPatchScalarField
|
||||
(
|
||||
const thermoBaffle1DFvPatchScalarField& ptf
|
||||
const thermalBaffle1DFvPatchScalarField& ptf
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(ptf),
|
||||
@ -146,10 +146,10 @@ thermoBaffle1DFvPatchScalarField
|
||||
|
||||
|
||||
template<class solidType>
|
||||
thermoBaffle1DFvPatchScalarField<solidType>::
|
||||
thermoBaffle1DFvPatchScalarField
|
||||
thermalBaffle1DFvPatchScalarField<solidType>::
|
||||
thermalBaffle1DFvPatchScalarField
|
||||
(
|
||||
const thermoBaffle1DFvPatchScalarField& ptf,
|
||||
const thermalBaffle1DFvPatchScalarField& ptf,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
@ -165,7 +165,7 @@ thermoBaffle1DFvPatchScalarField
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class solidType>
|
||||
void thermoBaffle1DFvPatchScalarField<solidType>::autoMap
|
||||
void thermalBaffle1DFvPatchScalarField<solidType>::autoMap
|
||||
(
|
||||
const fvPatchFieldMapper& m
|
||||
)
|
||||
@ -174,7 +174,7 @@ void thermoBaffle1DFvPatchScalarField<solidType>::autoMap
|
||||
}
|
||||
|
||||
template<class solidType>
|
||||
void thermoBaffle1DFvPatchScalarField<solidType>::rmap
|
||||
void thermalBaffle1DFvPatchScalarField<solidType>::rmap
|
||||
(
|
||||
const fvPatchScalarField& ptf,
|
||||
const labelList& addr
|
||||
@ -185,7 +185,7 @@ void thermoBaffle1DFvPatchScalarField<solidType>::rmap
|
||||
|
||||
|
||||
template<class solidType>
|
||||
void thermoBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
|
||||
void thermalBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
|
||||
{
|
||||
if (updated())
|
||||
{
|
||||
@ -200,23 +200,23 @@ void thermoBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
|
||||
const mappedPatchBase& mpp =
|
||||
refCast<const mappedPatchBase>(patch().patch());
|
||||
|
||||
const label patchI = patch().index();
|
||||
const label patchi = patch().index();
|
||||
|
||||
const label nbrPatchI = mpp.samplePolyPatch().index();
|
||||
const label nbrPatchi = mpp.samplePolyPatch().index();
|
||||
|
||||
if (baffleActivated_)
|
||||
{
|
||||
const fvPatch& nbrPatch = patch().boundaryMesh()[nbrPatchI];
|
||||
const fvPatch& nbrPatch = patch().boundaryMesh()[nbrPatchi];
|
||||
|
||||
const compressible::turbulenceModel& model =
|
||||
const compressible::turbulenceModel& turbModel =
|
||||
db().template lookupObject<compressible::turbulenceModel>
|
||||
(
|
||||
"turbulenceModel"
|
||||
);
|
||||
|
||||
|
||||
// local properties
|
||||
const scalarField kappaw = model.kappaEff()().boundaryField()[patchI];
|
||||
|
||||
const scalarField kappaw(turbModel.kappaEff(patchi));
|
||||
|
||||
const fvPatchScalarField& Tp =
|
||||
patch().template lookupPatchField<volScalarField, scalar>(TName_);
|
||||
@ -229,21 +229,16 @@ void thermoBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
|
||||
|
||||
// nbr properties
|
||||
|
||||
scalarField nbrKappaw =
|
||||
model.kappaEff()().boundaryField()[nbrPatchI];
|
||||
mpp.map().distribute(nbrKappaw);
|
||||
const scalarField nbrKappaw(turbModel.kappaEff(nbrPatchi));
|
||||
|
||||
const fvPatchScalarField& nbrTw =
|
||||
model.thermo().T().boundaryField()[nbrPatchI];
|
||||
turbModel.thermo().T().boundaryField()[nbrPatchi];
|
||||
|
||||
scalarField nbrQDot
|
||||
(
|
||||
model.kappaEff()().boundaryField()[nbrPatchI]*nbrTw.snGrad()
|
||||
);
|
||||
scalarField nbrQDot(nbrKappaw*nbrTw.snGrad());
|
||||
mpp.map().distribute(nbrQDot);
|
||||
|
||||
const thermoBaffle1DFvPatchScalarField& nbrField =
|
||||
refCast<const thermoBaffle1DFvPatchScalarField>
|
||||
const thermalBaffle1DFvPatchScalarField& nbrField =
|
||||
refCast<const thermalBaffle1DFvPatchScalarField>
|
||||
(
|
||||
nbrPatch.template lookupPatchField<volScalarField, scalar>(TName_)
|
||||
);
|
||||
@ -255,11 +250,7 @@ void thermoBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
|
||||
nbrPatch.template lookupPatchField<volScalarField, scalar>(TName_);
|
||||
mpp.map().distribute(nbrTp);
|
||||
|
||||
scalarField nbrh
|
||||
(
|
||||
nbrPatch.deltaCoeffs()
|
||||
*model.kappaEff()().boundaryField()[nbrPatchI]
|
||||
);
|
||||
scalarField nbrh(nbrPatch.deltaCoeffs()*nbrKappaw);
|
||||
mpp.map().distribute(nbrh);
|
||||
|
||||
|
||||
@ -347,7 +338,7 @@ void thermoBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
|
||||
}
|
||||
|
||||
template <class solidType>
|
||||
void thermoBaffle1DFvPatchScalarField<solidType>::
|
||||
void thermalBaffle1DFvPatchScalarField<solidType>::
|
||||
write(Ostream& os) const
|
||||
{
|
||||
mixedFvPatchScalarField::write(os);
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -22,19 +22,19 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::thermoBaffle1DFvPatchScalarField
|
||||
Foam::thermalBaffle1DFvPatchScalarField
|
||||
|
||||
Description
|
||||
Boundary which solves the 1D steady state heat transfer equation
|
||||
through a baffle.
|
||||
|
||||
SourceFiles
|
||||
thermoBaffle1DFvPatchScalarField.C
|
||||
thermalBaffle1DFvPatchScalarField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef thermoBaffle1DFvPatchScalarField_H
|
||||
#define thermoBaffle1DFvPatchScalarField_H
|
||||
#ifndef thermalBaffle1DFvPatchScalarField_H
|
||||
#define thermalBaffle1DFvPatchScalarField_H
|
||||
|
||||
#include "mixedFvPatchFields.H"
|
||||
#include "autoPtr.H"
|
||||
@ -48,11 +48,11 @@ namespace compressible
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class thermoBaffle1DFvPatchScalarField Declaration
|
||||
Class thermalBaffle1DFvPatchScalarField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class solidType>
|
||||
class thermoBaffle1DFvPatchScalarField
|
||||
class thermalBaffle1DFvPatchScalarField
|
||||
:
|
||||
public mixedFvPatchScalarField
|
||||
{
|
||||
@ -77,20 +77,20 @@ class thermoBaffle1DFvPatchScalarField
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("compressible::thermoBaffle1D");
|
||||
TypeName("compressible::thermalBaffle1D");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
thermoBaffle1DFvPatchScalarField
|
||||
thermalBaffle1DFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
thermoBaffle1DFvPatchScalarField
|
||||
thermalBaffle1DFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
@ -98,19 +98,19 @@ public:
|
||||
);
|
||||
|
||||
//- Construct by mapping given
|
||||
// thermoBaffle1DFvPatchScalarField onto a new patch
|
||||
thermoBaffle1DFvPatchScalarField
|
||||
// thermalBaffle1DFvPatchScalarField onto a new patch
|
||||
thermalBaffle1DFvPatchScalarField
|
||||
(
|
||||
const thermoBaffle1DFvPatchScalarField&,
|
||||
const thermalBaffle1DFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
thermoBaffle1DFvPatchScalarField
|
||||
thermalBaffle1DFvPatchScalarField
|
||||
(
|
||||
const thermoBaffle1DFvPatchScalarField&
|
||||
const thermalBaffle1DFvPatchScalarField&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
@ -118,14 +118,14 @@ public:
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new thermoBaffle1DFvPatchScalarField(*this)
|
||||
new thermalBaffle1DFvPatchScalarField(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
thermoBaffle1DFvPatchScalarField
|
||||
thermalBaffle1DFvPatchScalarField
|
||||
(
|
||||
const thermoBaffle1DFvPatchScalarField&,
|
||||
const thermalBaffle1DFvPatchScalarField&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
@ -137,7 +137,7 @@ public:
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new thermoBaffle1DFvPatchScalarField(*this, iF)
|
||||
new thermalBaffle1DFvPatchScalarField(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ public:
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "thermoBaffle1DFvPatchScalarField.C"
|
||||
# include "thermalBaffle1DFvPatchScalarField.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,7 +23,7 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "thermoBaffle1DFvPatchScalarFields.H"
|
||||
#include "thermalBaffle1DFvPatchScalarFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
|
||||
@ -38,28 +38,28 @@ namespace compressible
|
||||
|
||||
defineTemplateTypeNameAndDebugWithName
|
||||
(
|
||||
constSolid_thermoBaffle1DFvPatchScalarField,
|
||||
"compressible::thermoBaffle1D<hConstSolidThermoPhysics>",
|
||||
constSolid_thermalBaffle1DFvPatchScalarField,
|
||||
"compressible::thermalBaffle1D<hConstSolidThermoPhysics>",
|
||||
0
|
||||
);
|
||||
|
||||
addToPatchFieldRunTimeSelection
|
||||
(
|
||||
fvPatchScalarField,
|
||||
constSolid_thermoBaffle1DFvPatchScalarField
|
||||
constSolid_thermalBaffle1DFvPatchScalarField
|
||||
);
|
||||
|
||||
defineTemplateTypeNameAndDebugWithName
|
||||
(
|
||||
expoSolid_thermoBaffle1DFvPatchScalarField,
|
||||
"compressible::thermoBaffle1D<hExponentialSolidThermoPhysics>",
|
||||
expoSolid_thermalBaffle1DFvPatchScalarField,
|
||||
"compressible::thermalBaffle1D<hExponentialSolidThermoPhysics>",
|
||||
0
|
||||
);
|
||||
|
||||
addToPatchFieldRunTimeSelection
|
||||
(
|
||||
fvPatchScalarField,
|
||||
expoSolid_thermoBaffle1DFvPatchScalarField
|
||||
expoSolid_thermalBaffle1DFvPatchScalarField
|
||||
);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,10 +23,10 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef thermoBaffle1DFvPatchScalarFields_H
|
||||
#define thermoBaffle1DFvPatchScalarFields_H
|
||||
#ifndef thermalBaffle1DFvPatchScalarFields_H
|
||||
#define thermalBaffle1DFvPatchScalarFields_H
|
||||
|
||||
#include "thermoBaffle1DFvPatchScalarField.H"
|
||||
#include "thermalBaffle1DFvPatchScalarField.H"
|
||||
#include "solidThermoPhysicsTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -38,15 +38,15 @@ namespace compressible
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
typedef thermoBaffle1DFvPatchScalarField
|
||||
typedef thermalBaffle1DFvPatchScalarField
|
||||
<
|
||||
hConstSolidThermoPhysics
|
||||
>constSolid_thermoBaffle1DFvPatchScalarField;
|
||||
>constSolid_thermalBaffle1DFvPatchScalarField;
|
||||
|
||||
typedef thermoBaffle1DFvPatchScalarField
|
||||
typedef thermalBaffle1DFvPatchScalarField
|
||||
<
|
||||
hExponentialSolidThermoPhysics
|
||||
>expoSolid_thermoBaffle1DFvPatchScalarField;
|
||||
>expoSolid_thermalBaffle1DFvPatchScalarField;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -26,8 +26,7 @@ License
|
||||
#include "wallHeatTransferFvPatchScalarField.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "basicThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -149,19 +148,19 @@ void Foam::wallHeatTransferFvPatchScalarField::updateCoeffs()
|
||||
return;
|
||||
}
|
||||
|
||||
const basicThermo& thermo = basicThermo::lookupThermo(*this);
|
||||
const label patchi = patch().index();
|
||||
const compressible::turbulenceModel& turbModel =
|
||||
db().lookupObject<compressible::turbulenceModel>
|
||||
(
|
||||
"turbulenceModel"
|
||||
);
|
||||
|
||||
const scalarField& pw = thermo.p().boundaryField()[patchi];
|
||||
const scalarField& Tw = thermo.T().boundaryField()[patchi];
|
||||
const scalarField Cpw(thermo.Cp(pw, Tw, patchi));
|
||||
const label patchi = patch().index();
|
||||
|
||||
valueFraction() =
|
||||
1.0/
|
||||
(
|
||||
1.0
|
||||
+ Cpw*thermo.alpha().boundaryField()[patchi]
|
||||
*patch().deltaCoeffs()/alphaWall_
|
||||
+ turbModel.kappaEff(patchi)*patch().deltaCoeffs()/alphaWall_
|
||||
);
|
||||
|
||||
mixedFvPatchScalarField::updateCoeffs();
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -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-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -70,25 +70,25 @@ void Foam::porousBafflePressureFvPatchField<Foam::scalar>::updateCoeffs()
|
||||
|
||||
if (phi.dimensions() == dimensionSet(0, 3, -1, 0, 0))
|
||||
{
|
||||
const incompressible::turbulenceModel& model =
|
||||
const incompressible::turbulenceModel& turbModel =
|
||||
db().lookupObject<incompressible::turbulenceModel>
|
||||
(
|
||||
"turbulenceModel"
|
||||
);
|
||||
|
||||
const scalarField nuEffw = model.nuEff()().boundaryField()[patchI];
|
||||
const scalarField nuEffw = turbModel.nuEff()().boundaryField()[patchI];
|
||||
|
||||
jump_ = -sign(Un)*(I_*nuEffw + D_*0.5*magUn*length_)*magUn;
|
||||
}
|
||||
else
|
||||
{
|
||||
const compressible::turbulenceModel& model =
|
||||
const compressible::turbulenceModel& turbModel =
|
||||
db().lookupObject<compressible::turbulenceModel>
|
||||
(
|
||||
"turbulenceModel"
|
||||
);
|
||||
|
||||
const scalarField muEffw = model.muEff()().boundaryField()[patchI];
|
||||
const scalarField muEffw = turbModel.muEff()().boundaryField()[patchI];
|
||||
|
||||
const scalarField rhow =
|
||||
patch().lookupPatchField<volScalarField, scalar>("rho");
|
||||
|
||||
@ -47,4 +47,4 @@ porosity1
|
||||
}
|
||||
|
||||
|
||||
//************************************************************************* //
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -65,4 +65,4 @@ porosity1
|
||||
}
|
||||
|
||||
|
||||
//***************************************************************************//
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -11,17 +11,17 @@ FoamFile
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object thermoBaffleProperties;
|
||||
object thermalBaffleProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoBaffleModel none;
|
||||
thermalBaffleModel none;
|
||||
|
||||
active no;
|
||||
|
||||
regionName none;
|
||||
|
||||
thermoBaffleCoeffs
|
||||
thermalBaffleCoeffs
|
||||
{
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ dictionaryReplacement
|
||||
{
|
||||
"region0_to.*"
|
||||
{
|
||||
type compressible::thermoBaffle;
|
||||
type compressible::thermalBaffle;
|
||||
neighbourFieldName T;
|
||||
kappa solidThermo;
|
||||
kappaName none;
|
||||
|
||||
@ -88,7 +88,7 @@ dictionaryReplacement
|
||||
{
|
||||
"baffle.*"
|
||||
{
|
||||
type compressible::thermoBaffle1D<hConstSolidThermoPhysics>;
|
||||
type compressible::thermalBaffle1D<hConstSolidThermoPhysics>;
|
||||
baffleActivated yes;
|
||||
thickness uniform 0.005; // thickness [m]
|
||||
Qs uniform 100; // heat flux [W/m2]
|
||||
|
||||
@ -88,7 +88,7 @@ dictionaryReplacement
|
||||
{
|
||||
"baffle1Wall.*"
|
||||
{
|
||||
type compressible::thermoBaffle1D<hConstSolidThermoPhysics>;
|
||||
type compressible::thermalBaffle1D<hConstSolidThermoPhysics>;
|
||||
baffleActivated yes;
|
||||
thickness uniform 0.005; // thickness [m]
|
||||
Qs uniform 100; // heat flux [W/m2]
|
||||
|
||||
@ -91,7 +91,7 @@ dictionaryReplacement
|
||||
|
||||
"region0_to.*"
|
||||
{
|
||||
type compressible::thermoBaffle;
|
||||
type compressible::thermalBaffle;
|
||||
|
||||
// Coupled BC.
|
||||
neighbourFieldName T;
|
||||
@ -99,11 +99,11 @@ dictionaryReplacement
|
||||
kappaName none;
|
||||
|
||||
// Thermo baffle model
|
||||
thermoBaffleModel thermoBaffle;
|
||||
thermalBaffleModel thermalBaffle;
|
||||
regionName baffleRegion;
|
||||
infoOutput no;
|
||||
active yes;
|
||||
thermoBaffleCoeffs
|
||||
thermalBaffleCoeffs
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@ -44,6 +44,6 @@ timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
libs ("libthermoBaffleModels.so" "libcompressibleRASModels.so");
|
||||
libs ("libthermalBaffleModels.so" "libcompressibleRASModels.so");
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -52,7 +52,7 @@ baffles
|
||||
{
|
||||
T
|
||||
{
|
||||
type compressible::thermoBaffle1D<hConstSolidThermoPhysics>;
|
||||
type compressible::thermalBaffle1D<hConstSolidThermoPhysics>;
|
||||
baffleActivated yes;
|
||||
thickness uniform 0.005; // thickness [m]
|
||||
Qs uniform 100; // heat flux [W/m2]
|
||||
|
||||
@ -0,0 +1,19 @@
|
||||
/*--------------------------------*- 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 dictionary;
|
||||
location "constant";
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -22,16 +22,6 @@ water
|
||||
transportModel Newtonian;
|
||||
nu 1e-06;
|
||||
rho 1000;
|
||||
k 0; // 0.613;
|
||||
Cv 4179;
|
||||
|
||||
equationOfState
|
||||
{
|
||||
type perfectFluid;
|
||||
|
||||
rho0 1000;
|
||||
R 3000;
|
||||
}
|
||||
}
|
||||
|
||||
air
|
||||
@ -39,16 +29,6 @@ air
|
||||
transportModel Newtonian;
|
||||
nu 1.589e-05;
|
||||
rho 1;
|
||||
k 0; // 2.63e-2;
|
||||
Cv 721;
|
||||
|
||||
equationOfState
|
||||
{
|
||||
type perfectFluid;
|
||||
|
||||
rho0 0;
|
||||
R 287;
|
||||
}
|
||||
}
|
||||
|
||||
pMin pMin [ 1 -1 -2 0 0 0 0 ] 10000;
|
||||
|
||||
@ -33,6 +33,7 @@ divSchemes
|
||||
div(phid1,p_rgh) Gauss upwind;
|
||||
div(phid2,p_rgh) Gauss upwind;
|
||||
div(rho*phi,T) Gauss upwind;
|
||||
div(rho*phi,K) Gauss upwind;
|
||||
div(phi,k) Gauss vanLeer;
|
||||
div((muEff*dev(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ solvers
|
||||
maxIter 100;
|
||||
}
|
||||
|
||||
"(rho|rhoFinal)"
|
||||
".*(rho|rhoFinal)"
|
||||
{
|
||||
solver diagonal;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user