mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: add namespace Foam::porousMedia
- avoid name collisions with future thermal models etc.
This commit is contained in:
@ -21,6 +21,12 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Namespace
|
||||
Foam::porousMedia
|
||||
|
||||
Description
|
||||
Namespace for models related to porous media
|
||||
|
||||
Class
|
||||
Foam::porousZone
|
||||
|
||||
|
||||
@ -32,6 +32,8 @@ License
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace porousMedia
|
||||
{
|
||||
defineTypeNameAndDebug(fixedTemperature, 0);
|
||||
|
||||
@ -42,11 +44,12 @@ namespace Foam
|
||||
pZone
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::fixedTemperature::fixedTemperature(const porousZone& pZone)
|
||||
Foam::porousMedia::fixedTemperature::fixedTemperature(const porousZone& pZone)
|
||||
:
|
||||
thermalModel(pZone, typeName),
|
||||
T_(readScalar(coeffDict_.lookup("T")))
|
||||
@ -55,13 +58,13 @@ Foam::fixedTemperature::fixedTemperature(const porousZone& pZone)
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::fixedTemperature::~fixedTemperature()
|
||||
Foam::porousMedia::fixedTemperature::~fixedTemperature()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::fixedTemperature::addEnthalpySource
|
||||
void Foam::porousMedia::fixedTemperature::addEnthalpySource
|
||||
(
|
||||
const basicThermo& thermo,
|
||||
const volScalarField& rho,
|
||||
|
||||
@ -22,10 +22,10 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::fixedTemperature
|
||||
Foam::porousMedia::fixedTemperature
|
||||
|
||||
Description
|
||||
Fixed temperature model
|
||||
Fixed temperature model for porous media
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -40,6 +40,8 @@ Description
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace porousMedia
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class fixedTemperature Declaration
|
||||
@ -86,6 +88,10 @@ public:
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace porousMedia
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
@ -33,20 +33,23 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(noThermalModel, 0);
|
||||
namespace porousMedia
|
||||
{
|
||||
defineTypeNameAndDebug(noThermalModel, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
thermalModel,
|
||||
noThermalModel,
|
||||
pZone
|
||||
);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
thermalModel,
|
||||
noThermalModel,
|
||||
pZone
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::noThermalModel::noThermalModel(const porousZone& pZone)
|
||||
Foam::porousMedia::noThermalModel::noThermalModel(const porousZone& pZone)
|
||||
:
|
||||
thermalModel(pZone)
|
||||
{}
|
||||
@ -54,13 +57,13 @@ Foam::noThermalModel::noThermalModel(const porousZone& pZone)
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::noThermalModel::~noThermalModel()
|
||||
Foam::porousMedia::noThermalModel::~noThermalModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::noThermalModel::addEnthalpySource
|
||||
void Foam::porousMedia::noThermalModel::addEnthalpySource
|
||||
(
|
||||
const basicThermo&,
|
||||
const volScalarField&,
|
||||
|
||||
@ -22,10 +22,10 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::noThermalModel
|
||||
Foam::porousMedia::noThermalModel
|
||||
|
||||
Description
|
||||
Dummy model for 'none' option
|
||||
A dummy thermal model porous media, corresponding to the 'none' option
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -40,9 +40,11 @@ Description
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace porousMedia
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class noThermalModel Declaration
|
||||
Class noThermalModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class noThermalModel
|
||||
@ -59,7 +61,7 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct from porous zone
|
||||
noThermalModel(const porousZone& pZone);
|
||||
noThermalModel(const porousZone&);
|
||||
|
||||
|
||||
//- Destructor
|
||||
@ -78,6 +80,10 @@ public:
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace porousMedia
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
@ -29,21 +29,24 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(thermalModel, 0);
|
||||
defineRunTimeSelectionTable(thermalModel, pZone);
|
||||
namespace porousMedia
|
||||
{
|
||||
defineTypeNameAndDebug(thermalModel, 0);
|
||||
defineRunTimeSelectionTable(thermalModel, pZone);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::thermalModel::thermalModel(const porousZone& pZone)
|
||||
Foam::porousMedia::thermalModel::thermalModel(const porousZone& pZone)
|
||||
:
|
||||
pZone_(pZone),
|
||||
coeffDict_(dictionary::null)
|
||||
{}
|
||||
|
||||
|
||||
Foam::thermalModel::thermalModel
|
||||
Foam::porousMedia::thermalModel::thermalModel
|
||||
(
|
||||
const porousZone& pZone,
|
||||
const word& modelType
|
||||
@ -56,7 +59,7 @@ Foam::thermalModel::thermalModel
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::thermalModel::~thermalModel()
|
||||
Foam::porousMedia::thermalModel::~thermalModel()
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -22,10 +22,10 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::thermalModel
|
||||
Foam::porousMedia::thermalModel
|
||||
|
||||
Description
|
||||
Base class for selecting the temperature specification models
|
||||
Base class to select the temperature specification models for porousMedia
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -43,10 +43,14 @@ Description
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of classes
|
||||
class basicThermo;
|
||||
|
||||
namespace porousMedia
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class thermalModel Declaration
|
||||
Class thermalModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class thermalModel
|
||||
@ -84,10 +88,10 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct null from porous zone
|
||||
thermalModel(const porousZone& pZone);
|
||||
thermalModel(const porousZone&);
|
||||
|
||||
//- Construct from porous zone and model type name
|
||||
thermalModel(const porousZone& pZone, const word& modelType);
|
||||
thermalModel(const porousZone&, const word& modelType);
|
||||
|
||||
|
||||
//- Destructor
|
||||
@ -95,7 +99,7 @@ public:
|
||||
|
||||
|
||||
//- Selector
|
||||
static autoPtr<thermalModel> New(const porousZone& pZone);
|
||||
static autoPtr<thermalModel> New(const porousZone&);
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -110,6 +114,10 @@ public:
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace porousMedia
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
@ -27,7 +27,8 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::thermalModel> Foam::thermalModel::New
|
||||
Foam::autoPtr<Foam::porousMedia::thermalModel>
|
||||
Foam::porousMedia::thermalModel::New
|
||||
(
|
||||
const porousZone& pZone
|
||||
)
|
||||
@ -43,7 +44,7 @@ Foam::autoPtr<Foam::thermalModel> Foam::thermalModel::New
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"thermalModel::New(const porousZone&)"
|
||||
"porousMedia::thermalModel::New(const porousZone&)"
|
||||
) << "Unknown thermalModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid thermalModel types are :" << endl
|
||||
@ -51,7 +52,7 @@ Foam::autoPtr<Foam::thermalModel> Foam::thermalModel::New
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<thermalModel>(cstrIter()(pZone));
|
||||
return autoPtr<porousMedia::thermalModel>(cstrIter()(pZone));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ Foam::thermalPorousZone::thermalPorousZone
|
||||
)
|
||||
:
|
||||
porousZone(key, mesh, dict),
|
||||
model_(thermalModel::New(*this))
|
||||
model_(porousMedia::thermalModel::New(*this))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -68,7 +68,7 @@ class thermalPorousZone
|
||||
void operator=(const thermalPorousZone&);
|
||||
|
||||
//- Thermal model
|
||||
autoPtr<thermalModel> model_;
|
||||
autoPtr<porousMedia::thermalModel> model_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user