diff --git a/src/thermophysicalModels/basic/Make/files b/src/thermophysicalModels/basic/Make/files index 3ec888d37a..7068030692 100644 --- a/src/thermophysicalModels/basic/Make/files +++ b/src/thermophysicalModels/basic/Make/files @@ -10,8 +10,12 @@ rhoThermo/rhoThermos.C derivedFvPatchFields/fixedEnergy/fixedEnergyFvPatchScalarField.C derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.C derivedFvPatchFields/mixedEnergy/mixedEnergyFvPatchScalarField.C -derivedFvPatchFields/energyJump/energyJumpFvPatchScalarField.C -derivedFvPatchFields/temperatureJump/temperatureJumpFvPatchScalarField.C + +derivedFvPatchFields/energyJump/energyJump/energyJumpFvPatchScalarField.C +derivedFvPatchFields/energyJump/energyJumpAMI/energyJumpAMIFvPatchScalarField.C + +derivedFvPatchFields/temperatureJump/uniformTemperatureJump/uniformTemperatureJumpFvPatchScalarField.C +derivedFvPatchFields/temperatureJump/uniformTemperatureJumpAMI/uniformTemperatureJumpAMIFvPatchScalarField.C derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C diff --git a/src/thermophysicalModels/basic/Make/options b/src/thermophysicalModels/basic/Make/options index 16d886c766..5f64e9872d 100644 --- a/src/thermophysicalModels/basic/Make/options +++ b/src/thermophysicalModels/basic/Make/options @@ -1,8 +1,8 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude LIB_LIBS = \ - -lfiniteVolume \ - -L$(FOAM_USER_LIBBIN)/FvPatchScalarFieldEnthalpyJump + -lfiniteVolume diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJump/energyJumpFvPatchScalarField.C b/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJump/energyJumpFvPatchScalarField.C index 750252d4bc..6fee73614e 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJump/energyJumpFvPatchScalarField.C +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJump/energyJumpFvPatchScalarField.C @@ -25,7 +25,7 @@ License #include "addToRunTimeSelectionTable.H" #include "energyJumpFvPatchScalarField.H" -#include "temperatureJumpFvPatchScalarField.H" +#include "temperatureJumpBase.H" #include "basicThermo.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -108,8 +108,8 @@ void Foam::energyJumpFvPatchScalarField::updateCoeffs() label patchID = patch().index(); const scalarField& pp = thermo.p().boundaryField()[patchID]; - const temperatureJumpFvPatchScalarField& TbPatch = - refCast + const temperatureJumpBase& TbPatch = + refCast ( thermo.T().boundaryField()[patchID] ); diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJumpAMI/energyJumpAMIFvPatchScalarField.C b/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJumpAMI/energyJumpAMIFvPatchScalarField.C new file mode 100644 index 0000000000..01cbc40488 --- /dev/null +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJumpAMI/energyJumpAMIFvPatchScalarField.C @@ -0,0 +1,143 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +\*---------------------------------------------------------------------------*/ + +#include "addToRunTimeSelectionTable.H" +#include "energyJumpAMIFvPatchScalarField.H" +#include "temperatureJumpBase.H" +#include "basicThermo.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::energyJumpAMIFvPatchScalarField::energyJumpAMIFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF +) +: + fixedJumpAMIFvPatchField(p, iF) +{} + + +Foam::energyJumpAMIFvPatchScalarField::energyJumpAMIFvPatchScalarField +( + const energyJumpAMIFvPatchScalarField& ptf, + const fvPatch& p, + const DimensionedField& iF, + const fvPatchFieldMapper& mapper +) +: + fixedJumpAMIFvPatchField(ptf, p, iF, mapper) +{} + + +Foam::energyJumpAMIFvPatchScalarField::energyJumpAMIFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + fixedJumpAMIFvPatchField(p, iF) +{ + if (dict.found("value")) + { + fvPatchScalarField::operator= + ( + scalarField("value", dict, p.size()) + ); + } +} + + +Foam::energyJumpAMIFvPatchScalarField::energyJumpAMIFvPatchScalarField +( + const energyJumpAMIFvPatchScalarField& ptf +) +: + fixedJumpAMIFvPatchField(ptf) +{} + + +Foam::energyJumpAMIFvPatchScalarField::energyJumpAMIFvPatchScalarField +( + const energyJumpAMIFvPatchScalarField& ptf, + const DimensionedField& iF +) +: + fixedJumpAMIFvPatchField(ptf, iF) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::energyJumpAMIFvPatchScalarField::updateCoeffs() +{ + if (this->updated()) + { + return; + } + + if (this->cyclicAMIPatch().owner()) + { + const basicThermo& thermo = + db().lookupObject("thermophysicalProperties"); + + label patchID = patch().index(); + + const scalarField& pp = thermo.p().boundaryField()[patchID]; + const temperatureJumpBase& TbPatch = + refCast + ( + thermo.T().boundaryField()[patchID] + ); + + const labelUList& faceCells = this->patch().faceCells(); + + jump_ = thermo.he(pp, TbPatch.jump(), faceCells); + } + + fixedJumpAMIFvPatchField::updateCoeffs(); +} + + +void Foam::energyJumpAMIFvPatchScalarField::write(Ostream& os) const +{ + fixedJumpAMIFvPatchField::write(os); + this->writeEntry("value", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makePatchTypeField + ( + fvPatchScalarField, + energyJumpAMIFvPatchScalarField + ); +} + +// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJumpAMI/energyJumpAMIFvPatchScalarField.H b/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJumpAMI/energyJumpAMIFvPatchScalarField.H new file mode 100644 index 0000000000..d35859b5a4 --- /dev/null +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJumpAMI/energyJumpAMIFvPatchScalarField.H @@ -0,0 +1,164 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +Class + Foam::energyJumpAMIFvPatchScalarField + +Group + grpThermoBoundaryConditions grpCoupledBoundaryConditions + +Description + This boundary condition provides an energy jump condition across a pair + of coupled patches. + + \heading Patch usage + + \table + Property | Description | Required | Default value + jump | energy jump values | yes | + \endtable + + Example of the boundary condition specification: + \verbatim + myPatch + { + type energyJumpAMI; + jump uniform 100; + } + \endverbatim + +SeeAlso + Foam::fixedJumpFvPatchField + +SourceFiles + energyJumpAMIFvPatchScalarField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef energyJumpAMIFvPatchScalarField_H +#define energyJumpAMIFvPatchScalarField_H + +#include "fixedJumpAMIFvPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class energyJumpAMIFvPatchScalarField Declaration +\*---------------------------------------------------------------------------*/ + +class energyJumpAMIFvPatchScalarField +: + public fixedJumpAMIFvPatchField +{ + +public: + + //- Runtime type information + TypeName("energyJumpAMI"); + + // Constructors + + //- Construct from patch and internal field + energyJumpAMIFvPatchScalarField + ( + const fvPatch&, + const DimensionedField& + ); + + //- Construct from patch, internal field and dictionary + energyJumpAMIFvPatchScalarField + ( + const fvPatch&, + const DimensionedField&, + const dictionary& + ); + + //- Construct by mapping given energyJumpAMIFvPatchScalarField onto a + // new patch + energyJumpAMIFvPatchScalarField + ( + const energyJumpAMIFvPatchScalarField&, + const fvPatch&, + const DimensionedField&, + const fvPatchFieldMapper& + ); + + //- Construct as copy + energyJumpAMIFvPatchScalarField + ( + const energyJumpAMIFvPatchScalarField& + ); + + //- Construct and return a clone + virtual tmp > clone() const + { + return tmp > + ( + new energyJumpAMIFvPatchScalarField(*this) + ); + } + + //- Construct as copy setting internal field reference + energyJumpAMIFvPatchScalarField + ( + const energyJumpAMIFvPatchScalarField&, + const DimensionedField& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp > clone + ( + const DimensionedField& iF + ) const + { + return tmp > + ( + new energyJumpAMIFvPatchScalarField(*this, iF) + ); + } + + + // Member functions + + // Evaluation functions + + //- Update the coefficients + virtual void updateCoeffs(); + + + //- Write + virtual void write(Ostream&) const; +}; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/temperatureJump/temperatureJumpBase/temperatureJumpAMIBase.H b/src/thermophysicalModels/basic/derivedFvPatchFields/temperatureJump/temperatureJumpBase/temperatureJumpAMIBase.H new file mode 100644 index 0000000000..e8fea6b847 --- /dev/null +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/temperatureJump/temperatureJumpBase/temperatureJumpAMIBase.H @@ -0,0 +1,78 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +Description + Base class for temperature jump boundary conditions that provides access + to the jump field + +SourceFiles + temperatureJumpBase.C + +\*---------------------------------------------------------------------------*/ + +#ifndef temperatureJumpAMIBase_H +#define temperatureJumpAMIBase_H + +#include "typeInfo.H" +#include "scalarField.H" +#include "tmp.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class temperatureJumpAMIBase Declaration +\*---------------------------------------------------------------------------*/ + +class temperatureJumpAMIBase +{ + +public: + + //- Construct null + temperatureJumpAMIBase() + {} + + + //- Destructor + virtual ~temperatureJumpAMIBase() + {} + + + // Member functions + + //- Return a field of the temperature jump + virtual tmp jump() const = 0; +}; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/temperatureJump/temperatureJumpBase/temperatureJumpBase.H b/src/thermophysicalModels/basic/derivedFvPatchFields/temperatureJump/temperatureJumpBase/temperatureJumpBase.H new file mode 100644 index 0000000000..383066966c --- /dev/null +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/temperatureJump/temperatureJumpBase/temperatureJumpBase.H @@ -0,0 +1,81 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +Description + Base class for temperature jump boundary conditions that provides access + to the jump field + +SourceFiles + temperatureJumpBase.C + +\*---------------------------------------------------------------------------*/ + +#ifndef temperatureJumpBase_H +#define temperatureJumpBase_H + +#include "typeInfo.H" +#include "scalarField.H" +#include "tmp.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class temperatureJumpBase Declaration +\*---------------------------------------------------------------------------*/ + +class temperatureJumpBase +{ + +public: + + //- Runtime type information + TypeName("temperatureJumpBase"); + + //- Construct null + temperatureJumpBase() + {} + + + //-Destructor + virtual ~temperatureJumpBase() + {} + + + // Member functions + + //- Return a field of the temperature jump + virtual tmp jump() const = 0; +}; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/temperatureJump/uniformTemperatureJump/uniformTemperatureJumpFvPatchScalarField.C b/src/thermophysicalModels/basic/derivedFvPatchFields/temperatureJump/uniformTemperatureJump/uniformTemperatureJumpFvPatchScalarField.C new file mode 100644 index 0000000000..5e9a302c47 --- /dev/null +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/temperatureJump/uniformTemperatureJump/uniformTemperatureJumpFvPatchScalarField.C @@ -0,0 +1,100 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +\*---------------------------------------------------------------------------*/ + +#include "addToRunTimeSelectionTable.H" +#include "uniformTemperatureJumpFvPatchScalarField.H" +#include "volFields.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::uniformTemperatureJumpFvPatchScalarField:: +uniformTemperatureJumpFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF +) +: + uniformJumpFvPatchField(p, iF) +{} + + +Foam::uniformTemperatureJumpFvPatchScalarField:: +uniformTemperatureJumpFvPatchScalarField +( + const uniformTemperatureJumpFvPatchScalarField& ptf, + const fvPatch& p, + const DimensionedField& iF, + const fvPatchFieldMapper& mapper +) +: + uniformJumpFvPatchField(ptf, p, iF, mapper) +{} + + +Foam::uniformTemperatureJumpFvPatchScalarField:: +uniformTemperatureJumpFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + uniformJumpFvPatchField(p, iF) +{} + + +Foam::uniformTemperatureJumpFvPatchScalarField:: +uniformTemperatureJumpFvPatchScalarField +( + const uniformTemperatureJumpFvPatchScalarField& ptf +) +: + uniformJumpFvPatchField(ptf) +{} + + +Foam::uniformTemperatureJumpFvPatchScalarField:: +uniformTemperatureJumpFvPatchScalarField +( + const uniformTemperatureJumpFvPatchScalarField& ptf, + const DimensionedField& iF +) +: + uniformJumpFvPatchField(ptf, iF) +{} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makePatchTypeField + ( + fvPatchScalarField, + uniformTemperatureJumpFvPatchScalarField + ); +} + +// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/temperatureJump/uniformTemperatureJump/uniformTemperatureJumpFvPatchScalarField.H b/src/thermophysicalModels/basic/derivedFvPatchFields/temperatureJump/uniformTemperatureJump/uniformTemperatureJumpFvPatchScalarField.H new file mode 100644 index 0000000000..d683d9adfb --- /dev/null +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/temperatureJump/uniformTemperatureJump/uniformTemperatureJumpFvPatchScalarField.H @@ -0,0 +1,175 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +Class + Foam::uniformTemperatureJumpFvPatchScalarField + +Group + grpCoupledBoundaryConditions + +Description + This boundary condition provides a temperature jump condition across a + coupled pair of cyclic patches when solving for energy. + + The jump is specified as a \c DataEntry type, to enable the use of, e.g. + contant, polynomial, table values. + + \heading Patch usage + + \table + Property | Description | Required | Default value + patchType | underlying patch type should be \c cyclic| yes | + jump | current jump value | yes | + jumpTable | jump data, e.g. \c csvFile | yes | + \endtable + + Example of the boundary condition specification: + \verbatim + myPatch + { + type uniformTemperatureJump; + patchType cyclic; + jumpTable constant 100; + value uniform 300; + } + \endverbatim + + The above example shows the use of a constant jump condition. + +Note + The underlying \c patchType should be set to \c cyclic + +SeeAlso + Foam::uniformJumpFvPatchField + Foam::energyJumpFvPatchScalarField + +SourceFiles + uniformTemperatureJumpFvPatchScalarField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef uniformTemperatureJumpFvPatchScalarField_H +#define uniformTemperatureJumpFvPatchScalarField_H + +#include "temperatureJumpBase.H" +#include "uniformJumpFvPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class uniformTemperatureJumpFvPatchScalarField Declaration +\*---------------------------------------------------------------------------*/ + +class uniformTemperatureJumpFvPatchScalarField +: + public temperatureJumpBase, + public uniformJumpFvPatchField +{ + +public: + + //- Runtime type information + TypeName("uniformTemperatureJump"); + + // Constructors + + //- Construct from patch and internal field + uniformTemperatureJumpFvPatchScalarField + ( + const fvPatch&, + const DimensionedField& + ); + + //- Construct from patch, internal field and dictionary + uniformTemperatureJumpFvPatchScalarField + ( + const fvPatch&, + const DimensionedField&, + const dictionary& + ); + + //- Construct by mapping given uniformTemperatureJumpFvPatchScalarField onto a + // new patch + uniformTemperatureJumpFvPatchScalarField + ( + const uniformTemperatureJumpFvPatchScalarField&, + const fvPatch&, + const DimensionedField&, + const fvPatchFieldMapper& + ); + + //- Construct as copy + uniformTemperatureJumpFvPatchScalarField + ( + const uniformTemperatureJumpFvPatchScalarField& + ); + + //- Construct and return a clone + virtual tmp > clone() const + { + return tmp > + ( + new uniformTemperatureJumpFvPatchScalarField(*this) + ); + } + + //- Construct as copy setting internal field reference + uniformTemperatureJumpFvPatchScalarField + ( + const uniformTemperatureJumpFvPatchScalarField&, + const DimensionedField& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp > clone + ( + const DimensionedField& iF + ) const + { + return tmp > + ( + new uniformTemperatureJumpFvPatchScalarField(*this, iF) + ); + } + + + // Member Functions + + virtual tmp > jump() const + { + return uniformJumpFvPatchField::jump(); + } +}; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/temperatureJump/uniformTemperatureJumpAMI/uniformTemperatureJumpAMIFvPatchScalarField.C b/src/thermophysicalModels/basic/derivedFvPatchFields/temperatureJump/uniformTemperatureJumpAMI/uniformTemperatureJumpAMIFvPatchScalarField.C new file mode 100644 index 0000000000..379fffb7e3 --- /dev/null +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/temperatureJump/uniformTemperatureJumpAMI/uniformTemperatureJumpAMIFvPatchScalarField.C @@ -0,0 +1,100 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +\*---------------------------------------------------------------------------*/ + +#include "addToRunTimeSelectionTable.H" +#include "uniformTemperatureJumpAMIFvPatchScalarField.H" +#include "volFields.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::uniformTemperatureJumpAMIFvPatchScalarField:: +uniformTemperatureJumpAMIFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF +) +: + uniformJumpAMIFvPatchField(p, iF) +{} + + +Foam::uniformTemperatureJumpAMIFvPatchScalarField:: +uniformTemperatureJumpAMIFvPatchScalarField +( + const uniformTemperatureJumpAMIFvPatchScalarField& ptf, + const fvPatch& p, + const DimensionedField& iF, + const fvPatchFieldMapper& mapper +) +: + uniformJumpAMIFvPatchField(ptf, p, iF, mapper) +{} + + +Foam::uniformTemperatureJumpAMIFvPatchScalarField:: +uniformTemperatureJumpAMIFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + uniformJumpAMIFvPatchField(p, iF) +{} + + +Foam::uniformTemperatureJumpAMIFvPatchScalarField:: +uniformTemperatureJumpAMIFvPatchScalarField +( + const uniformTemperatureJumpAMIFvPatchScalarField& ptf +) +: + uniformJumpAMIFvPatchField(ptf) +{} + + +Foam::uniformTemperatureJumpAMIFvPatchScalarField:: +uniformTemperatureJumpAMIFvPatchScalarField +( + const uniformTemperatureJumpAMIFvPatchScalarField& ptf, + const DimensionedField& iF +) +: + uniformJumpAMIFvPatchField(ptf, iF) +{} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makePatchTypeField + ( + fvPatchScalarField, + uniformTemperatureJumpAMIFvPatchScalarField + ); +} + +// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/temperatureJump/uniformTemperatureJumpAMI/uniformTemperatureJumpAMIFvPatchScalarField.H b/src/thermophysicalModels/basic/derivedFvPatchFields/temperatureJump/uniformTemperatureJumpAMI/uniformTemperatureJumpAMIFvPatchScalarField.H new file mode 100644 index 0000000000..0697a3cb97 --- /dev/null +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/temperatureJump/uniformTemperatureJumpAMI/uniformTemperatureJumpAMIFvPatchScalarField.H @@ -0,0 +1,175 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +Class + Foam::uniformTemperatureJumpAMIFvPatchScalarField + +Group + grpCoupledBoundaryConditions + +Description + This boundary condition provides a temperature jump condition across a + coupled pair of cyclic patches when solving for energy. + + The jump is specified as a \c DataEntry type, to enable the use of, e.g. + contant, polynomial, table values. + + \heading Patch usage + + \table + Property | Description | Required | Default value + patchType | underlying patch type should be \c cyclic| yes | + jump | current jump value | yes | + jumpTable | jump data, e.g. \c csvFile | yes | + \endtable + + Example of the boundary condition specification: + \verbatim + myPatch + { + type uniformTemperatureJumpAMI; + patchType cyclic; + jumpTable constant 100; + value uniform 300; + } + \endverbatim + + The above example shows the use of a constant jump condition. + +Note + The underlying \c patchType should be set to \c cyclic + +SeeAlso + Foam::uniformJumpFvPatchField + Foam::energyJumpFvPatchScalarField + +SourceFiles + uniformTemperatureJumpAMIFvPatchScalarField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef uniformTemperatureJumpAMIFvPatchScalarField_H +#define uniformTemperatureJumpAMIFvPatchScalarField_H + +#include "temperatureJumpAMIBase.H" +#include "uniformJumpAMIFvPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class uniformTemperatureJumpAMIFvPatchScalarField Declaration +\*---------------------------------------------------------------------------*/ + +class uniformTemperatureJumpAMIFvPatchScalarField +: + public temperatureJumpAMIBase, + public uniformJumpAMIFvPatchField +{ + +public: + + //- Runtime type information + TypeName("uniformTemperatureJumpAMI"); + + // Constructors + + //- Construct from patch and internal field + uniformTemperatureJumpAMIFvPatchScalarField + ( + const fvPatch&, + const DimensionedField& + ); + + //- Construct from patch, internal field and dictionary + uniformTemperatureJumpAMIFvPatchScalarField + ( + const fvPatch&, + const DimensionedField&, + const dictionary& + ); + + //- Construct by mapping given + // uniformTemperatureJumpAMIFvPatchScalarField onto a new patch + uniformTemperatureJumpAMIFvPatchScalarField + ( + const uniformTemperatureJumpAMIFvPatchScalarField&, + const fvPatch&, + const DimensionedField&, + const fvPatchFieldMapper& + ); + + //- Construct as copy + uniformTemperatureJumpAMIFvPatchScalarField + ( + const uniformTemperatureJumpAMIFvPatchScalarField& + ); + + //- Construct and return a clone + virtual tmp > clone() const + { + return tmp > + ( + new uniformTemperatureJumpAMIFvPatchScalarField(*this) + ); + } + + //- Construct as copy setting internal field reference + uniformTemperatureJumpAMIFvPatchScalarField + ( + const uniformTemperatureJumpAMIFvPatchScalarField&, + const DimensionedField& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp > clone + ( + const DimensionedField& iF + ) const + { + return tmp > + ( + new uniformTemperatureJumpAMIFvPatchScalarField(*this, iF) + ); + } + + + // Member Functions + + virtual tmp > jump() const + { + return uniformJumpAMIFvPatchField::jump(); + } +}; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/heThermo/heThermo.C b/src/thermophysicalModels/basic/heThermo/heThermo.C index 4cace54980..d0b455b7aa 100644 --- a/src/thermophysicalModels/basic/heThermo/heThermo.C +++ b/src/thermophysicalModels/basic/heThermo/heThermo.C @@ -28,8 +28,10 @@ License #include "fixedEnergyFvPatchScalarField.H" #include "gradientEnergyFvPatchScalarField.H" #include "mixedEnergyFvPatchScalarField.H" -#include "temperatureJumpFvPatchScalarField.H" +#include "temperatureJumpBase.H" +#include "temperatureJumpAMIBase.H" #include "energyJumpFvPatchScalarField.H" +#include "energyJumpAMIFvPatchScalarField.H" // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // @@ -59,10 +61,14 @@ Foam::wordList Foam::heThermo::heBoundaryTypes() { hbt[patchi] = mixedEnergyFvPatchScalarField::typeName; } - else if (isA(tbf[patchi])) + else if (isA(tbf[patchi])) { hbt[patchi] = energyJumpFvPatchScalarField::typeName; } + else if (isA(tbf[patchi])) + { + hbt[patchi] = energyJumpAMIFvPatchScalarField::typeName; + } } return hbt;