mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Renamed constraint sources as 'constraints'
This commit is contained in:
@ -41,8 +41,8 @@ generalConstraints=constraints/general
|
||||
$(generalConstraints)/explicitSetValue/explicitSetValue.C
|
||||
|
||||
derivedConstraints=constraints/derived
|
||||
$(derivedConstraints)/fixedTemperatureSource/fixedTemperatureSource.C
|
||||
$(derivedConstraints)/temperatureLimits/temperatureLimits.C
|
||||
$(derivedConstraints)/fixedTemperatureConstraint/fixedTemperatureConstraint.C
|
||||
$(derivedConstraints)/temperatureLimitsConstraint/temperatureLimitsConstraint.C
|
||||
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libfieldSources
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
|
||||
\*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "fixedTemperatureSource.H"
|
||||
#include "fixedTemperatureConstraint.H"
|
||||
#include "fvMesh.H"
|
||||
#include "fvMatrices.H"
|
||||
#include "basicThermo.H"
|
||||
@ -34,29 +34,30 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(fixedTemperatureSource, 0);
|
||||
defineTypeNameAndDebug(fixedTemperatureConstraint, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
basicSource,
|
||||
fixedTemperatureSource,
|
||||
fixedTemperatureConstraint,
|
||||
dictionary
|
||||
);
|
||||
|
||||
template<>
|
||||
const char* NamedEnum<fixedTemperatureSource::temperatureMode, 2>::names[] =
|
||||
const char* NamedEnum<fixedTemperatureConstraint::temperatureMode, 2>::
|
||||
names[] =
|
||||
{
|
||||
"uniform",
|
||||
"lookup"
|
||||
};
|
||||
}
|
||||
|
||||
const Foam::NamedEnum<Foam::fixedTemperatureSource::temperatureMode, 2>
|
||||
Foam::fixedTemperatureSource::temperatureModeNames_;
|
||||
const Foam::NamedEnum<Foam::fixedTemperatureConstraint::temperatureMode, 2>
|
||||
Foam::fixedTemperatureConstraint::temperatureModeNames_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::fixedTemperatureSource::fixedTemperatureSource
|
||||
Foam::fixedTemperatureConstraint::fixedTemperatureConstraint
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
@ -98,13 +99,13 @@ Foam::fixedTemperatureSource::fixedTemperatureSource
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::fixedTemperatureSource::alwaysApply() const
|
||||
bool Foam::fixedTemperatureConstraint::alwaysApply() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void Foam::fixedTemperatureSource::setValue
|
||||
void Foam::fixedTemperatureConstraint::setValue
|
||||
(
|
||||
fvMatrix<scalar>& eqn,
|
||||
const label
|
||||
@ -145,14 +146,14 @@ void Foam::fixedTemperatureSource::setValue
|
||||
}
|
||||
|
||||
|
||||
void Foam::fixedTemperatureSource::writeData(Ostream& os) const
|
||||
void Foam::fixedTemperatureConstraint::writeData(Ostream& os) const
|
||||
{
|
||||
os << indent << name_ << endl;
|
||||
dict_.write(os);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::fixedTemperatureSource::read(const dictionary& dict)
|
||||
bool Foam::fixedTemperatureConstraint::read(const dictionary& dict)
|
||||
{
|
||||
if (basicSource::read(dict))
|
||||
{
|
||||
@ -23,14 +23,14 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::fixedTemperatureSource
|
||||
Foam::fixedTemperatureConstraint
|
||||
|
||||
Description
|
||||
Fixed temperature equation constraint
|
||||
|
||||
Sources described by:
|
||||
|
||||
fixedTemperatureSourceCoeffs
|
||||
fixedTemperatureConstraintCoeffs
|
||||
{
|
||||
mode uniform; // uniform or lookup
|
||||
|
||||
@ -50,8 +50,8 @@ SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef fixedTemperatureSource_H
|
||||
#define fixedTemperatureSource_H
|
||||
#ifndef fixedTemperatureConstraint_H
|
||||
#define fixedTemperatureConstraint_H
|
||||
|
||||
#include "basicSource.H"
|
||||
#include "NamedEnum.H"
|
||||
@ -63,10 +63,10 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class fixedTemperatureSource Declaration
|
||||
Class fixedTemperatureConstraint Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class fixedTemperatureSource
|
||||
class fixedTemperatureConstraint
|
||||
:
|
||||
public basicSource
|
||||
{
|
||||
@ -104,22 +104,22 @@ private:
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
fixedTemperatureSource(const fixedTemperatureSource&);
|
||||
fixedTemperatureConstraint(const fixedTemperatureConstraint&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const fixedTemperatureSource&);
|
||||
void operator=(const fixedTemperatureConstraint&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("fixedTemperatureSource");
|
||||
TypeName("fixedTemperatureConstraint");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
fixedTemperatureSource
|
||||
fixedTemperatureConstraint
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
@ -129,7 +129,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~fixedTemperatureSource()
|
||||
virtual ~fixedTemperatureConstraint()
|
||||
{}
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
|
||||
\*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "temperatureLimits.H"
|
||||
#include "temperatureLimitsConstraint.H"
|
||||
#include "fvMesh.H"
|
||||
#include "basicThermo.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
@ -33,13 +33,18 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(temperatureLimits, 0);
|
||||
addToRunTimeSelectionTable(basicSource, temperatureLimits, dictionary);
|
||||
defineTypeNameAndDebug(temperatureLimitsConstraint, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
basicSource,
|
||||
temperatureLimitsConstraint,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::temperatureLimits::temperatureLimits
|
||||
Foam::temperatureLimitsConstraint::temperatureLimitsConstraint
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
@ -58,13 +63,13 @@ Foam::temperatureLimits::temperatureLimits
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::temperatureLimits::alwaysApply() const
|
||||
bool Foam::temperatureLimitsConstraint::alwaysApply() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void Foam::temperatureLimits::correct(volScalarField& he)
|
||||
void Foam::temperatureLimitsConstraint::correct(volScalarField& he)
|
||||
{
|
||||
const basicThermo& thermo =
|
||||
mesh_.lookupObject<basicThermo>("thermophysicalProperties");
|
||||
@ -118,14 +123,14 @@ void Foam::temperatureLimits::correct(volScalarField& he)
|
||||
}
|
||||
|
||||
|
||||
void Foam::temperatureLimits::writeData(Ostream& os) const
|
||||
void Foam::temperatureLimitsConstraint::writeData(Ostream& os) const
|
||||
{
|
||||
os << indent << name_ << endl;
|
||||
dict_.write(os);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::temperatureLimits::read(const dictionary& dict)
|
||||
bool Foam::temperatureLimitsConstraint::read(const dictionary& dict)
|
||||
{
|
||||
if (basicSource::read(dict))
|
||||
{
|
||||
@ -23,7 +23,7 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::temperatureLimits
|
||||
Foam::temperatureLimitsConstraint
|
||||
|
||||
Description
|
||||
Constraint for temperature to apply limits between minimum and maximum
|
||||
@ -31,7 +31,7 @@ Description
|
||||
|
||||
Constraint described by:
|
||||
|
||||
temperatureLimitsCoeffs
|
||||
temperatureLimitsConstraintCoeffs
|
||||
{
|
||||
minimum 200;
|
||||
maximum 500;
|
||||
@ -43,8 +43,8 @@ SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef temperatureLimits_H
|
||||
#define temperatureLimits_H
|
||||
#ifndef temperatureLimitsConstraint_H
|
||||
#define temperatureLimitsConstraint_H
|
||||
|
||||
#include "basicSource.H"
|
||||
|
||||
@ -54,10 +54,10 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class temperatureLimits Declaration
|
||||
Class temperatureLimitsConstraint Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class temperatureLimits
|
||||
class temperatureLimitsConstraint
|
||||
:
|
||||
public basicSource
|
||||
{
|
||||
@ -78,22 +78,22 @@ private:
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
temperatureLimits(const temperatureLimits&);
|
||||
temperatureLimitsConstraint(const temperatureLimitsConstraint&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const temperatureLimits&);
|
||||
void operator=(const temperatureLimitsConstraint&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("temperatureLimits");
|
||||
TypeName("temperatureLimitsConstraint");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
temperatureLimits
|
||||
temperatureLimitsConstraint
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
@ -103,7 +103,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~temperatureLimits()
|
||||
virtual ~temperatureLimitsConstraint()
|
||||
{}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user