thermodynamics: Updated enthalpyJump to a generic energyJump BC

This commit is contained in:
Henry
2012-05-30 15:52:41 +01:00
parent b7e680b277
commit 8a7f373751
4 changed files with 35 additions and 45 deletions

View File

@ -15,6 +15,7 @@ rhoThermo/heRhoThermo/heRhoThermos.C
derivedFvPatchFields/fixedEnergy/fixedEnergyFvPatchScalarField.C
derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.C
derivedFvPatchFields/mixedEnergy/mixedEnergyFvPatchScalarField.C
derivedFvPatchFields/energyJump/energyJumpFvPatchScalarField.C
derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C

View File

@ -30,6 +30,8 @@ License
#include "fixedEnergyFvPatchScalarField.H"
#include "gradientEnergyFvPatchScalarField.H"
#include "mixedEnergyFvPatchScalarField.H"
#include "temperatureJumpFvPatchScalarField.H"
#include "energyJumpFvPatchScalarField.H"
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
@ -67,7 +69,7 @@ Foam::wordList Foam::basicThermo::heBoundaryTypes()
}
else if (isA<temperatureJumpFvPatchScalarField>(tbf[patchi]))
{
hbt[patchi] = enthalpyJumpFvPatchScalarField::typeName;
hbt[patchi] = energyJumpFvPatchScalarField::typeName;
}
}

View File

@ -24,13 +24,13 @@ License
\*---------------------------------------------------------------------------*/
#include "addToRunTimeSelectionTable.H"
#include "enthalpyJumpFvPatchScalarField.H"
#include "energyJumpFvPatchScalarField.H"
#include "temperatureJumpFvPatchScalarField.H"
#include "basicThermo.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::enthalpyJumpFvPatchScalarField::enthalpyJumpFvPatchScalarField
Foam::energyJumpFvPatchScalarField::energyJumpFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
@ -40,9 +40,9 @@ Foam::enthalpyJumpFvPatchScalarField::enthalpyJumpFvPatchScalarField
{}
Foam::enthalpyJumpFvPatchScalarField::enthalpyJumpFvPatchScalarField
Foam::energyJumpFvPatchScalarField::energyJumpFvPatchScalarField
(
const enthalpyJumpFvPatchScalarField& ptf,
const energyJumpFvPatchScalarField& ptf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
@ -52,7 +52,7 @@ Foam::enthalpyJumpFvPatchScalarField::enthalpyJumpFvPatchScalarField
{}
Foam::enthalpyJumpFvPatchScalarField::enthalpyJumpFvPatchScalarField
Foam::energyJumpFvPatchScalarField::energyJumpFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
@ -72,9 +72,9 @@ Foam::enthalpyJumpFvPatchScalarField::enthalpyJumpFvPatchScalarField
}
Foam::enthalpyJumpFvPatchScalarField::enthalpyJumpFvPatchScalarField
Foam::energyJumpFvPatchScalarField::energyJumpFvPatchScalarField
(
const enthalpyJumpFvPatchScalarField& ptf
const energyJumpFvPatchScalarField& ptf
)
:
cyclicLduInterfaceField(),
@ -82,9 +82,9 @@ Foam::enthalpyJumpFvPatchScalarField::enthalpyJumpFvPatchScalarField
{}
Foam::enthalpyJumpFvPatchScalarField::enthalpyJumpFvPatchScalarField
Foam::energyJumpFvPatchScalarField::energyJumpFvPatchScalarField
(
const enthalpyJumpFvPatchScalarField& ptf,
const energyJumpFvPatchScalarField& ptf,
const DimensionedField<scalar, volMesh>& iF
)
:
@ -94,7 +94,7 @@ Foam::enthalpyJumpFvPatchScalarField::enthalpyJumpFvPatchScalarField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::enthalpyJumpFvPatchScalarField::updateCoeffs()
void Foam::energyJumpFvPatchScalarField::updateCoeffs()
{
if (this->updated())
{
@ -124,27 +124,14 @@ void Foam::enthalpyJumpFvPatchScalarField::updateCoeffs()
const labelUList& faceCells = this->patch().faceCells();
if (db().foundObject<volScalarField>("h"))
{
jump_ = thermo.h(jumpTb, faceCells);
}
else if (db().foundObject<volScalarField>("hs"))
{
jump_ = thermo.hs(jumpTb, faceCells);
}
else
{
FatalErrorIn("enthalpyJumpFvPatchScalarField::updateCoeffs()")
<< " hs or h are not found in db()"
<< exit(FatalError);
}
jump_ = thermo.he(jumpTb, faceCells);
}
fixedJumpFvPatchField<scalar>::updateCoeffs();
}
void Foam::enthalpyJumpFvPatchScalarField::write(Ostream& os) const
void Foam::energyJumpFvPatchScalarField::write(Ostream& os) const
{
fixedJumpFvPatchField<scalar>::write(os);
this->writeEntry("value", os);
@ -158,7 +145,7 @@ namespace Foam
makePatchTypeField
(
fvPatchScalarField,
enthalpyJumpFvPatchScalarField
energyJumpFvPatchScalarField
);
}

View File

@ -22,17 +22,17 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::enthalpyJumpFvPatchScalarField
Foam::energyJumpFvPatchScalarField
Description
SourceFiles
enthalpyJumpFvPatchScalarField.C
energyJumpFvPatchScalarField.C
\*---------------------------------------------------------------------------*/
#ifndef enthalpyJumpFvPatchScalarField_H
#define enthalpyJumpFvPatchScalarField_H
#ifndef energyJumpFvPatchScalarField_H
#define energyJumpFvPatchScalarField_H
#include "fixedJumpFvPatchField.H"
#include "DataEntry.H"
@ -43,10 +43,10 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class enthalpyJumpFvPatchScalarField Declaration
Class energyJumpFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/
class enthalpyJumpFvPatchScalarField
class energyJumpFvPatchScalarField
:
public fixedJumpFvPatchField<scalar>
{
@ -54,39 +54,39 @@ class enthalpyJumpFvPatchScalarField
public:
//- Runtime type information
TypeName("enthalpyJump");
TypeName("energyJump");
// Constructors
//- Construct from patch and internal field
enthalpyJumpFvPatchScalarField
energyJumpFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&
);
//- Construct from patch, internal field and dictionary
enthalpyJumpFvPatchScalarField
energyJumpFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const dictionary&
);
//- Construct by mapping given enthalpyJumpFvPatchScalarField onto a
//- Construct by mapping given energyJumpFvPatchScalarField onto a
// new patch
enthalpyJumpFvPatchScalarField
energyJumpFvPatchScalarField
(
const enthalpyJumpFvPatchScalarField&,
const energyJumpFvPatchScalarField&,
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
enthalpyJumpFvPatchScalarField
energyJumpFvPatchScalarField
(
const enthalpyJumpFvPatchScalarField&
const energyJumpFvPatchScalarField&
);
//- Construct and return a clone
@ -94,14 +94,14 @@ public:
{
return tmp<fvPatchField<scalar> >
(
new enthalpyJumpFvPatchScalarField(*this)
new energyJumpFvPatchScalarField(*this)
);
}
//- Construct as copy setting internal field reference
enthalpyJumpFvPatchScalarField
energyJumpFvPatchScalarField
(
const enthalpyJumpFvPatchScalarField&,
const energyJumpFvPatchScalarField&,
const DimensionedField<scalar, volMesh>&
);
@ -113,7 +113,7 @@ public:
{
return tmp<fvPatchField<scalar> >
(
new enthalpyJumpFvPatchScalarField(*this, iF)
new energyJumpFvPatchScalarField(*this, iF)
);
}