diff --git a/src/thermophysicalModels/basic/Make/files b/src/thermophysicalModels/basic/Make/files index 882fa2e54c929049d9eb99d263ffb3b1cdd40c02..edeb0bf66c8cf9b30eeaa26a019bdb02d116ee0b 100644 --- a/src/thermophysicalModels/basic/Make/files +++ b/src/thermophysicalModels/basic/Make/files @@ -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 diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermo.C b/src/thermophysicalModels/basic/basicThermo/basicThermo.C index 7dc33f47c9bd3d8869398b70e4c0dcc7d1e59335..cb465edbf7b50f4e455540e4c5d261b71d076b72 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermo.C +++ b/src/thermophysicalModels/basic/basicThermo/basicThermo.C @@ -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; } } diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/enthalpyJump/enthalpyJumpFvPatchScalarField.C b/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJumpFvPatchScalarField.C similarity index 74% rename from src/thermophysicalModels/basic/derivedFvPatchFields/enthalpyJump/enthalpyJumpFvPatchScalarField.C rename to src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJumpFvPatchScalarField.C index 4337dd2ffb9c8e1f20b4fef88bfdc6d594634f2d..b86ac9ad0388eae69122776b8811b80f6da7e109 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/enthalpyJump/enthalpyJumpFvPatchScalarField.C +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJumpFvPatchScalarField.C @@ -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 ); } diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/enthalpyJump/enthalpyJumpFvPatchScalarField.H b/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJumpFvPatchScalarField.H similarity index 79% rename from src/thermophysicalModels/basic/derivedFvPatchFields/enthalpyJump/enthalpyJumpFvPatchScalarField.H rename to src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJumpFvPatchScalarField.H index 770e2a473949d86e5391c4c7c832389d5182be0d..6fb7820ee3cfa29e18a84016ca47e80d3dd0411f 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/enthalpyJump/enthalpyJumpFvPatchScalarField.H +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJumpFvPatchScalarField.H @@ -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) ); }