From e44826f076f3528c6bdb3fde789fc12a2c5ecb17 Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 7 Oct 2010 17:14:21 +0100 Subject: [PATCH] ENH: Restructured and enhanced thermalPorousZone - thermal model now run-time selectable - added option for 'none' --- .../thermalPorousZone/Make/files | 5 + .../fixedTemperature/fixedTemperature.C | 98 ++++++++++++++ .../fixedTemperature/fixedTemperature.H | 98 ++++++++++++++ .../noThermalModel/noThermalModel.C | 74 +++++++++++ .../noThermalModel/noThermalModel.H | 90 +++++++++++++ .../thermalModel/thermalModel/thermalModel.C | 63 +++++++++ .../thermalModel/thermalModel/thermalModel.H | 122 ++++++++++++++++++ .../thermalModel/thermalModelNew.C | 58 +++++++++ .../thermalPorousZone/thermalPorousZone.C | 53 +------- .../thermalPorousZone/thermalPorousZone.H | 34 ++--- 10 files changed, 626 insertions(+), 69 deletions(-) create mode 100644 src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C create mode 100644 src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.H create mode 100644 src/thermophysicalModels/thermalPorousZone/thermalModel/noThermalModel/noThermalModel.C create mode 100644 src/thermophysicalModels/thermalPorousZone/thermalModel/noThermalModel/noThermalModel.H create mode 100644 src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.C create mode 100644 src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.H create mode 100644 src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModelNew.C diff --git a/src/thermophysicalModels/thermalPorousZone/Make/files b/src/thermophysicalModels/thermalPorousZone/Make/files index 046355feaf..32e0e201f5 100644 --- a/src/thermophysicalModels/thermalPorousZone/Make/files +++ b/src/thermophysicalModels/thermalPorousZone/Make/files @@ -1,4 +1,9 @@ thermalPorousZone/thermalPorousZone.C thermalPorousZone/thermalPorousZones.C +thermalModel/thermalModel/thermalModel.C +thermalModel/thermalModel/thermalModelNew.C +thermalModel/fixedTemperature/fixedTemperature.C +thermalModel/noThermalModel/noThermalModel.C + LIB = $(FOAM_LIBBIN)/libthermalPorousZone diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C b/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C new file mode 100644 index 0000000000..512746722c --- /dev/null +++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C @@ -0,0 +1,98 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ 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 "fixedTemperature.H" +#include "addToRunTimeSelectionTable.H" +#include "basicThermo.H" +#include "volFields.H" +#include "fvMatrices.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(fixedTemperature, 0); + + addToRunTimeSelectionTable + ( + thermalModel, + fixedTemperature, + pZone + ); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::fixedTemperature::fixedTemperature(const porousZone& pZone) +: + thermalModel(pZone, typeName), + T_(readScalar(coeffDict_.lookup("T"))) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * // + +Foam::fixedTemperature::~fixedTemperature() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::fixedTemperature::addEnthalpySource +( + const basicThermo& thermo, + const volScalarField& rho, + fvScalarMatrix& hEqn +) const +{ + const labelList& zones = pZone_.zoneIds(); + if (zones.empty() || T_ < 0.0) + { + return; + } + + const fvMesh& mesh = pZone_.mesh(); + const scalarField& V = mesh.V(); + scalarField& hDiag = hEqn.diag(); + scalarField& hSource = hEqn.source(); + + // TODO: generalize for non-fixedTemperature methods + const scalar rate = 1e6; + + forAll(zones, zoneI) + { + const labelList& cells = mesh.cellZones()[zones[zoneI]]; + + forAll(cells, i) + { + hDiag[cells[i]] += rate*V[cells[i]]*rho[cells[i]]; + hSource[cells[i]] += rate*V[cells[i]]*rho[cells[i]]*T_; + } + } +} + + +// ************************************************************************* // diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.H b/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.H new file mode 100644 index 0000000000..11c1c7c442 --- /dev/null +++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.H @@ -0,0 +1,98 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ 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::fixedTemperature + +Description + Fixed temperature model + +\*---------------------------------------------------------------------------*/ + +#ifndef fixedTemperature_H +#define fixedTemperature_H + +#include "thermalModel.H" +#include "autoPtr.H" +#include "runTimeSelectionTables.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class fixedTemperature Declaration +\*---------------------------------------------------------------------------*/ + +class fixedTemperature +: + public thermalModel +{ + +protected: + + // Protected data + + //- Fixed temperature + const scalar T_; + + +public: + + //- Runtime type information + TypeName("fixedTemperature"); + + + // Constructors + + //- Construct from porous zone + fixedTemperature(const porousZone& pZone); + + + //- Destructor + virtual ~fixedTemperature(); + + + // Member Functions + + //- Add the thermal source to the enthalpy equation + virtual void addEnthalpySource + ( + const basicThermo& thermo, + const volScalarField& rho, + fvScalarMatrix& hEqn + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // + diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/noThermalModel/noThermalModel.C b/src/thermophysicalModels/thermalPorousZone/thermalModel/noThermalModel/noThermalModel.C new file mode 100644 index 0000000000..a7c3dfd017 --- /dev/null +++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/noThermalModel/noThermalModel.C @@ -0,0 +1,74 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ 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 "noThermalModel.H" +#include "addToRunTimeSelectionTable.H" +#include "basicThermo.H" +#include "volFields.H" +#include "fvMatrices.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(noThermalModel, 0); + + addToRunTimeSelectionTable + ( + thermalModel, + noThermalModel, + pZone + ); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::noThermalModel::noThermalModel(const porousZone& pZone) +: + thermalModel(pZone) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * // + +Foam::noThermalModel::~noThermalModel() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::noThermalModel::addEnthalpySource +( + const basicThermo&, + const volScalarField&, + fvScalarMatrix& +) const +{ + // do nothing +} + + +// ************************************************************************* // diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/noThermalModel/noThermalModel.H b/src/thermophysicalModels/thermalPorousZone/thermalModel/noThermalModel/noThermalModel.H new file mode 100644 index 0000000000..af23d09feb --- /dev/null +++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/noThermalModel/noThermalModel.H @@ -0,0 +1,90 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ 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::noThermalModel + +Description + Dummy model for 'none' option + +\*---------------------------------------------------------------------------*/ + +#ifndef noThermalModel_H +#define noThermalModel_H + +#include "thermalModel.H" +#include "autoPtr.H" +#include "runTimeSelectionTables.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class noThermalModel Declaration +\*---------------------------------------------------------------------------*/ + +class noThermalModel +: + public thermalModel +{ + +public: + + //- Runtime type information + TypeName("none"); + + + // Constructors + + //- Construct from porous zone + noThermalModel(const porousZone& pZone); + + + //- Destructor + virtual ~noThermalModel(); + + + // Member Functions + + //- Add the thermal source to the enthalpy equation + virtual void addEnthalpySource + ( + const basicThermo& thermo, + const volScalarField& rho, + fvScalarMatrix& hEqn + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // + diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.C b/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.C new file mode 100644 index 0000000000..e8ba858b8c --- /dev/null +++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.C @@ -0,0 +1,63 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ 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 "thermalModel.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(thermalModel, 0); + defineRunTimeSelectionTable(thermalModel, pZone); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::thermalModel::thermalModel(const porousZone& pZone) +: + pZone_(pZone), + coeffDict_(dictionary::null) +{} + + +Foam::thermalModel::thermalModel +( + const porousZone& pZone, + const word& modelType +) +: + pZone_(pZone), + coeffDict_(pZone_.dict().subDict(modelType + "Coeffs")) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * // + +Foam::thermalModel::~thermalModel() +{} + + +// ************************************************************************* // diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.H b/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.H new file mode 100644 index 0000000000..c6bd861919 --- /dev/null +++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.H @@ -0,0 +1,122 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ 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::thermalModel + +Description + Base class for selecting the temperature specification models + +\*---------------------------------------------------------------------------*/ + +#ifndef thermalModel_H +#define thermalModel_H + +#include "porousZone.H" +#include "autoPtr.H" +#include "runTimeSelectionTables.H" +#include "volFieldsFwd.H" +#include "fvMatricesFwd.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class basicThermo; + +/*---------------------------------------------------------------------------*\ + Class thermalModel Declaration +\*---------------------------------------------------------------------------*/ + +class thermalModel +{ + +protected: + + // Protected data + + //- Reference to the porous zone + const porousZone& pZone_; + + //- Sub-model coefficients dictionary + const dictionary coeffDict_; + + +public: + + //- Runtime type information + TypeName("thermalModel"); + + //- Declare runtime constructor selection table + declareRunTimeSelectionTable + ( + autoPtr, + thermalModel, + pZone, + ( + const porousZone& pZone + ), + (pZone) + ); + + + // Constructors + + //- Construct null from porous zone + thermalModel(const porousZone& pZone); + + //- Construct from porous zone and model type name + thermalModel(const porousZone& pZone, const word& modelType); + + + //- Destructor + virtual ~thermalModel(); + + + //- Selector + static autoPtr New(const porousZone& pZone); + + + // Member Functions + + //- Add the thermal source to the enthalpy equation + virtual void addEnthalpySource + ( + const basicThermo& thermo, + const volScalarField& rho, + fvScalarMatrix& hEqn + ) const = 0; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // + diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModelNew.C b/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModelNew.C new file mode 100644 index 0000000000..e97685a3fc --- /dev/null +++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModelNew.C @@ -0,0 +1,58 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ 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 "thermalModel.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::autoPtr Foam::thermalModel::New +( + const porousZone& pZone +) +{ + const word modelType(pZone.dict().lookup("thermalModel")); + + Info<< "Selecting thermalModel " << modelType << endl; + + pZoneConstructorTable::iterator cstrIter = + pZoneConstructorTablePtr_->find(modelType); + + if (cstrIter == pZoneConstructorTablePtr_->end()) + { + FatalErrorIn + ( + "thermalModel::New(const porousZone&)" + ) << "Unknown thermalModel type " + << modelType << nl << nl + << "Valid thermalModel types are :" << endl + << pZoneConstructorTablePtr_->sortedToc() + << abort(FatalError); + } + + return autoPtr(cstrIter()(pZone)); +} + + +// ************************************************************************* // diff --git a/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.C b/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.C index df6a32d84b..6e19d7a177 100644 --- a/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.C +++ b/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.C @@ -24,9 +24,9 @@ License \*----------------------------------------------------------------------------*/ #include "thermalPorousZone.H" -#include "fvMesh.H" -#include "fvMatrices.H" #include "basicThermo.H" +#include "volFields.H" +#include "fvMatrices.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -38,29 +38,8 @@ Foam::thermalPorousZone::thermalPorousZone ) : porousZone(key, mesh, dict), - T_("T", dimTemperature, -GREAT) -{ - if (const dictionary* dictPtr = dict.subDictPtr("thermalModel")) - { - const word thermalModel(dictPtr->lookup("type")); - - if (thermalModel == "fixedTemperature") - { - dictPtr->lookup("T") >> T_; - } - else - { - FatalIOErrorIn - ( - "thermalPorousZone::thermalPorousZone" - "(const keyType&, const fvMesh&, const dictionary&)", - *dictPtr - ) << "thermalModel " << thermalModel << " is not supported" << nl - << " Supported thermalModels are: fixedTemperature" - << exit(FatalIOError); - } - } -} + model_(thermalModel::New(*this)) +{} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -72,29 +51,7 @@ void Foam::thermalPorousZone::addEnthalpySource fvScalarMatrix& hEqn ) const { - const labelList& zones = this->zoneIds(); - if (zones.empty() || T_.value() < 0.0) - { - return; - } - - const scalarField& V = mesh().V(); - scalarField& hDiag = hEqn.diag(); - scalarField& hSource = hEqn.source(); - - // TODO: generalize for non-fixedTemperature methods - const scalar rate = 1e6; - - forAll(zones, zoneI) - { - const labelList& cells = mesh().cellZones()[zones[zoneI]]; - - forAll(cells, i) - { - hDiag[cells[i]] += rate*V[cells[i]]*rho[cells[i]]; - hSource[cells[i]] += rate*V[cells[i]]*rho[cells[i]]*T_.value(); - } - } + model_->addEnthalpySource(thermo, rho, hEqn); } diff --git a/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.H b/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.H index 7278f4ec98..3264194939 100644 --- a/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.H +++ b/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.H @@ -29,7 +29,8 @@ Description equations. See Also - porousZone, thermalPorousZones and coordinateSystems + porousZone, thermalPorousZones and coordinateSystems with run-time + selectable thermal model SourceFiles thermalPorousZone.C @@ -40,6 +41,7 @@ SourceFiles #define thermalPorousZone_H #include "porousZone.H" +#include "thermalModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -50,7 +52,7 @@ class fvMesh; class basicThermo; /*---------------------------------------------------------------------------*\ - Class thermalPorousZone Declaration + Class thermalPorousZone Declaration \*---------------------------------------------------------------------------*/ class thermalPorousZone @@ -59,23 +61,27 @@ class thermalPorousZone { // Private data - //- Temperature in the porous-zone - dimensionedScalar T_; - - //- Disallow default bitwise copy construct thermalPorousZone(const thermalPorousZone&); //- Disallow default bitwise assignment void operator=(const thermalPorousZone&); + //- Thermal model + autoPtr model_; + public: // Constructors //- Construct from components - thermalPorousZone(const keyType& key, const fvMesh&, const dictionary&); + thermalPorousZone + ( + const keyType& key, + const fvMesh& mesh, + const dictionary& dict + ); //- Return clone autoPtr clone() const @@ -118,20 +124,6 @@ public: // Member Functions - // Access - - //- Return the temperature in the porous-zone - const dimensionedScalar& T() const - { - return T_; - } - - //- Edit access to the temperature in the porous-zone - dimensionedScalar& T() - { - return T_; - } - //- Add the thermal source to the enthalpy equation void addEnthalpySource (