From 1ae61659fa5c7bccf1d5ece23f61c99a61d486ad Mon Sep 17 00:00:00 2001 From: Henry Date: Sun, 3 Feb 2013 22:01:22 +0000 Subject: [PATCH 1/8] interPhaseChangeFoam: No need to check continuity error and the velocity divergence defines the compressibility effect --- applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H | 2 -- 1 file changed, 2 deletions(-) diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H index 7ff971ed7f..817db5012c 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H @@ -49,8 +49,6 @@ } } - #include "continuityErrs.H" - p == p_rgh + rho*gh; if (p_rgh.needReference()) From 91a54847c286c2577f7a52a6137d884ed03f5d62 Mon Sep 17 00:00:00 2001 From: Henry Date: Tue, 5 Feb 2013 14:49:58 +0000 Subject: [PATCH 2/8] Rename thermoBaffle -> thermalBaffle --- src/regionModels/Allwclean | 2 +- src/regionModels/Allwmake | 2 +- .../mappedVariableThicknessWallFvPatch.C | 2 +- .../thermalBaffleModels/Make/files | 9 ++++ .../Make/options | 0 .../doc/thermalBaffleBoundaryConditionsDoc.H} | 0 .../thermalBaffleFvPatchScalarField.C} | 42 +++++++-------- .../thermalBaffleFvPatchScalarField.H} | 42 +++++++-------- .../noThermo/noThermo.C | 12 ++--- .../noThermo/noThermo.H | 8 +-- .../thermalBaffle/thermalBaffle.C} | 52 +++++++++---------- .../thermalBaffle/thermalBaffle.H} | 38 +++++++------- .../thermalBaffle/thermalBaffleI.H} | 10 ++-- .../thermalBaffleModel/thermalBaffleModel.C} | 44 +++++++++------- .../thermalBaffleModel/thermalBaffleModel.H} | 38 +++++++------- .../thermalBaffleModelNew.C} | 36 +++++++------ .../thermoBaffleModels/Make/files | 9 ---- .../compressible/turbulenceModel/Make/files | 4 +- .../thermalBaffle1DFvPatchScalarField.C} | 42 +++++++-------- .../thermalBaffle1DFvPatchScalarField.H} | 38 +++++++------- .../thermalBaffle1DFvPatchScalarFields.C} | 14 ++--- .../thermalBaffle1DFvPatchScalarFields.H} | 14 ++--- ...ffleProperties => thermalBaffleProperties} | 6 +-- .../system/baffleRegion/changeDictionaryDict | 2 +- .../system/changeDictionaryDict | 2 +- .../system/changeDictionaryDict.baffle | 2 +- .../system/changeDictionaryDict.baffleRegion | 6 +-- .../circuitBoardCooling/system/controlDict | 2 +- .../system/createBafflesDict | 2 +- 29 files changed, 243 insertions(+), 237 deletions(-) create mode 100644 src/regionModels/thermalBaffleModels/Make/files rename src/regionModels/{thermoBaffleModels => thermalBaffleModels}/Make/options (100%) rename src/regionModels/{thermoBaffleModels/derivedFvPatchFields/doc/thermoBaffleBoundaryConditionsDoc.H => thermalBaffleModels/derivedFvPatchFields/doc/thermalBaffleBoundaryConditionsDoc.H} (100%) rename src/regionModels/{thermoBaffleModels/derivedFvPatchFields/thermoBaffle/thermoBaffleFvPatchScalarField.C => thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C} (85%) rename src/regionModels/{thermoBaffleModels/derivedFvPatchFields/thermoBaffle/thermoBaffleFvPatchScalarField.H => thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.H} (85%) rename src/regionModels/{thermoBaffleModels => thermalBaffleModels}/noThermo/noThermo.C (93%) rename src/regionModels/{thermoBaffleModels => thermalBaffleModels}/noThermo/noThermo.H (96%) rename src/regionModels/{thermoBaffleModels/thermoBaffle/thermoBaffle.C => thermalBaffleModels/thermalBaffle/thermalBaffle.C} (87%) rename src/regionModels/{thermoBaffleModels/thermoBaffle/thermoBaffle.H => thermalBaffleModels/thermalBaffle/thermalBaffle.H} (88%) rename src/regionModels/{thermoBaffleModels/thermoBaffle/thermoBaffleI.H => thermalBaffleModels/thermalBaffle/thermalBaffleI.H} (90%) rename src/regionModels/{thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.C => thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C} (86%) rename src/regionModels/{thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.H => thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.H} (87%) rename src/regionModels/{thermoBaffleModels/thermoBaffleModel/thermoBaffleModelNew.C => thermalBaffleModels/thermalBaffleModel/thermalBaffleModelNew.C} (72%) delete mode 100644 src/regionModels/thermoBaffleModels/Make/files rename src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/{thermoBaffle1D/thermoBaffle1DFvPatchScalarField.C => thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C} (90%) rename src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/{thermoBaffle1D/thermoBaffle1DFvPatchScalarField.H => thermalBaffle1D/thermalBaffle1DFvPatchScalarField.H} (82%) rename src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/{thermoBaffle1D/thermoBaffle1DFvPatchScalarFields.C => thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.C} (83%) rename src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/{thermoBaffle1D/thermoBaffle1DFvPatchScalarFields.H => thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.H} (84%) rename tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/{thermoBaffleProperties => thermalBaffleProperties} (91%) diff --git a/src/regionModels/Allwclean b/src/regionModels/Allwclean index def3e82f78..f95d816a53 100755 --- a/src/regionModels/Allwclean +++ b/src/regionModels/Allwclean @@ -6,7 +6,7 @@ set -x wclean $makeType regionModel wclean $makeType pyrolysisModels wclean $makeType surfaceFilmModels -wclean $makeType thermoBaffleModels +wclean $makeType thermalBaffleModels wclean $makeType regionCoupling diff --git a/src/regionModels/Allwmake b/src/regionModels/Allwmake index 5c97cae02b..0ca6e6338a 100755 --- a/src/regionModels/Allwmake +++ b/src/regionModels/Allwmake @@ -6,7 +6,7 @@ set -x wmake $makeType regionModel wmake $makeType pyrolysisModels wmake $makeType surfaceFilmModels -wmake $makeType thermoBaffleModels +wmake $makeType thermalBaffleModels wmake $makeType regionCoupling diff --git a/src/regionModels/regionModel/derivedFvPatches/mappedVariableThicknessWall/mappedVariableThicknessWallFvPatch.C b/src/regionModels/regionModel/derivedFvPatches/mappedVariableThicknessWall/mappedVariableThicknessWallFvPatch.C index 74a4416e2d..18b7362329 100644 --- a/src/regionModels/regionModel/derivedFvPatches/mappedVariableThicknessWall/mappedVariableThicknessWallFvPatch.C +++ b/src/regionModels/regionModel/derivedFvPatches/mappedVariableThicknessWall/mappedVariableThicknessWallFvPatch.C @@ -54,7 +54,7 @@ makeDeltaCoeffs(scalarField& dc) const const modelType& region1D = patch().boundaryMesh().mesh().time().lookupObject ( - "thermoBaffleProperties" + "thermalBaffleProperties" ); dc = 2.0/(pp.thickness()/region1D.nLayers()); diff --git a/src/regionModels/thermalBaffleModels/Make/files b/src/regionModels/thermalBaffleModels/Make/files new file mode 100644 index 0000000000..dd0a6ebada --- /dev/null +++ b/src/regionModels/thermalBaffleModels/Make/files @@ -0,0 +1,9 @@ +thermalBaffleModel/thermalBaffleModel.C +thermalBaffleModel/thermalBaffleModelNew.C +thermalBaffle/thermalBaffle.C +noThermo/noThermo.C + +derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C + + +LIB = $(FOAM_LIBBIN)/libthermalBaffleModels diff --git a/src/regionModels/thermoBaffleModels/Make/options b/src/regionModels/thermalBaffleModels/Make/options similarity index 100% rename from src/regionModels/thermoBaffleModels/Make/options rename to src/regionModels/thermalBaffleModels/Make/options diff --git a/src/regionModels/thermoBaffleModels/derivedFvPatchFields/doc/thermoBaffleBoundaryConditionsDoc.H b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/doc/thermalBaffleBoundaryConditionsDoc.H similarity index 100% rename from src/regionModels/thermoBaffleModels/derivedFvPatchFields/doc/thermoBaffleBoundaryConditionsDoc.H rename to src/regionModels/thermalBaffleModels/derivedFvPatchFields/doc/thermalBaffleBoundaryConditionsDoc.H diff --git a/src/regionModels/thermoBaffleModels/derivedFvPatchFields/thermoBaffle/thermoBaffleFvPatchScalarField.C b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C similarity index 85% rename from src/regionModels/thermoBaffleModels/derivedFvPatchFields/thermoBaffle/thermoBaffleFvPatchScalarField.C rename to src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C index 471295924e..408076b482 100644 --- a/src/regionModels/thermoBaffleModels/derivedFvPatchFields/thermoBaffle/thermoBaffleFvPatchScalarField.C +++ b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C @@ -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& iF @@ -49,10 +49,10 @@ thermoBaffleFvPatchScalarField {} -thermoBaffleFvPatchScalarField:: -thermoBaffleFvPatchScalarField +thermalBaffleFvPatchScalarField:: +thermalBaffleFvPatchScalarField ( - const thermoBaffleFvPatchScalarField& ptf, + const thermalBaffleFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField& iF, const fvPatchFieldMapper& mapper @@ -71,8 +71,8 @@ thermoBaffleFvPatchScalarField {} -thermoBaffleFvPatchScalarField:: -thermoBaffleFvPatchScalarField +thermalBaffleFvPatchScalarField:: +thermalBaffleFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF, @@ -88,8 +88,8 @@ thermoBaffleFvPatchScalarField { FatalErrorIn ( - "thermoBaffleFvPatchScalarField::" - "thermoBaffleFvPatchScalarField\n" + "thermalBaffleFvPatchScalarField::" + "thermalBaffleFvPatchScalarField\n" "(\n" " const fvPatch& p,\n" " const DimensionedField& 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& 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 ); diff --git a/src/regionModels/thermoBaffleModels/derivedFvPatchFields/thermoBaffle/thermoBaffleFvPatchScalarField.H b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.H similarity index 85% rename from src/regionModels/thermoBaffleModels/derivedFvPatchFields/thermoBaffle/thermoBaffleFvPatchScalarField.H rename to src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.H index a3fa62d442..7015f378df 100644 --- a/src/regionModels/thermoBaffleModels/derivedFvPatchFields/thermoBaffle/thermoBaffleFvPatchScalarField.H +++ b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . 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 baffle_; + autoPtr 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& ); //- Construct from patch, internal field and dictionary - thermoBaffleFvPatchScalarField + thermalBaffleFvPatchScalarField ( const fvPatch&, const DimensionedField&, @@ -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&, const fvPatchFieldMapper& @@ -195,14 +195,14 @@ public: { return tmp ( - new thermoBaffleFvPatchScalarField(*this) + new thermalBaffleFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - thermoBaffleFvPatchScalarField + thermalBaffleFvPatchScalarField ( - const thermoBaffleFvPatchScalarField&, + const thermalBaffleFvPatchScalarField&, const DimensionedField& ); @@ -214,7 +214,7 @@ public: { return tmp ( - new thermoBaffleFvPatchScalarField(*this, iF) + new thermalBaffleFvPatchScalarField(*this, iF) ); } diff --git a/src/regionModels/thermoBaffleModels/noThermo/noThermo.C b/src/regionModels/thermalBaffleModels/noThermo/noThermo.C similarity index 93% rename from src/regionModels/thermoBaffleModels/noThermo/noThermo.C rename to src/regionModels/thermalBaffleModels/noThermo/noThermo.C index 1175a0d792..ea62beed56 100644 --- a/src/regionModels/thermoBaffleModels/noThermo/noThermo.C +++ b/src/regionModels/thermalBaffleModels/noThermo/noThermo.C @@ -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 diff --git a/src/regionModels/thermoBaffleModels/noThermo/noThermo.H b/src/regionModels/thermalBaffleModels/noThermo/noThermo.H similarity index 96% rename from src/regionModels/thermoBaffleModels/noThermo/noThermo.H rename to src/regionModels/thermalBaffleModels/noThermo/noThermo.H index 8144dad586..cf85fa1901 100644 --- a/src/regionModels/thermoBaffleModels/noThermo/noThermo.H +++ b/src/regionModels/thermalBaffleModels/noThermo/noThermo.H @@ -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 diff --git a/src/regionModels/thermoBaffleModels/thermoBaffle/thermoBaffle.C b/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C similarity index 87% rename from src/regionModels/thermoBaffleModels/thermoBaffle/thermoBaffle.C rename to src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C index 9044f71fa2..ed9cbd0021 100644 --- a/src/regionModels/thermoBaffleModels/thermoBaffle/thermoBaffle.C +++ b/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C @@ -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 thermoBaffle::Cp() const +const tmp 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 diff --git a/src/regionModels/thermoBaffleModels/thermoBaffle/thermoBaffle.H b/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.H similarity index 88% rename from src/regionModels/thermoBaffleModels/thermoBaffle/thermoBaffle.H rename to src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.H index 93fcf19fd6..d706b4864a 100644 --- a/src/regionModels/thermoBaffleModels/thermoBaffle/thermoBaffle.H +++ b/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.H @@ -22,21 +22,21 @@ License along with OpenFOAM. If not, see . 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" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/regionModels/thermoBaffleModels/thermoBaffle/thermoBaffleI.H b/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffleI.H similarity index 90% rename from src/regionModels/thermoBaffleModels/thermoBaffle/thermoBaffleI.H rename to src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffleI.H index 107274f65e..c2977f177d 100644 --- a/src/regionModels/thermoBaffleModels/thermoBaffle/thermoBaffleI.H +++ b/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffleI.H @@ -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 thermoBaffle::he +inline tmp thermalBaffle::he ( const scalarField& p, const scalarField& T, @@ -49,7 +49,7 @@ inline tmp thermoBaffle::he } -inline tmp thermoBaffle::he() const +inline tmp thermalBaffle::he() const { return thermo_->he(); } @@ -57,7 +57,7 @@ inline tmp thermoBaffle::he() const // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace thermoBaffleModels +} // End namespace thermalBaffleModels } // End namespace regionModels } // End namespace Foam diff --git a/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.C b/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C similarity index 86% rename from src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.C rename to src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C index ff38797a14..7d8754717c 100644 --- a/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.C +++ b/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C @@ -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 diff --git a/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.H b/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.H similarity index 87% rename from src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.H rename to src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.H index d55d6c5ee9..e819a128be 100644 --- a/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.H +++ b/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.H @@ -22,17 +22,17 @@ License along with OpenFOAM. If not, see . 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 New(const fvMesh& mesh); + static autoPtr New(const fvMesh& mesh); //- Return a reference to the selected model using dictionary - static autoPtr New + static autoPtr 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 diff --git a/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModelNew.C b/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModelNew.C similarity index 72% rename from src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModelNew.C rename to src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModelNew.C index 4261b9f48f..08d4368c27 100644 --- a/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModelNew.C +++ b/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModelNew.C @@ -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::New(const fvMesh& mesh) +autoPtr 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::New(const fvMesh& mesh) ) ); - thermoBafflePropertiesDict.lookup("thermoBaffleModel") >> modelType; + thermalBafflePropertiesDict.lookup("thermalBaffleModel") >> modelType; } Info<< "Selecting baffle model " << modelType << endl; @@ -64,25 +64,25 @@ autoPtr 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(cstrIter()(modelType, mesh)); + return autoPtr(cstrIter()(modelType, mesh)); } -autoPtr thermoBaffleModel::New +autoPtr 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::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(cstrIter()(modelType, mesh, dict)); + return autoPtr(cstrIter()(modelType, mesh, dict)); } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace thermoBaffleModels +} // End namespace thermalBaffleModels } // End namespace regionModels } // End namespace Foam diff --git a/src/regionModels/thermoBaffleModels/Make/files b/src/regionModels/thermoBaffleModels/Make/files deleted file mode 100644 index 2799f6460b..0000000000 --- a/src/regionModels/thermoBaffleModels/Make/files +++ /dev/null @@ -1,9 +0,0 @@ -thermoBaffleModel/thermoBaffleModel.C -thermoBaffleModel/thermoBaffleModelNew.C -thermoBaffle/thermoBaffle.C -noThermo/noThermo.C - -derivedFvPatchFields/thermoBaffle/thermoBaffleFvPatchScalarField.C - - -LIB = $(FOAM_LIBBIN)/libthermoBaffleModels diff --git a/src/turbulenceModels/compressible/turbulenceModel/Make/files b/src/turbulenceModels/compressible/turbulenceModel/Make/files index e089735210..5bb1f79ba9 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/Make/files +++ b/src/turbulenceModels/compressible/turbulenceModel/Make/files @@ -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 diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermoBaffle1D/thermoBaffle1DFvPatchScalarField.C b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C similarity index 90% rename from src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermoBaffle1D/thermoBaffle1DFvPatchScalarField.C rename to src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C index 2d4f331e20..1ccc6f7fa3 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermoBaffle1D/thermoBaffle1DFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C @@ -39,8 +39,8 @@ namespace compressible // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -thermoBaffle1DFvPatchScalarField:: -thermoBaffle1DFvPatchScalarField +thermalBaffle1DFvPatchScalarField:: +thermalBaffle1DFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF @@ -56,10 +56,10 @@ thermoBaffle1DFvPatchScalarField template -thermoBaffle1DFvPatchScalarField:: -thermoBaffle1DFvPatchScalarField +thermalBaffle1DFvPatchScalarField:: +thermalBaffle1DFvPatchScalarField ( - const thermoBaffle1DFvPatchScalarField& ptf, + const thermalBaffle1DFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField& iF, const fvPatchFieldMapper& mapper @@ -75,8 +75,8 @@ thermoBaffle1DFvPatchScalarField template -thermoBaffle1DFvPatchScalarField:: -thermoBaffle1DFvPatchScalarField +thermalBaffle1DFvPatchScalarField:: +thermalBaffle1DFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF, @@ -94,8 +94,8 @@ thermoBaffle1DFvPatchScalarField { FatalErrorIn ( - "thermoBaffle1DFvPatchScalarField::" - "thermoBaffle1DFvPatchScalarField" + "thermalBaffle1DFvPatchScalarField::" + "thermalBaffle1DFvPatchScalarField" "(" "const fvPatch&,\n" "const DimensionedField&, " @@ -130,10 +130,10 @@ thermoBaffle1DFvPatchScalarField template -thermoBaffle1DFvPatchScalarField:: -thermoBaffle1DFvPatchScalarField +thermalBaffle1DFvPatchScalarField:: +thermalBaffle1DFvPatchScalarField ( - const thermoBaffle1DFvPatchScalarField& ptf + const thermalBaffle1DFvPatchScalarField& ptf ) : mixedFvPatchScalarField(ptf), @@ -146,10 +146,10 @@ thermoBaffle1DFvPatchScalarField template -thermoBaffle1DFvPatchScalarField:: -thermoBaffle1DFvPatchScalarField +thermalBaffle1DFvPatchScalarField:: +thermalBaffle1DFvPatchScalarField ( - const thermoBaffle1DFvPatchScalarField& ptf, + const thermalBaffle1DFvPatchScalarField& ptf, const DimensionedField& iF ) : @@ -165,7 +165,7 @@ thermoBaffle1DFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template -void thermoBaffle1DFvPatchScalarField::autoMap +void thermalBaffle1DFvPatchScalarField::autoMap ( const fvPatchFieldMapper& m ) @@ -174,7 +174,7 @@ void thermoBaffle1DFvPatchScalarField::autoMap } template -void thermoBaffle1DFvPatchScalarField::rmap +void thermalBaffle1DFvPatchScalarField::rmap ( const fvPatchScalarField& ptf, const labelList& addr @@ -185,7 +185,7 @@ void thermoBaffle1DFvPatchScalarField::rmap template -void thermoBaffle1DFvPatchScalarField::updateCoeffs() +void thermalBaffle1DFvPatchScalarField::updateCoeffs() { if (updated()) { @@ -242,8 +242,8 @@ void thermoBaffle1DFvPatchScalarField::updateCoeffs() ); mpp.map().distribute(nbrQDot); - const thermoBaffle1DFvPatchScalarField& nbrField = - refCast + const thermalBaffle1DFvPatchScalarField& nbrField = + refCast ( nbrPatch.template lookupPatchField(TName_) ); @@ -347,7 +347,7 @@ void thermoBaffle1DFvPatchScalarField::updateCoeffs() } template -void thermoBaffle1DFvPatchScalarField:: +void thermalBaffle1DFvPatchScalarField:: write(Ostream& os) const { mixedFvPatchScalarField::write(os); diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermoBaffle1D/thermoBaffle1DFvPatchScalarField.H b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.H similarity index 82% rename from src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermoBaffle1D/thermoBaffle1DFvPatchScalarField.H rename to src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.H index 33a26f39fd..5e6bccf4c9 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermoBaffle1D/thermoBaffle1DFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.H @@ -22,19 +22,19 @@ License along with OpenFOAM. If not, see . 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 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& ); //- Construct from patch, internal field and dictionary - thermoBaffle1DFvPatchScalarField + thermalBaffle1DFvPatchScalarField ( const fvPatch&, const DimensionedField&, @@ -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&, const fvPatchFieldMapper& ); //- Construct as copy - thermoBaffle1DFvPatchScalarField + thermalBaffle1DFvPatchScalarField ( - const thermoBaffle1DFvPatchScalarField& + const thermalBaffle1DFvPatchScalarField& ); //- Construct and return a clone @@ -118,14 +118,14 @@ public: { return tmp ( - new thermoBaffle1DFvPatchScalarField(*this) + new thermalBaffle1DFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - thermoBaffle1DFvPatchScalarField + thermalBaffle1DFvPatchScalarField ( - const thermoBaffle1DFvPatchScalarField&, + const thermalBaffle1DFvPatchScalarField&, const DimensionedField& ); @@ -137,7 +137,7 @@ public: { return tmp ( - new thermoBaffle1DFvPatchScalarField(*this, iF) + new thermalBaffle1DFvPatchScalarField(*this, iF) ); } @@ -176,7 +176,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository -# include "thermoBaffle1DFvPatchScalarField.C" +# include "thermalBaffle1DFvPatchScalarField.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermoBaffle1D/thermoBaffle1DFvPatchScalarFields.C b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.C similarity index 83% rename from src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermoBaffle1D/thermoBaffle1DFvPatchScalarFields.C rename to src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.C index 2e180238f4..979980cff5 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermoBaffle1D/thermoBaffle1DFvPatchScalarFields.C +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.C @@ -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", + constSolid_thermalBaffle1DFvPatchScalarField, + "compressible::thermalBaffle1D", 0 ); addToPatchFieldRunTimeSelection ( fvPatchScalarField, - constSolid_thermoBaffle1DFvPatchScalarField + constSolid_thermalBaffle1DFvPatchScalarField ); defineTemplateTypeNameAndDebugWithName ( - expoSolid_thermoBaffle1DFvPatchScalarField, - "compressible::thermoBaffle1D", + expoSolid_thermalBaffle1DFvPatchScalarField, + "compressible::thermalBaffle1D", 0 ); addToPatchFieldRunTimeSelection ( fvPatchScalarField, - expoSolid_thermoBaffle1DFvPatchScalarField + expoSolid_thermalBaffle1DFvPatchScalarField ); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermoBaffle1D/thermoBaffle1DFvPatchScalarFields.H b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.H similarity index 84% rename from src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermoBaffle1D/thermoBaffle1DFvPatchScalarFields.H rename to src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.H index 931aeaae07..14f88a25c6 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermoBaffle1D/thermoBaffle1DFvPatchScalarFields.H +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.H @@ -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; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/thermoBaffleProperties b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/thermalBaffleProperties similarity index 91% rename from tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/thermoBaffleProperties rename to tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/thermalBaffleProperties index acabb40438..9a2dade638 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/thermoBaffleProperties +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/thermalBaffleProperties @@ -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 { } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/baffleRegion/changeDictionaryDict b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/baffleRegion/changeDictionaryDict index 1931c502a6..c325fcd699 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/baffleRegion/changeDictionaryDict +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/baffleRegion/changeDictionaryDict @@ -22,7 +22,7 @@ dictionaryReplacement { "region0_to.*" { - type compressible::thermoBaffle; + type compressible::thermalBaffle; neighbourFieldName T; kappa solidThermo; kappaName none; diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict index 6146edeb2b..0674354a50 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict @@ -88,7 +88,7 @@ dictionaryReplacement { "baffle.*" { - type compressible::thermoBaffle1D; + type compressible::thermalBaffle1D; baffleActivated yes; thickness uniform 0.005; // thickness [m] Qs uniform 100; // heat flux [W/m2] diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict.baffle b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict.baffle index d2933855c5..1df570730c 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict.baffle +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict.baffle @@ -88,7 +88,7 @@ dictionaryReplacement { "baffle1Wall.*" { - type compressible::thermoBaffle1D; + type compressible::thermalBaffle1D; baffleActivated yes; thickness uniform 0.005; // thickness [m] Qs uniform 100; // heat flux [W/m2] diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict.baffleRegion b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict.baffleRegion index 1cbf29f10c..dae4c6fe77 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict.baffleRegion +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict.baffleRegion @@ -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 { } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/controlDict b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/controlDict index acd337d877..f35c15f101 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/controlDict +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/controlDict @@ -44,6 +44,6 @@ timePrecision 6; runTimeModifiable true; -libs ("libthermoBaffleModels.so" "libcompressibleRASModels.so"); +libs ("libthermalBaffleModels.so" "libcompressibleRASModels.so"); // ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/createBafflesDict b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/createBafflesDict index bc1ec594fd..310a64bd7f 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/createBafflesDict +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/createBafflesDict @@ -52,7 +52,7 @@ baffles { T { - type compressible::thermoBaffle1D; + type compressible::thermalBaffle1D; baffleActivated yes; thickness uniform 0.005; // thickness [m] Qs uniform 100; // heat flux [W/m2] From 2602868b0051f357c54f4478db2a61e8ba6e5c07 Mon Sep 17 00:00:00 2001 From: Henry Date: Tue, 5 Feb 2013 14:51:01 +0000 Subject: [PATCH 3/8] Update wallHeatTransfer BC for turbulence --- .../wallHeatTransferFvPatchScalarField.C | 184 ----------------- .../wallHeatTransferFvPatchScalarField.H | 194 ------------------ .../wallHeatTransferFvPatchScalarField.C | 17 +- .../wallHeatTransferFvPatchScalarField.H | 0 4 files changed, 8 insertions(+), 387 deletions(-) delete mode 100644 applications/solvers/multiphase/compressibleInterFoam/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C delete mode 100644 applications/solvers/multiphase/compressibleInterFoam/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.H rename src/{thermophysicalModels/basic => turbulenceModels/compressible/turbulenceModel}/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C (91%) rename src/{thermophysicalModels/basic => turbulenceModels/compressible/turbulenceModel}/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.H (100%) diff --git a/applications/solvers/multiphase/compressibleInterFoam/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C b/applications/solvers/multiphase/compressibleInterFoam/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C deleted file mode 100644 index e6782e8b3a..0000000000 --- a/applications/solvers/multiphase/compressibleInterFoam/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C +++ /dev/null @@ -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 . - -\*---------------------------------------------------------------------------*/ - -#include "wallHeatTransferFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::wallHeatTransferFvPatchScalarField::wallHeatTransferFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& 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& 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& 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::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& 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(ptf); - - Tinf_.rmap(tiptf.Tinf_, addr); - alphaWall_.rmap(tiptf.alphaWall_, addr); -} - - -void Foam::wallHeatTransferFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const fvPatchScalarField& Cpw = - patch().lookupPatchField("Cp"); - - const fvPatchScalarField& kByCpw = - patch().lookupPatchField("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); -} - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/compressibleInterFoam/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.H b/applications/solvers/multiphase/compressibleInterFoam/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.H deleted file mode 100644 index cf5284a087..0000000000 --- a/applications/solvers/multiphase/compressibleInterFoam/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.H +++ /dev/null @@ -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 . - -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& - ); - - //- Construct from patch, internal field and dictionary - wallHeatTransferFvPatchScalarField - ( - const fvPatch&, - const DimensionedField&, - const dictionary& - ); - - //- Construct by mapping given wallHeatTransferFvPatchScalarField - // onto a new patch - wallHeatTransferFvPatchScalarField - ( - const wallHeatTransferFvPatchScalarField&, - const fvPatch&, - const DimensionedField&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - wallHeatTransferFvPatchScalarField - ( - const wallHeatTransferFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new wallHeatTransferFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - wallHeatTransferFvPatchScalarField - ( - const wallHeatTransferFvPatchScalarField&, - const DimensionedField& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp clone - ( - const DimensionedField& iF - ) const - { - return tmp - ( - 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 - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C similarity index 91% rename from src/thermophysicalModels/basic/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C rename to src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C index da9ff9b2bb..1508cab8ea 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C @@ -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 + ( + "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(); diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.H b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.H similarity index 100% rename from src/thermophysicalModels/basic/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.H rename to src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.H From 4e19691029de30606cce7b03d7ef3b9782042fbe Mon Sep 17 00:00:00 2001 From: Henry Date: Tue, 5 Feb 2013 14:52:06 +0000 Subject: [PATCH 4/8] Update headers --- .../mappedVariableThicknessWallFvPatch.C | 2 +- .../doc/thermalBaffleBoundaryConditionsDoc.H | 2 +- .../thermalBaffle/thermalBaffleFvPatchScalarField.C | 2 +- .../thermalBaffle/thermalBaffleFvPatchScalarField.H | 2 +- src/regionModels/thermalBaffleModels/noThermo/noThermo.C | 2 +- src/regionModels/thermalBaffleModels/noThermo/noThermo.H | 2 +- .../thermalBaffleModels/thermalBaffle/thermalBaffle.C | 2 +- .../thermalBaffleModels/thermalBaffle/thermalBaffle.H | 2 +- .../thermalBaffleModels/thermalBaffle/thermalBaffleI.H | 2 +- .../thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C | 2 +- .../thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.H | 2 +- .../thermalBaffleModel/thermalBaffleModelNew.C | 2 +- src/thermophysicalModels/basic/Make/files | 2 -- .../thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C | 2 +- .../thermalBaffle1D/thermalBaffle1DFvPatchScalarField.H | 2 +- .../thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.C | 2 +- .../thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.H | 2 +- .../wallHeatTransfer/wallHeatTransferFvPatchScalarField.C | 2 +- .../wallHeatTransfer/wallHeatTransferFvPatchScalarField.H | 2 +- 19 files changed, 18 insertions(+), 20 deletions(-) diff --git a/src/regionModels/regionModel/derivedFvPatches/mappedVariableThicknessWall/mappedVariableThicknessWallFvPatch.C b/src/regionModels/regionModel/derivedFvPatches/mappedVariableThicknessWall/mappedVariableThicknessWallFvPatch.C index 18b7362329..2bd7a7aebf 100644 --- a/src/regionModels/regionModel/derivedFvPatches/mappedVariableThicknessWall/mappedVariableThicknessWallFvPatch.C +++ b/src/regionModels/regionModel/derivedFvPatches/mappedVariableThicknessWall/mappedVariableThicknessWallFvPatch.C @@ -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 diff --git a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/doc/thermalBaffleBoundaryConditionsDoc.H b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/doc/thermalBaffleBoundaryConditionsDoc.H index ac1553d104..2c59b705bc 100644 --- a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/doc/thermalBaffleBoundaryConditionsDoc.H +++ b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/doc/thermalBaffleBoundaryConditionsDoc.H @@ -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 diff --git a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C index 408076b482..3d254324b6 100644 --- a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C +++ b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C @@ -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 diff --git a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.H b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.H index 7015f378df..4097f05564 100644 --- a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.H +++ b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.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 diff --git a/src/regionModels/thermalBaffleModels/noThermo/noThermo.C b/src/regionModels/thermalBaffleModels/noThermo/noThermo.C index ea62beed56..e0511f226a 100644 --- a/src/regionModels/thermalBaffleModels/noThermo/noThermo.C +++ b/src/regionModels/thermalBaffleModels/noThermo/noThermo.C @@ -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 diff --git a/src/regionModels/thermalBaffleModels/noThermo/noThermo.H b/src/regionModels/thermalBaffleModels/noThermo/noThermo.H index cf85fa1901..9fed26466a 100644 --- a/src/regionModels/thermalBaffleModels/noThermo/noThermo.H +++ b/src/regionModels/thermalBaffleModels/noThermo/noThermo.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 diff --git a/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C b/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C index ed9cbd0021..b6b53b69f2 100644 --- a/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C +++ b/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C @@ -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 diff --git a/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.H b/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.H index d706b4864a..b8265948a9 100644 --- a/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.H +++ b/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.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 diff --git a/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffleI.H b/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffleI.H index c2977f177d..afad57dea7 100644 --- a/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffleI.H +++ b/src/regionModels/thermalBaffleModels/thermalBaffle/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 diff --git a/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C b/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C index 7d8754717c..543ea6b974 100644 --- a/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C +++ b/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C @@ -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 diff --git a/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.H b/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.H index e819a128be..01c3cbe559 100644 --- a/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.H +++ b/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.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 diff --git a/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModelNew.C b/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModelNew.C index 08d4368c27..44ae867df7 100644 --- a/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModelNew.C +++ b/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModelNew.C @@ -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 diff --git a/src/thermophysicalModels/basic/Make/files b/src/thermophysicalModels/basic/Make/files index 5b82c80476..7d10c1c952 100644 --- a/src/thermophysicalModels/basic/Make/files +++ b/src/thermophysicalModels/basic/Make/files @@ -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 diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C index 1ccc6f7fa3..f05919061e 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C @@ -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 diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.H b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.H index 5e6bccf4c9..c2b209cb16 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.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 diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.C b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.C index 979980cff5..ca3f232992 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.C +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.C @@ -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 diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.H b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.H index 14f88a25c6..db7dcf0c9f 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.H +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.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 diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C index 1508cab8ea..2efdccde5e 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C @@ -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 diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.H b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.H index da2ab661ef..fb1630ff0e 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.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 From ab5df9a1f6ec3ced1cb2f3ddc9bf828e28af720a Mon Sep 17 00:00:00 2001 From: Henry Date: Tue, 5 Feb 2013 14:52:38 +0000 Subject: [PATCH 5/8] Thermo: move the he BC set functions into basicThermo --- .../basic/basicThermo/basicThermo.C | 92 +++++++++++++++++++ .../basic/basicThermo/basicThermo.H | 15 +++ .../basic/heThermo/heThermo.C | 83 ----------------- .../basic/heThermo/heThermo.H | 8 -- 4 files changed, 107 insertions(+), 91 deletions(-) diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermo.C b/src/thermophysicalModels/basic/basicThermo/basicThermo.C index e2fc874b5e..16ae3ebb8a 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermo.C +++ b/src/thermophysicalModels/basic/basicThermo/basicThermo.C @@ -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(tbf[patchi])) + { + const fixedJumpFvPatchScalarField& pf = + dynamic_cast(tbf[patchi]); + + hbt[patchi] = pf.interfaceFieldType(); + } + else if (isA(tbf[patchi])) + { + const fixedJumpAMIFvPatchScalarField& pf = + dynamic_cast + ( + 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(tbf[patchi])) + { + hbt[patchi] = fixedEnergyFvPatchScalarField::typeName; + } + else if + ( + isA(tbf[patchi]) + || isA(tbf[patchi]) + ) + { + hbt[patchi] = gradientEnergyFvPatchScalarField::typeName; + } + else if (isA(tbf[patchi])) + { + hbt[patchi] = mixedEnergyFvPatchScalarField::typeName; + } + else if (isA(tbf[patchi])) + { + hbt[patchi] = energyJumpFvPatchScalarField::typeName; + } + else if (isA(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_; diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermo.H b/src/thermophysicalModels/basic/basicThermo/basicThermo.H index e652c30ee6..c9de458364 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermo.H +++ b/src/thermophysicalModels/basic/basicThermo/basicThermo.H @@ -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 Cp() const = 0; diff --git a/src/thermophysicalModels/basic/heThermo/heThermo.C b/src/thermophysicalModels/basic/heThermo/heThermo.C index 5f49a4ba75..bec062cc5a 100644 --- a/src/thermophysicalModels/basic/heThermo/heThermo.C +++ b/src/thermophysicalModels/basic/heThermo/heThermo.C @@ -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 -Foam::wordList Foam::heThermo::heBoundaryBaseTypes() -{ - const volScalarField::GeometricBoundaryField& tbf = - this->T_.boundaryField(); - - wordList hbt(tbf.size(), word::null); - - forAll(tbf, patchi) - { - if (isA(tbf[patchi])) - { - const fixedJumpFvPatchScalarField& pf = - dynamic_cast(tbf[patchi]); - - hbt[patchi] = pf.interfaceFieldType(); - } - else if (isA(tbf[patchi])) - { - const fixedJumpAMIFvPatchScalarField& pf = - dynamic_cast - ( - tbf[patchi] - ); - - hbt[patchi] = pf.interfaceFieldType(); - } - } - - return hbt; -} - - -template -Foam::wordList Foam::heThermo::heBoundaryTypes() -{ - const volScalarField::GeometricBoundaryField& tbf = - this->T_.boundaryField(); - - wordList hbt = tbf.types(); - - forAll(tbf, patchi) - { - if (isA(tbf[patchi])) - { - hbt[patchi] = fixedEnergyFvPatchScalarField::typeName; - } - else if - ( - isA(tbf[patchi]) - || isA(tbf[patchi]) - ) - { - hbt[patchi] = gradientEnergyFvPatchScalarField::typeName; - } - else if (isA(tbf[patchi])) - { - hbt[patchi] = mixedEnergyFvPatchScalarField::typeName; - } - else if (isA(tbf[patchi])) - { - hbt[patchi] = energyJumpFvPatchScalarField::typeName; - } - else if (isA(tbf[patchi])) - { - hbt[patchi] = energyJumpAMIFvPatchScalarField::typeName; - } - else if (tbf[patchi].type() == "energyRegionCoupledFvPatchScalarField") - { - hbt[patchi] = "energyRegionCoupledFvPatchScalarField"; - } - } - - return hbt; -} - - template void Foam::heThermo:: heBoundaryCorrection(volScalarField& h) diff --git a/src/thermophysicalModels/basic/heThermo/heThermo.H b/src/thermophysicalModels/basic/heThermo/heThermo.H index f77d017e13..c600258b65 100644 --- a/src/thermophysicalModels/basic/heThermo/heThermo.H +++ b/src/thermophysicalModels/basic/heThermo/heThermo.H @@ -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); From 5cd985d7cea63443761c04bfd1a6580f2fa4ffb3 Mon Sep 17 00:00:00 2001 From: Henry Date: Tue, 5 Feb 2013 14:52:46 +0000 Subject: [PATCH 6/8] Update headers --- src/thermophysicalModels/basic/basicThermo/basicThermo.C | 2 +- src/thermophysicalModels/basic/basicThermo/basicThermo.H | 2 +- src/thermophysicalModels/basic/heThermo/heThermo.C | 2 +- src/thermophysicalModels/basic/heThermo/heThermo.H | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermo.C b/src/thermophysicalModels/basic/basicThermo/basicThermo.C index 16ae3ebb8a..f5355ef877 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermo.C +++ b/src/thermophysicalModels/basic/basicThermo/basicThermo.C @@ -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 diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermo.H b/src/thermophysicalModels/basic/basicThermo/basicThermo.H index c9de458364..fca4fab70d 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermo.H +++ b/src/thermophysicalModels/basic/basicThermo/basicThermo.H @@ -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 diff --git a/src/thermophysicalModels/basic/heThermo/heThermo.C b/src/thermophysicalModels/basic/heThermo/heThermo.C index bec062cc5a..fae178684f 100644 --- a/src/thermophysicalModels/basic/heThermo/heThermo.C +++ b/src/thermophysicalModels/basic/heThermo/heThermo.C @@ -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 diff --git a/src/thermophysicalModels/basic/heThermo/heThermo.H b/src/thermophysicalModels/basic/heThermo/heThermo.H index c600258b65..ce5c732427 100644 --- a/src/thermophysicalModels/basic/heThermo/heThermo.H +++ b/src/thermophysicalModels/basic/heThermo/heThermo.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 From 1a294d0235ab391d1ce8a039f10d3d3fcbed7ee1 Mon Sep 17 00:00:00 2001 From: Henry Date: Tue, 5 Feb 2013 14:54:28 +0000 Subject: [PATCH 7/8] Thermo: move the he BC set functions into basicThermo --- .../compressibleInterFoam/Make/files | 1 - .../compressibleInterFoam/Make/options | 7 +- .../multiphase/compressibleInterFoam/TEqn.H | 18 +- .../multiphase/compressibleInterFoam/UEqn.H | 2 + .../compressibleInterDyMFoam/Make/options | 5 + .../compressibleInterDyMFoam.C | 2 +- .../compressibleInterFoam.C | 3 +- .../compressibleInterFoam/createFields.H | 163 ++------ .../multiphase/compressibleInterFoam/pEqn.H | 13 +- .../twoPhaseThermo/Make/files | 3 + .../twoPhaseThermo/Make/options | 8 + .../twoPhaseThermo/twoPhaseThermo.C | 365 ++++++++++++++++++ .../twoPhaseThermo/twoPhaseThermo.H | 290 ++++++++++++++ .../constant/thermophysicalProperties | 19 + .../constant/thermophysicalProperties1 | 53 +++ .../constant/thermophysicalProperties2 | 49 +++ .../constant/transportProperties | 20 - .../les/depthCharge2D/system/fvSchemes | 1 + .../les/depthCharge2D/system/fvSolution | 2 +- 19 files changed, 855 insertions(+), 169 deletions(-) create mode 100644 applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/Make/files create mode 100644 applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/Make/options create mode 100644 applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/twoPhaseThermo.C create mode 100644 applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/twoPhaseThermo.H create mode 100644 tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/thermophysicalProperties create mode 100644 tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/thermophysicalProperties1 create mode 100644 tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/thermophysicalProperties2 diff --git a/applications/solvers/multiphase/compressibleInterFoam/Make/files b/applications/solvers/multiphase/compressibleInterFoam/Make/files index 0e009f09bc..de5437219c 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/Make/files +++ b/applications/solvers/multiphase/compressibleInterFoam/Make/files @@ -1,4 +1,3 @@ -derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C compressibleInterFoam.C EXE = $(FOAM_APPBIN)/compressibleInterFoam diff --git a/applications/solvers/multiphase/compressibleInterFoam/Make/options b/applications/solvers/multiphase/compressibleInterFoam/Make/options index 48c253b213..a6a130754a 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/Make/options +++ b/applications/solvers/multiphase/compressibleInterFoam/Make/options @@ -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 \ diff --git a/applications/solvers/multiphase/compressibleInterFoam/TEqn.H b/applications/solvers/multiphase/compressibleInterFoam/TEqn.H index 2605ce345a..d5183d5c4e 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/TEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/TEqn.H @@ -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(); } diff --git a/applications/solvers/multiphase/compressibleInterFoam/UEqn.H b/applications/solvers/multiphase/compressibleInterFoam/UEqn.H index 7cc250a66a..1c216a8bf7 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/UEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/UEqn.H @@ -22,4 +22,6 @@ ) * mesh.magSf() ) ); + + K = 0.5*magSqr(U); } diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options index d4d0fa9b5a..48c21dfee5 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options @@ -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 \ diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C index acf563fc8e..2ebecc2bdb 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C @@ -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" diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C index 54c246f203..d9ceb58683 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C @@ -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" diff --git a/applications/solvers/multiphase/compressibleInterFoam/createFields.H b/applications/solvers/multiphase/compressibleInterFoam/createFields.H index 1c22600170..e31e4c34bf 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/createFields.H +++ b/applications/solvers/multiphase/compressibleInterFoam/createFields.H @@ -28,34 +28,6 @@ #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); @@ -69,91 +41,31 @@ scalar(1) - alpha1 ); - dimensionedScalar k1 - ( - "k", - dimensionSet(1, 1, -3, -1, 0), - twoPhaseProperties.subDict - ( - twoPhaseProperties.phase1Name() - ).lookup("k") - ); + Info<< "Reading thermophysical properties\n" << endl; - dimensionedScalar k2 - ( - "k", - dimensionSet(1, 1, -3, -1, 0), - twoPhaseProperties.subDict - ( - twoPhaseProperties.phase2Name() - ).lookup("k") - ); + twoPhaseThermo thermo(mesh, alpha1, alpha2); - dimensionedScalar Cv1 - ( - "Cv", - dimensionSet(0, 2, -2, -1, 0), - twoPhaseProperties.subDict - ( - twoPhaseProperties.phase1Name() - ).lookup("Cv") - ); + 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 Cv2 - ( - "Cv", - dimensionSet(0, 2, -2, -1, 0), - twoPhaseProperties.subDict - ( - twoPhaseProperties.phase2Name() - ).lookup("Cv") - ); + // volScalarField rho + // ( + // IOobject + // ( + // "rho", + // runTime.timeName(), + // mesh, + // IOobject::READ_IF_PRESENT, + // IOobject::AUTO_WRITE + // ), + // alpha1*rho1 + alpha2*rho2 + // ); - autoPtr eos1 - ( - phaseEquationOfState::New - ( - twoPhaseProperties.subDict - ( - twoPhaseProperties.phase1Name() - ) - ) - ); - - autoPtr 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 +73,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 +102,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)); diff --git a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H index 3197a72bee..dba9058f30 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H @@ -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); + } } diff --git a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/Make/files b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/Make/files new file mode 100644 index 0000000000..64771e2f6e --- /dev/null +++ b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/Make/files @@ -0,0 +1,3 @@ +twoPhaseThermo.C + +LIB = $(FOAM_LIBBIN)/libtwoPhaseThermo diff --git a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/Make/options b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/Make/options new file mode 100644 index 0000000000..eab8cce15d --- /dev/null +++ b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/Make/options @@ -0,0 +1,8 @@ +EXE_INC = \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude + +LIB_LIBS = \ + -lfluidThermophysicalModels \ + -lspecie \ + -lfiniteVolume diff --git a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/twoPhaseThermo.C b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/twoPhaseThermo.C new file mode 100644 index 0000000000..e600ee3288 --- /dev/null +++ b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/twoPhaseThermo.C @@ -0,0 +1,365 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +\*---------------------------------------------------------------------------*/ + +#include "twoPhaseThermo.H" +#include "gradientEnergyFvPatchScalarField.H" +#include "mixedEnergyFvPatchScalarField.H" + + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(twoPhaseThermo, 0); +} + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::twoPhaseThermo::twoPhaseThermo +( + const fvMesh& mesh, + const volScalarField& alpha1, + const volScalarField& alpha2, + const word& phaseName +) +: + rhoThermo(mesh, phaseName), + phaseName1_("1"), + phaseName2_("2"), + alpha1_(alpha1), + alpha2_(alpha2), + thermo1_(rhoThermo::New(mesh, phaseName1_)), + thermo2_(rhoThermo::New(mesh, phaseName2_)), + he_ + ( + IOobject + ( + phasePropertyName + ( + "he" + ), + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimEnergy/dimMass, + heBoundaryTypes(), + heBoundaryBaseTypes() + ) +{ + thermo1_->validate("phaseModel 1", "e"); + thermo2_->validate("phaseModel 2", "e"); + + rho_ = alpha1_*thermo1_->rho() + alpha2_*thermo2_->rho(); + + he_ = + ( + alpha1_*thermo1_->rho()*thermo1_->he() + + alpha2_*thermo2_->rho()*thermo2_->he() + )/rho_; + + volScalarField::GeometricBoundaryField& hbf = he_.boundaryField(); + + forAll(hbf, patchi) + { + if (isA(hbf[patchi])) + { + refCast(hbf[patchi]).gradient() + = hbf[patchi].fvPatchField::snGrad(); + } + else if (isA(hbf[patchi])) + { + refCast(hbf[patchi]).refGrad() + = hbf[patchi].fvPatchField::snGrad(); + } + } + + 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_ = alpha1_*thermo1_->psi() + alpha2_*thermo2_->psi(); + mu_ = alpha1_*thermo1_->mu() + alpha2_*thermo2_->mu(); + alpha_ = alpha1_*thermo1_->alpha() + 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::twoPhaseThermo::he +( + const volScalarField& p, + const volScalarField& T +) const +{ + return alpha1_*thermo1_->he(p, T) + alpha2_*thermo2_->he(p, T); +} + + +Foam::tmp Foam::twoPhaseThermo::he +( + const scalarField& p, + const scalarField& T, + const labelList& cells +) const +{ + return + scalarField(alpha1_, cells)*thermo1_->he(p, T, cells) + + scalarField(alpha2_, cells)*thermo2_->he(p, T, cells); +} + + +Foam::tmp Foam::twoPhaseThermo::he +( + const scalarField& p, + const scalarField& T, + const label patchi +) const +{ + return + alpha1_.boundaryField()[patchi]*thermo1_->he(p, T, patchi) + + alpha2_.boundaryField()[patchi]*thermo2_->he(p, T, patchi); +} + + +Foam::tmp Foam::twoPhaseThermo::hc() const +{ + return alpha1_*thermo1_->hc() + alpha2_*thermo2_->hc(); +} + + +Foam::tmp Foam::twoPhaseThermo::THE +( + const scalarField& h, + const scalarField& p, + const scalarField& T0, + const labelList& cells +) const +{ + notImplemented("Foam::twoPhaseThermo::THE"); + return T0; +} + + +Foam::tmp Foam::twoPhaseThermo::THE +( + const scalarField& h, + const scalarField& p, + const scalarField& T0, + const label patchi +) const +{ + notImplemented("Foam::twoPhaseThermo::THE"); + return T0; +} + + +Foam::tmp Foam::twoPhaseThermo::Cp() const +{ + return alpha1_*thermo1_->Cp() + alpha2_*thermo2_->Cp(); +} + + +Foam::tmp Foam::twoPhaseThermo::Cp +( + const scalarField& p, + const scalarField& T, + const label patchi +) const +{ + return + alpha1_.boundaryField()[patchi]*thermo1_->Cp(p, T, patchi) + + alpha2_.boundaryField()[patchi]*thermo2_->Cp(p, T, patchi); +} + + +Foam::tmp Foam::twoPhaseThermo::Cv() const +{ + return alpha1_*thermo1_->Cv() + alpha2_*thermo2_->Cv(); +} + + +Foam::tmp Foam::twoPhaseThermo::Cv +( + const scalarField& p, + const scalarField& T, + const label patchi +) const +{ + return + alpha1_.boundaryField()[patchi]*thermo1_->Cv(p, T, patchi) + + alpha2_.boundaryField()[patchi]*thermo2_->Cv(p, T, patchi); +} + + +Foam::tmp Foam::twoPhaseThermo::gamma() const +{ + return alpha1_*thermo1_->gamma() + alpha2_*thermo2_->gamma(); +} + + +Foam::tmp Foam::twoPhaseThermo::gamma +( + const scalarField& p, + const scalarField& T, + const label patchi +) const +{ + return + alpha1_.boundaryField()[patchi]*thermo1_->gamma(p, T, patchi) + + alpha2_.boundaryField()[patchi]*thermo2_->gamma(p, T, patchi); +} + + +Foam::tmp Foam::twoPhaseThermo::Cpv() const +{ + return alpha1_*thermo1_->Cpv() + alpha2_*thermo2_->Cpv(); +} + + +Foam::tmp Foam::twoPhaseThermo::Cpv +( + const scalarField& p, + const scalarField& T, + const label patchi +) const +{ + return + alpha1_.boundaryField()[patchi]*thermo1_->Cpv(p, T, patchi) + + alpha2_.boundaryField()[patchi]*thermo2_->Cpv(p, T, patchi); +} + + +Foam::tmp Foam::twoPhaseThermo::CpByCpv() const +{ + return alpha1_*thermo1_->CpByCpv() + alpha2_*thermo2_->CpByCpv(); +} + + +Foam::tmp Foam::twoPhaseThermo::CpByCpv +( + const scalarField& p, + const scalarField& T, + const label patchi +) const +{ + return + alpha1_.boundaryField()[patchi]*thermo1_->CpByCpv(p, T, patchi) + + alpha2_.boundaryField()[patchi]*thermo2_->CpByCpv(p, T, patchi); +} + + +Foam::tmp Foam::twoPhaseThermo::kappa() const +{ + return alpha1_*thermo1_->kappa() + alpha2_*thermo2_->kappa(); +} + + +Foam::tmp Foam::twoPhaseThermo::kappa +( + const label patchi +) const +{ + return + alpha1_.boundaryField()[patchi]*thermo1_->kappa(patchi) + + alpha2_.boundaryField()[patchi]*thermo2_->kappa(patchi); +} + + +Foam::tmp Foam::twoPhaseThermo::kappaEff +( + const volScalarField& alphat +) const +{ + return + alpha1_*thermo1_->kappaEff(alphat) + + alpha2_*thermo2_->kappaEff(alphat); +} + + +Foam::tmp Foam::twoPhaseThermo::kappaEff +( + const scalarField& alphat, + const label patchi +) const +{ + return + alpha1_.boundaryField()[patchi]*thermo1_->kappaEff(alphat, patchi) + + alpha2_.boundaryField()[patchi]*thermo2_->kappaEff(alphat, patchi); +} + + +Foam::tmp Foam::twoPhaseThermo::alphaEff +( + const volScalarField& alphat +) const +{ + return + alpha1_*thermo1_->alphaEff(alphat) + + alpha2_*thermo2_->alphaEff(alphat); +} + + +Foam::tmp Foam::twoPhaseThermo::alphaEff +( + const scalarField& alphat, + const label patchi +) const +{ + return + alpha1_.boundaryField()[patchi]*thermo1_->alphaEff(alphat, patchi) + + alpha2_.boundaryField()[patchi]*thermo2_->alphaEff(alphat, patchi); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/twoPhaseThermo.H b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/twoPhaseThermo.H new file mode 100644 index 0000000000..cfbada321b --- /dev/null +++ b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/twoPhaseThermo.H @@ -0,0 +1,290 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +Class + Foam::twoPhaseThermo + +Description + +SourceFiles + twoPhaseThermoI.H + twoPhaseThermo.C + twoPhaseThermoIO.C + +\*---------------------------------------------------------------------------*/ + +#ifndef twoPhaseThermo_H +#define twoPhaseThermo_H + +#include "rhoThermo.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class twoPhaseThermo Declaration +\*---------------------------------------------------------------------------*/ + +class twoPhaseThermo +: + public rhoThermo +{ + // Private data + + //- Name of phase 1 + word phaseName1_; + + //- Name of phase 2 + word phaseName2_; + + //- Phase-fraction of phase 1 + const volScalarField& alpha1_; + + //- Phase-fraction of phase2 + const volScalarField& alpha2_; + + //- Thermo-package of phase 1 + autoPtr thermo1_; + + //- Thermo-package of phase 2 + autoPtr thermo2_; + + //- Energy field + volScalarField he_; + + +public: + + //- Runtime type information + TypeName("twoPhaseThermo"); + + + // Constructors + + //- Construct from mesh and phase fractions + twoPhaseThermo + ( + const fvMesh&, + const volScalarField& alpha1, + const volScalarField& alpha2, + const word& phaseName=word::null + ); + + + //- 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() + { + return he_; + } + + //- Enthalpy/Internal energy [J/kg] + virtual const volScalarField& he() const + { + return he_; + } + + //- Enthalpy/Internal energy + // for given pressure and temperature [J/kg] + virtual tmp he + ( + const volScalarField& p, + const volScalarField& T + ) const; + + //- Enthalpy/Internal energy for cell-set [J/kg] + virtual tmp he + ( + const scalarField& p, + const scalarField& T, + const labelList& cells + ) const; + + //- Enthalpy/Internal energy for patch [J/kg] + virtual tmp he + ( + const scalarField& p, + const scalarField& T, + const label patchi + ) const; + + //- Chemical enthalpy [J/kg] + virtual tmp hc() const; + + //- Temperature from enthalpy/internal energy for cell-set + virtual tmp 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 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 Cp() const; + + //- Heat capacity at constant pressure for patch [J/kg/K] + virtual tmp Cp + ( + const scalarField& p, + const scalarField& T, + const label patchi + ) const; + + //- Heat capacity at constant volume [J/kg/K] + virtual tmp Cv() const; + + //- Heat capacity at constant volume for patch [J/kg/K] + virtual tmp Cv + ( + const scalarField& p, + const scalarField& T, + const label patchi + ) const; + + //- gamma = Cp/Cv [] + virtual tmp gamma() const; + + //- gamma = Cp/Cv for patch [] + virtual tmp gamma + ( + const scalarField& p, + const scalarField& T, + const label patchi + ) const; + + //- Heat capacity at constant pressure/volume [J/kg/K] + virtual tmp Cpv() const; + + //- Heat capacity at constant pressure/volume for patch [J/kg/K] + virtual tmp Cpv + ( + const scalarField& p, + const scalarField& T, + const label patchi + ) const; + + //- Heat capacity ratio [] + virtual tmp CpByCpv() const; + + //- Heat capacity ratio for patch [] + virtual tmp 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 kappa() const; + + //- Thermal diffusivity of mixture for patch [J/m/s/K] + virtual tmp kappa + ( + const label patchi + ) const; + + //- Effective thermal diffusivity of mixture [J/m/s/K] + virtual tmp kappaEff + ( + const volScalarField& alphat + ) const; + + //- Effective thermal diffusivity of mixture for patch [J/m/s/K] + virtual tmp kappaEff + ( + const scalarField& alphat, + const label patchi + ) const; + + //- Effective thermal diffusivity of mixture [J/m/s/K] + virtual tmp alphaEff + ( + const volScalarField& alphat + ) const; + + //- Effective thermal diffusivity of mixture for patch [J/m/s/K] + virtual tmp alphaEff + ( + const scalarField& alphat, + const label patchi + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/thermophysicalProperties b/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/thermophysicalProperties new file mode 100644 index 0000000000..3c26cf1692 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/thermophysicalProperties @@ -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; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/thermophysicalProperties1 b/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/thermophysicalProperties1 new file mode 100644 index 0000000000..57295cafbd --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/thermophysicalProperties1 @@ -0,0 +1,53 @@ +/*--------------------------------*- 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; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState perfectFluid; + specie specie; + energy sensibleInternalEnergy; +} + +mixture +{ + specie + { + nMoles 1; + molWeight 28.9; //2.77; + } + equationOfState + { + rho0 1027; + } + thermodynamics + { + Cp 4195; + Hf 0; + } + transport + { + mu 3.645e-4; + Pr 2.289; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/thermophysicalProperties2 b/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/thermophysicalProperties2 new file mode 100644 index 0000000000..e61009c10b --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/thermophysicalProperties2 @@ -0,0 +1,49 @@ +/*--------------------------------*- 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; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState perfectGas; + specie specie; + energy sensibleInternalEnergy; +} + +mixture +{ + specie + { + nMoles 1; + molWeight 28.9; + } + thermodynamics + { + Cp 1007; + Hf 0; + } + transport + { + mu 1.84e-05; + Pr 0.7; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/transportProperties b/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/transportProperties index 564df56f20..78f85f47a2 100644 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/transportProperties +++ b/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/transportProperties @@ -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; diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/fvSchemes b/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/fvSchemes index 903d94d30c..0c204f053f 100644 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/fvSchemes +++ b/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/fvSchemes @@ -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; } diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/fvSolution b/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/fvSolution index 4618974546..9066c1c700 100644 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/fvSolution +++ b/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/fvSolution @@ -39,7 +39,7 @@ solvers maxIter 100; } - "(rho|rhoFinal)" + ".*(rho|rhoFinal)" { solver diagonal; } From 0d91b161afb6d52affaaa7e79215481d5bae50ab Mon Sep 17 00:00:00 2001 From: Henry Date: Tue, 5 Feb 2013 14:54:36 +0000 Subject: [PATCH 8/8] Update headers --- .../compressibleInterDyMFoam/compressibleInterDyMFoam.C | 2 +- .../multiphase/compressibleInterFoam/compressibleInterFoam.C | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C index 2ebecc2bdb..3cb787d144 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C @@ -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 diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C index d9ceb58683..85cab52cdb 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C @@ -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