mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Propagated basicSource->fv::option changes across field sources
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
basicSource/basicSource.C
|
||||
basicSource/basicSourceIO.C
|
||||
basicSource/basicSourceList.C
|
||||
basicSource/IObasicSourceList.C
|
||||
fvOptions/fvOption.C
|
||||
fvOptions/fvOptionIO.C
|
||||
fvOptions/fvOptionList.C
|
||||
fvOptions/fvIOoptionList.C
|
||||
|
||||
|
||||
/* sources */
|
||||
|
||||
@ -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
|
||||
@ -34,16 +34,19 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(fixedTemperatureConstraint, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
basicSource,
|
||||
fixedTemperatureConstraint,
|
||||
dictionary
|
||||
);
|
||||
namespace fv
|
||||
{
|
||||
defineTypeNameAndDebug(fixedTemperatureConstraint, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
option,
|
||||
fixedTemperatureConstraint,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
|
||||
template<>
|
||||
const char* NamedEnum<fixedTemperatureConstraint::temperatureMode, 2>::
|
||||
const char* NamedEnum<fv::fixedTemperatureConstraint::temperatureMode, 2>::
|
||||
names[] =
|
||||
{
|
||||
"uniform",
|
||||
@ -51,13 +54,13 @@ namespace Foam
|
||||
};
|
||||
}
|
||||
|
||||
const Foam::NamedEnum<Foam::fixedTemperatureConstraint::temperatureMode, 2>
|
||||
Foam::fixedTemperatureConstraint::temperatureModeNames_;
|
||||
const Foam::NamedEnum<Foam::fv::fixedTemperatureConstraint::temperatureMode, 2>
|
||||
Foam::fv::fixedTemperatureConstraint::temperatureModeNames_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::fixedTemperatureConstraint::fixedTemperatureConstraint
|
||||
Foam::fv::fixedTemperatureConstraint::fixedTemperatureConstraint
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
@ -65,7 +68,7 @@ Foam::fixedTemperatureConstraint::fixedTemperatureConstraint
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
basicSource(name, modelType, dict, mesh),
|
||||
option(name, modelType, dict, mesh),
|
||||
mode_(temperatureModeNames_.read(coeffs_.lookup("mode"))),
|
||||
Tuniform_(NULL),
|
||||
TName_("T")
|
||||
@ -99,13 +102,13 @@ Foam::fixedTemperatureConstraint::fixedTemperatureConstraint
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::fixedTemperatureConstraint::alwaysApply() const
|
||||
bool Foam::fv::fixedTemperatureConstraint::alwaysApply() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void Foam::fixedTemperatureConstraint::setValue
|
||||
void Foam::fv::fixedTemperatureConstraint::setValue
|
||||
(
|
||||
fvMatrix<scalar>& eqn,
|
||||
const label
|
||||
@ -146,16 +149,16 @@ void Foam::fixedTemperatureConstraint::setValue
|
||||
}
|
||||
|
||||
|
||||
void Foam::fixedTemperatureConstraint::writeData(Ostream& os) const
|
||||
void Foam::fv::fixedTemperatureConstraint::writeData(Ostream& os) const
|
||||
{
|
||||
os << indent << name_ << endl;
|
||||
dict_.write(os);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::fixedTemperatureConstraint::read(const dictionary& dict)
|
||||
bool Foam::fv::fixedTemperatureConstraint::read(const dictionary& dict)
|
||||
{
|
||||
if (basicSource::read(dict))
|
||||
if (option::read(dict))
|
||||
{
|
||||
if (coeffs_.found(Tuniform_->name()))
|
||||
{
|
||||
|
||||
@ -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
|
||||
@ -23,7 +23,7 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::fixedTemperatureConstraint
|
||||
Foam::fv::fixedTemperatureConstraint
|
||||
|
||||
Description
|
||||
Fixed temperature equation constraint
|
||||
@ -46,14 +46,14 @@ Note:
|
||||
by means of the DataEntry type.
|
||||
|
||||
SourceFiles
|
||||
basicSource.C
|
||||
fvOption.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef fixedTemperatureConstraint_H
|
||||
#define fixedTemperatureConstraint_H
|
||||
|
||||
#include "basicSource.H"
|
||||
#include "fvOption.H"
|
||||
#include "NamedEnum.H"
|
||||
#include "DataEntry.H"
|
||||
|
||||
@ -61,6 +61,8 @@ SourceFiles
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class fixedTemperatureConstraint Declaration
|
||||
@ -68,7 +70,7 @@ namespace Foam
|
||||
|
||||
class fixedTemperatureConstraint
|
||||
:
|
||||
public basicSource
|
||||
public option
|
||||
{
|
||||
|
||||
public:
|
||||
@ -156,6 +158,7 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace fv
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -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
|
||||
@ -32,19 +32,22 @@ License
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
defineTypeNameAndDebug(temperatureLimitsConstraint, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
basicSource,
|
||||
option,
|
||||
temperatureLimitsConstraint,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::temperatureLimitsConstraint::temperatureLimitsConstraint
|
||||
Foam::fv::temperatureLimitsConstraint::temperatureLimitsConstraint
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
@ -52,7 +55,7 @@ Foam::temperatureLimitsConstraint::temperatureLimitsConstraint
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
basicSource(name, modelType, dict, mesh),
|
||||
option(name, modelType, dict, mesh),
|
||||
Tmin_(readScalar(coeffs_.lookup("Tmin"))),
|
||||
Tmax_(readScalar(coeffs_.lookup("Tmax")))
|
||||
{
|
||||
@ -63,13 +66,13 @@ Foam::temperatureLimitsConstraint::temperatureLimitsConstraint
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::temperatureLimitsConstraint::alwaysApply() const
|
||||
bool Foam::fv::temperatureLimitsConstraint::alwaysApply() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void Foam::temperatureLimitsConstraint::correct(volScalarField& he)
|
||||
void Foam::fv::temperatureLimitsConstraint::correct(volScalarField& he)
|
||||
{
|
||||
const basicThermo& thermo =
|
||||
mesh_.lookupObject<basicThermo>("thermophysicalProperties");
|
||||
@ -123,16 +126,16 @@ void Foam::temperatureLimitsConstraint::correct(volScalarField& he)
|
||||
}
|
||||
|
||||
|
||||
void Foam::temperatureLimitsConstraint::writeData(Ostream& os) const
|
||||
void Foam::fv::temperatureLimitsConstraint::writeData(Ostream& os) const
|
||||
{
|
||||
os << indent << name_ << endl;
|
||||
dict_.write(os);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::temperatureLimitsConstraint::read(const dictionary& dict)
|
||||
bool Foam::fv::temperatureLimitsConstraint::read(const dictionary& dict)
|
||||
{
|
||||
if (basicSource::read(dict))
|
||||
if (option::read(dict))
|
||||
{
|
||||
coeffs_.readIfPresent("Tmin", Tmin_);
|
||||
coeffs_.readIfPresent("Tmax", Tmax_);
|
||||
|
||||
@ -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
|
||||
@ -23,7 +23,7 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::temperatureLimitsConstraint
|
||||
Foam::fv::temperatureLimitsConstraint
|
||||
|
||||
Description
|
||||
Constraint for temperature to apply limits between minimum and maximum
|
||||
@ -39,19 +39,21 @@ Description
|
||||
|
||||
|
||||
SourceFiles
|
||||
basicSource.C
|
||||
fvOption.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef temperatureLimitsConstraint_H
|
||||
#define temperatureLimitsConstraint_H
|
||||
|
||||
#include "basicSource.H"
|
||||
#include "fvOption.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class temperatureLimitsConstraint Declaration
|
||||
@ -59,7 +61,7 @@ namespace Foam
|
||||
|
||||
class temperatureLimitsConstraint
|
||||
:
|
||||
public basicSource
|
||||
public option
|
||||
{
|
||||
|
||||
protected:
|
||||
@ -130,6 +132,7 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace fv
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -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
|
||||
@ -31,7 +31,7 @@ License
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void Foam::ExplicitSetValue<Type>::setFieldData(const dictionary& dict)
|
||||
void Foam::fv::ExplicitSetValue<Type>::setFieldData(const dictionary& dict)
|
||||
{
|
||||
fieldNames_.setSize(dict.toc().size());
|
||||
injectionRate_.setSize(fieldNames_.size());
|
||||
@ -51,7 +51,7 @@ void Foam::ExplicitSetValue<Type>::setFieldData(const dictionary& dict)
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::ExplicitSetValue<Type>::ExplicitSetValue
|
||||
Foam::fv::ExplicitSetValue<Type>::ExplicitSetValue
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
@ -59,7 +59,7 @@ Foam::ExplicitSetValue<Type>::ExplicitSetValue
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
basicSource(name, modelType, dict, mesh),
|
||||
option(name, modelType, dict, mesh),
|
||||
injectionRate_()
|
||||
{
|
||||
read(dict);
|
||||
@ -69,7 +69,7 @@ Foam::ExplicitSetValue<Type>::ExplicitSetValue
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void Foam::ExplicitSetValue<Type>::setValue
|
||||
void Foam::fv::ExplicitSetValue<Type>::setValue
|
||||
(
|
||||
fvMatrix<Type>& eqn,
|
||||
const label fieldI
|
||||
|
||||
@ -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
|
||||
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::explicitSetValue
|
||||
Foam::fv::explicitSetValue
|
||||
|
||||
Description
|
||||
Set values field values explicity.
|
||||
@ -41,7 +41,7 @@ Description
|
||||
\endverbatim
|
||||
|
||||
SeeAlso
|
||||
Foam::basicSource
|
||||
Foam::fvOption
|
||||
|
||||
SourceFiles
|
||||
explicitSetValue.C
|
||||
@ -51,13 +51,15 @@ SourceFiles
|
||||
#ifndef ExplicitSetValue_H
|
||||
#define ExplicitSetValue_H
|
||||
|
||||
#include "basicSource.H"
|
||||
#include "fvOption.H"
|
||||
#include "Tuple2.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class explicitSetValue Declaration
|
||||
@ -66,7 +68,7 @@ namespace Foam
|
||||
template<class Type>
|
||||
class ExplicitSetValue
|
||||
:
|
||||
public basicSource
|
||||
public option
|
||||
{
|
||||
|
||||
protected:
|
||||
@ -121,6 +123,7 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace fv
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -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
|
||||
@ -28,7 +28,7 @@ License
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void Foam::ExplicitSetValue<Type>::writeData(Ostream& os) const
|
||||
void Foam::fv::ExplicitSetValue<Type>::writeData(Ostream& os) const
|
||||
{
|
||||
os << indent << name_ << endl;
|
||||
dict_.write(os);
|
||||
@ -36,9 +36,9 @@ void Foam::ExplicitSetValue<Type>::writeData(Ostream& os) const
|
||||
|
||||
|
||||
template<class Type>
|
||||
bool Foam::ExplicitSetValue<Type>::read(const dictionary& dict)
|
||||
bool Foam::fv::ExplicitSetValue<Type>::read(const dictionary& dict)
|
||||
{
|
||||
if (basicSource::read(dict))
|
||||
if (option::read(dict))
|
||||
{
|
||||
setFieldData(coeffs_.subDict("injectionRate"));
|
||||
return true;
|
||||
|
||||
@ -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
|
||||
@ -23,18 +23,21 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "makeBasicSource.H"
|
||||
#include "makeFvOption.H"
|
||||
#include "ExplicitSetValue.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeBasicSource(ExplicitSetValue, scalar);
|
||||
makeBasicSource(ExplicitSetValue, vector);
|
||||
makeBasicSource(ExplicitSetValue, sphericalTensor);
|
||||
makeBasicSource(ExplicitSetValue, symmTensor);
|
||||
makeBasicSource(ExplicitSetValue, tensor);
|
||||
namespace fv
|
||||
{
|
||||
makeFvOption(ExplicitSetValue, scalar);
|
||||
makeFvOption(ExplicitSetValue, vector);
|
||||
makeFvOption(ExplicitSetValue, sphericalTensor);
|
||||
makeFvOption(ExplicitSetValue, symmTensor);
|
||||
makeFvOption(ExplicitSetValue, tensor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
Info<< "Creating sources" << endl;
|
||||
IObasicSourceList sources(mesh);
|
||||
Info<< "Creating finite volume options" << endl;
|
||||
fv::IOoptionList fvOptions(mesh);
|
||||
|
||||
@ -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
|
||||
@ -33,19 +33,22 @@ License
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
defineTypeNameAndDebug(MRFSource, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
basicSource,
|
||||
option,
|
||||
MRFSource,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||
|
||||
void Foam::MRFSource::initialise()
|
||||
void Foam::fv::MRFSource::initialise()
|
||||
{
|
||||
if (selectionMode_ != smCellZone)
|
||||
{
|
||||
@ -77,7 +80,7 @@ void Foam::MRFSource::initialise()
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::MRFSource::MRFSource
|
||||
Foam::fv::MRFSource::MRFSource
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
@ -85,7 +88,7 @@ Foam::MRFSource::MRFSource
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
basicSource(name, modelType, dict, mesh),
|
||||
option(name, modelType, dict, mesh),
|
||||
mrfPtr_(NULL),
|
||||
UName_(coeffs_.lookupOrDefault<word>("UName", "U")),
|
||||
rhoName_(coeffs_.lookupOrDefault<word>("rhoName", "rho"))
|
||||
@ -96,7 +99,7 @@ Foam::MRFSource::MRFSource
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::MRFSource::addSup
|
||||
void Foam::fv::MRFSource::addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
@ -118,13 +121,13 @@ void Foam::MRFSource::addSup
|
||||
}
|
||||
|
||||
|
||||
void Foam::MRFSource::relativeFlux(surfaceScalarField& phi) const
|
||||
void Foam::fv::MRFSource::relativeFlux(surfaceScalarField& phi) const
|
||||
{
|
||||
mrfPtr_->relativeFlux(phi);
|
||||
}
|
||||
|
||||
|
||||
void Foam::MRFSource::relativeFlux
|
||||
void Foam::fv::MRFSource::relativeFlux
|
||||
(
|
||||
const surfaceScalarField& rho,
|
||||
surfaceScalarField& phi
|
||||
@ -134,13 +137,13 @@ void Foam::MRFSource::relativeFlux
|
||||
}
|
||||
|
||||
|
||||
void Foam::MRFSource::absoluteFlux(surfaceScalarField& phi) const
|
||||
void Foam::fv::MRFSource::absoluteFlux(surfaceScalarField& phi) const
|
||||
{
|
||||
mrfPtr_->absoluteFlux(phi);
|
||||
}
|
||||
|
||||
|
||||
void Foam::MRFSource::absoluteFlux
|
||||
void Foam::fv::MRFSource::absoluteFlux
|
||||
(
|
||||
const surfaceScalarField& rho,
|
||||
surfaceScalarField& phi
|
||||
@ -150,16 +153,16 @@ void Foam::MRFSource::absoluteFlux
|
||||
}
|
||||
|
||||
|
||||
void Foam::MRFSource::writeData(Ostream& os) const
|
||||
void Foam::fv::MRFSource::writeData(Ostream& os) const
|
||||
{
|
||||
os << indent << name_ << endl;
|
||||
dict_.write(os);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::MRFSource::read(const dictionary& dict)
|
||||
bool Foam::fv::MRFSource::read(const dictionary& dict)
|
||||
{
|
||||
if (basicSource::read(dict))
|
||||
if (option::read(dict))
|
||||
{
|
||||
coeffs_.readIfPresent("UName", UName_);
|
||||
coeffs_.readIfPresent("rhoName", rhoName_);
|
||||
|
||||
@ -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
|
||||
@ -23,7 +23,7 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::MRFSource
|
||||
Foam::fv::MRFSource
|
||||
|
||||
Description
|
||||
Multiple Reference Frame (MRF) source
|
||||
@ -45,7 +45,7 @@ SourceFiles
|
||||
#ifndef MRFSource_H
|
||||
#define MRFSource_H
|
||||
|
||||
#include "basicSource.H"
|
||||
#include "fvOption.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -54,13 +54,16 @@ namespace Foam
|
||||
|
||||
class MRFZone;
|
||||
|
||||
namespace fv
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class MRFSource Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class MRFSource
|
||||
:
|
||||
public basicSource
|
||||
public option
|
||||
{
|
||||
|
||||
protected:
|
||||
@ -164,6 +167,7 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace fv
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -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
|
||||
@ -26,49 +26,52 @@ License
|
||||
|
||||
#include "actuationDiskSource.H"
|
||||
#include "fvMesh.H"
|
||||
#include "fvMatrices.H"
|
||||
#include "fvMatrix.H"
|
||||
#include "geometricOneField.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
defineTypeNameAndDebug(actuationDiskSource, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
basicSource,
|
||||
option,
|
||||
actuationDiskSource,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::actuationDiskSource::checkData() const
|
||||
void Foam::fv::actuationDiskSource::checkData() const
|
||||
{
|
||||
if (magSqr(diskArea_) <= VSMALL)
|
||||
{
|
||||
FatalErrorIn("Foam::actuationDiskSource::checkData()")
|
||||
FatalErrorIn("Foam::fv::actuationDiskSource::checkData()")
|
||||
<< "diskArea is approximately zero"
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
if (Cp_ <= VSMALL || Ct_ <= VSMALL)
|
||||
{
|
||||
FatalErrorIn("Foam::actuationDiskSource::checkData()")
|
||||
FatalErrorIn("Foam::fv::actuationDiskSource::checkData()")
|
||||
<< "Cp and Ct must be greater than zero"
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
if (mag(diskDir_) < VSMALL)
|
||||
{
|
||||
FatalErrorIn("Foam::actuationDiskSource::checkData()")
|
||||
FatalErrorIn("Foam::fv::actuationDiskSource::checkData()")
|
||||
<< "disk direction vector is approximately zero"
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
if (returnReduce(upstreamCellId_, maxOp<label>()) == -1)
|
||||
{
|
||||
FatalErrorIn("Foam::actuationDiskSource::checkData()")
|
||||
FatalErrorIn("Foam::fv::actuationDiskSource::checkData()")
|
||||
<< "upstream location " << upstreamPoint_ << " not found in mesh"
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
@ -77,7 +80,7 @@ void Foam::actuationDiskSource::checkData() const
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::actuationDiskSource::actuationDiskSource
|
||||
Foam::fv::actuationDiskSource::actuationDiskSource
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
@ -85,7 +88,7 @@ Foam::actuationDiskSource::actuationDiskSource
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
basicSource(name, modelType, dict, mesh),
|
||||
option(name, modelType, dict, mesh),
|
||||
diskDir_(coeffs_.lookup("diskDir")),
|
||||
Cp_(readScalar(coeffs_.lookup("Cp"))),
|
||||
Ct_(readScalar(coeffs_.lookup("Ct"))),
|
||||
@ -107,7 +110,7 @@ Foam::actuationDiskSource::actuationDiskSource
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::actuationDiskSource::addSup
|
||||
void Foam::fv::actuationDiskSource::addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
@ -151,16 +154,16 @@ void Foam::actuationDiskSource::addSup
|
||||
}
|
||||
|
||||
|
||||
void Foam::actuationDiskSource::writeData(Ostream& os) const
|
||||
void Foam::fv::actuationDiskSource::writeData(Ostream& os) const
|
||||
{
|
||||
os << indent << name_ << endl;
|
||||
dict_.write(os);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::actuationDiskSource::read(const dictionary& dict)
|
||||
bool Foam::fv::actuationDiskSource::read(const dictionary& dict)
|
||||
{
|
||||
if (basicSource::read(dict))
|
||||
if (option::read(dict))
|
||||
{
|
||||
coeffs_.readIfPresent("diskDir", diskDir_);
|
||||
coeffs_.readIfPresent("Cp", Cp_);
|
||||
|
||||
@ -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
|
||||
@ -23,7 +23,7 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::actuationDiskSource
|
||||
Foam::fv::actuationDiskSource
|
||||
|
||||
Description
|
||||
Actuation disk source
|
||||
@ -61,12 +61,14 @@ SourceFiles
|
||||
#ifndef actuationDiskSource_H
|
||||
#define actuationDiskSource_H
|
||||
|
||||
#include "basicSource.H"
|
||||
#include "fvOption.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class actuationDiskSource Declaration
|
||||
@ -74,7 +76,7 @@ namespace Foam
|
||||
|
||||
class actuationDiskSource
|
||||
:
|
||||
public basicSource
|
||||
public option
|
||||
{
|
||||
|
||||
protected:
|
||||
@ -195,6 +197,7 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace fv
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -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
|
||||
@ -26,13 +26,11 @@ License
|
||||
|
||||
#include "actuationDiskSource.H"
|
||||
#include "volFields.H"
|
||||
#include "fvMatrix.H"
|
||||
#include "fvm.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class RhoFieldType>
|
||||
void Foam::actuationDiskSource::addActuationDiskAxialInertialResistance
|
||||
void Foam::fv::actuationDiskSource::addActuationDiskAxialInertialResistance
|
||||
(
|
||||
vectorField& Usource,
|
||||
const labelList& cells,
|
||||
|
||||
@ -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
|
||||
@ -33,23 +33,26 @@ License
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
defineTypeNameAndDebug(explicitPorositySource, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
basicSource,
|
||||
option,
|
||||
explicitPorositySource,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||
|
||||
void Foam::explicitPorositySource::initialise()
|
||||
void Foam::fv::explicitPorositySource::initialise()
|
||||
{
|
||||
if (selectionMode_ != smCellZone)
|
||||
{
|
||||
FatalErrorIn("void Foam::explicitPorositySource::initialise()")
|
||||
FatalErrorIn("void Foam::fv::explicitPorositySource::initialise()")
|
||||
<< "The porosity region must be specified as a cellZone. Current "
|
||||
<< "selection mode is " << selectionModeTypeNames_[selectionMode_]
|
||||
<< exit(FatalError);
|
||||
@ -73,7 +76,7 @@ void Foam::explicitPorositySource::initialise()
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::explicitPorositySource::explicitPorositySource
|
||||
Foam::fv::explicitPorositySource::explicitPorositySource
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
@ -81,7 +84,7 @@ Foam::explicitPorositySource::explicitPorositySource
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
basicSource(name, modelType, dict, mesh),
|
||||
option(name, modelType, dict, mesh),
|
||||
porosityPtr_(NULL),
|
||||
UName_(coeffs_.lookupOrDefault<word>("UName", "U")),
|
||||
rhoName_(coeffs_.lookupOrDefault<word>("rhoName", "rho")),
|
||||
@ -93,7 +96,7 @@ Foam::explicitPorositySource::explicitPorositySource
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::explicitPorositySource::addSup
|
||||
void Foam::fv::explicitPorositySource::addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
@ -118,16 +121,16 @@ void Foam::explicitPorositySource::addSup
|
||||
}
|
||||
|
||||
|
||||
void Foam::explicitPorositySource::writeData(Ostream& os) const
|
||||
void Foam::fv::explicitPorositySource::writeData(Ostream& os) const
|
||||
{
|
||||
os << indent << name_ << endl;
|
||||
dict_.write(os);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::explicitPorositySource::read(const dictionary& dict)
|
||||
bool Foam::fv::explicitPorositySource::read(const dictionary& dict)
|
||||
{
|
||||
if (basicSource::read(dict))
|
||||
if (option::read(dict))
|
||||
{
|
||||
coeffs_.readIfPresent("UName", UName_);
|
||||
coeffs_.readIfPresent("rhoName", rhoName_);
|
||||
|
||||
@ -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
|
||||
@ -23,7 +23,7 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::explicitPorositySource
|
||||
Foam::fv::explicitPorositySource
|
||||
|
||||
Description
|
||||
Explicit porosity source
|
||||
@ -57,7 +57,7 @@ SourceFiles
|
||||
#ifndef explicitPorositySource_H
|
||||
#define explicitPorositySource_H
|
||||
|
||||
#include "basicSource.H"
|
||||
#include "fvOption.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -66,13 +66,17 @@ namespace Foam
|
||||
|
||||
class porosityModel;
|
||||
|
||||
namespace fv
|
||||
{
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class explicitPorositySource Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class explicitPorositySource
|
||||
:
|
||||
public basicSource
|
||||
public option
|
||||
{
|
||||
|
||||
protected:
|
||||
@ -157,6 +161,7 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace fv
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -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
|
||||
@ -25,27 +25,29 @@ License
|
||||
|
||||
#include "constantHeatTransfer.H"
|
||||
#include "fvm.H"
|
||||
#include "IObasicSourceList.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvcVolumeIntegrate.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
defineTypeNameAndDebug(constantHeatTransfer, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
basicSource,
|
||||
option,
|
||||
constantHeatTransfer,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::constantHeatTransfer::constantHeatTransfer
|
||||
Foam::fv::constantHeatTransfer::constantHeatTransfer
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
@ -99,20 +101,20 @@ Foam::constantHeatTransfer::constantHeatTransfer
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::constantHeatTransfer::~constantHeatTransfer()
|
||||
Foam::fv::constantHeatTransfer::~constantHeatTransfer()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
const Foam::tmp<Foam::volScalarField>Foam::constantHeatTransfer::
|
||||
calculateHtc()
|
||||
const Foam::tmp<Foam::volScalarField>
|
||||
Foam::fv::constantHeatTransfer::calculateHtc()
|
||||
{
|
||||
return htc_;
|
||||
}
|
||||
|
||||
|
||||
void Foam::constantHeatTransfer::writeData(Ostream& os) const
|
||||
void Foam::fv::constantHeatTransfer::writeData(Ostream& os) const
|
||||
{
|
||||
os << indent << token::BEGIN_BLOCK << incrIndent << nl;
|
||||
interRegionHeatTransferModel::writeData(os);
|
||||
@ -125,9 +127,9 @@ void Foam::constantHeatTransfer::writeData(Ostream& os) const
|
||||
}
|
||||
|
||||
|
||||
bool Foam::constantHeatTransfer::read(const dictionary& dict)
|
||||
bool Foam::fv::constantHeatTransfer::read(const dictionary& dict)
|
||||
{
|
||||
if (basicSource::read(dict))
|
||||
if (option::read(dict))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -138,4 +140,4 @@ bool Foam::constantHeatTransfer::read(const dictionary& dict)
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -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
|
||||
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::constantHeatTransfer
|
||||
Foam::fv::constantHeatTransfer
|
||||
|
||||
Description
|
||||
Constant heat transfer model. htCoeffs [W/m2/K] and area [m2] must be
|
||||
@ -40,8 +40,11 @@ Description
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class constantHeatTransfer Declaration
|
||||
Class constantHeatTransfer Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class constantHeatTransfer
|
||||
@ -94,17 +97,16 @@ public:
|
||||
|
||||
//- Read dictionary
|
||||
virtual bool read(const dictionary& dict) ;
|
||||
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace fv
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -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
|
||||
@ -26,32 +26,32 @@ License
|
||||
#include "interRegionHeatTransferModel.H"
|
||||
#include "fluidThermo.H"
|
||||
#include "fvm.H"
|
||||
#include "IObasicSourceList.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "fvcVolumeIntegrate.H"
|
||||
#include "fvOptionList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
defineTypeNameAndDebug(interRegionHeatTransferModel, 0);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Private member functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::interRegionHeatTransferModel::check()
|
||||
void Foam::fv::interRegionHeatTransferModel::check()
|
||||
{
|
||||
const fvMesh& secondaryMesh =
|
||||
mesh_.time().lookupObject<fvMesh>(mapRegionName_);
|
||||
mesh_.time().lookupObject<fvMesh>(mapRegionName_);
|
||||
|
||||
const basicSourceList& IObsl =
|
||||
secondaryMesh.lookupObject<basicSourceList>
|
||||
(
|
||||
"sourcesProperties"
|
||||
);
|
||||
const optionList& IObsl =
|
||||
secondaryMesh.lookupObject<optionList>("sourcesProperties");
|
||||
|
||||
const PtrList<basicSource>& bsl = IObsl;
|
||||
const PtrList<option>& bsl = IObsl;
|
||||
|
||||
bool secSourceFound(false);
|
||||
|
||||
@ -70,10 +70,8 @@ void Foam::interRegionHeatTransferModel::check()
|
||||
|
||||
if (!secSourceFound)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"constantHeatTransfer::interRegionHeatTransferModel::check()"
|
||||
) << "Secondary source name not found" << secondarySourceName_
|
||||
FatalErrorIn("interRegionHeatTransferModel::check()")
|
||||
<< "Secondary source name not found" << secondarySourceName_
|
||||
<< " in region " << secondaryMesh.name()
|
||||
<< nl
|
||||
<< exit(FatalError);
|
||||
@ -83,7 +81,7 @@ void Foam::interRegionHeatTransferModel::check()
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::interRegionHeatTransferModel::interRegionHeatTransferModel
|
||||
Foam::fv::interRegionHeatTransferModel::interRegionHeatTransferModel
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
@ -91,7 +89,7 @@ Foam::interRegionHeatTransferModel::interRegionHeatTransferModel
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
basicSource(name, modelType, dict, mesh),
|
||||
option(name, modelType, dict, mesh),
|
||||
secIrht_(),
|
||||
firstIter_(true),
|
||||
htc_
|
||||
@ -121,13 +119,13 @@ Foam::interRegionHeatTransferModel::interRegionHeatTransferModel
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::interRegionHeatTransferModel::~interRegionHeatTransferModel()
|
||||
Foam::fv::interRegionHeatTransferModel::~interRegionHeatTransferModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::interRegionHeatTransferModel::addSup
|
||||
void Foam::fv::interRegionHeatTransferModel::addSup
|
||||
(
|
||||
fvMatrix<scalar>& eEqn,
|
||||
const label fieldI
|
||||
@ -234,7 +232,7 @@ void Foam::interRegionHeatTransferModel::addSup
|
||||
}
|
||||
|
||||
|
||||
void Foam::interRegionHeatTransferModel::writeData(Ostream& os) const
|
||||
void Foam::fv::interRegionHeatTransferModel::writeData(Ostream& os) const
|
||||
{
|
||||
os.writeKeyword("name") << this->name() << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("mapRegionName") << mapRegionName_
|
||||
@ -254,9 +252,9 @@ void Foam::interRegionHeatTransferModel::writeData(Ostream& os) const
|
||||
}
|
||||
|
||||
|
||||
bool Foam::interRegionHeatTransferModel::read(const dictionary& dict)
|
||||
bool Foam::fv::interRegionHeatTransferModel::read(const dictionary& dict)
|
||||
{
|
||||
if (basicSource::read(dict))
|
||||
if (option::read(dict))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -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
|
||||
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::interRegionHeatTransferModel
|
||||
Foam::fv::interRegionHeatTransferModel
|
||||
|
||||
Description
|
||||
Base class for inter region heat exchange. The derived classes must
|
||||
@ -33,7 +33,7 @@ Description
|
||||
#ifndef interRegionHeatTransferModel_H
|
||||
#define interRegionHeatTransferModel_H
|
||||
|
||||
#include "basicSource.H"
|
||||
#include "fvOption.H"
|
||||
#include "volFields.H"
|
||||
|
||||
|
||||
@ -41,6 +41,8 @@ Description
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class interRegionHeatTransferModel Declaration
|
||||
@ -48,7 +50,7 @@ namespace Foam
|
||||
|
||||
class interRegionHeatTransferModel
|
||||
:
|
||||
public basicSource
|
||||
public option
|
||||
{
|
||||
|
||||
private:
|
||||
@ -129,9 +131,9 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace fv
|
||||
} // End namespace Foam
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
#endif
|
||||
|
||||
|
||||
@ -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
|
||||
@ -31,20 +31,23 @@ License
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
defineTypeNameAndDebug(tabulatedHeatTransfer, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
basicSource,
|
||||
option,
|
||||
tabulatedHeatTransfer,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tabulatedHeatTransfer::tabulatedHeatTransfer
|
||||
Foam::fv::tabulatedHeatTransfer::tabulatedHeatTransfer
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
@ -86,15 +89,15 @@ Foam::tabulatedHeatTransfer::tabulatedHeatTransfer
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tabulatedHeatTransfer::~tabulatedHeatTransfer()
|
||||
Foam::fv::tabulatedHeatTransfer::~tabulatedHeatTransfer()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
const Foam::tmp<Foam::volScalarField>Foam::tabulatedHeatTransfer::
|
||||
calculateHtc()
|
||||
const Foam::tmp<Foam::volScalarField>
|
||||
Foam::fv::tabulatedHeatTransfer::calculateHtc()
|
||||
{
|
||||
const fvMesh& secondaryMesh =
|
||||
mesh_.time().lookupObject<fvMesh>(mapRegionName());
|
||||
@ -126,7 +129,7 @@ calculateHtc()
|
||||
}
|
||||
|
||||
|
||||
void Foam::tabulatedHeatTransfer::writeData(Ostream& os) const
|
||||
void Foam::fv::tabulatedHeatTransfer::writeData(Ostream& os) const
|
||||
{
|
||||
os << indent << token::BEGIN_BLOCK << incrIndent << nl;
|
||||
interRegionHeatTransferModel::writeData(os);
|
||||
@ -139,9 +142,9 @@ void Foam::tabulatedHeatTransfer::writeData(Ostream& os) const
|
||||
}
|
||||
|
||||
|
||||
bool Foam::tabulatedHeatTransfer::read(const dictionary& dict)
|
||||
bool Foam::fv::tabulatedHeatTransfer::read(const dictionary& dict)
|
||||
{
|
||||
if (basicSource::read(dict))
|
||||
if (option::read(dict))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -152,4 +155,4 @@ bool Foam::tabulatedHeatTransfer::read(const dictionary& dict)
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -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
|
||||
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::tabulatedHeatTransfer
|
||||
Foam::fv::tabulatedHeatTransfer
|
||||
|
||||
Description
|
||||
Tabulated heat transfer model. The heat exchange area must be
|
||||
@ -42,6 +42,9 @@ Description
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class tabulatedHeatTransfer Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -102,6 +105,7 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace fv
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -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
|
||||
@ -24,27 +24,29 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "variableHeatTransfer.H"
|
||||
#include "IObasicSourceList.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
defineTypeNameAndDebug(variableHeatTransfer, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
basicSource,
|
||||
option,
|
||||
variableHeatTransfer,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::variableHeatTransfer::variableHeatTransfer
|
||||
Foam::fv::variableHeatTransfer::variableHeatTransfer
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
@ -88,17 +90,16 @@ Foam::variableHeatTransfer::variableHeatTransfer
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::variableHeatTransfer::~variableHeatTransfer()
|
||||
Foam::fv::variableHeatTransfer::~variableHeatTransfer()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
const Foam::tmp<Foam::volScalarField> Foam::variableHeatTransfer::
|
||||
calculateHtc()
|
||||
const Foam::tmp<Foam::volScalarField>
|
||||
Foam::fv::variableHeatTransfer::calculateHtc()
|
||||
{
|
||||
|
||||
const fvMesh& secondaryMesh =
|
||||
mesh_.time().lookupObject<fvMesh>(mapRegionName());
|
||||
|
||||
@ -140,7 +141,7 @@ calculateHtc()
|
||||
}
|
||||
|
||||
|
||||
void Foam::variableHeatTransfer::writeData(Ostream& os) const
|
||||
void Foam::fv::variableHeatTransfer::writeData(Ostream& os) const
|
||||
{
|
||||
os << indent << token::BEGIN_BLOCK << incrIndent << nl;
|
||||
interRegionHeatTransferModel::writeData(os);
|
||||
@ -159,9 +160,9 @@ void Foam::variableHeatTransfer::writeData(Ostream& os) const
|
||||
}
|
||||
|
||||
|
||||
bool Foam::variableHeatTransfer::read(const dictionary& dict)
|
||||
bool Foam::fv::variableHeatTransfer::read(const dictionary& dict)
|
||||
{
|
||||
if (basicSource::read(dict))
|
||||
if (option::read(dict))
|
||||
{
|
||||
|
||||
const dictionary& sourceDict = dict.subDict(name());
|
||||
|
||||
@ -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
|
||||
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::variableHeatTransfer
|
||||
Foam::fv::variableHeatTransfer
|
||||
|
||||
Description
|
||||
Variable heat transfer model depending on local values. The area of contact
|
||||
@ -30,13 +30,13 @@ Description
|
||||
|
||||
Nu = a*pow(Re, b)*pow(Pr, c)
|
||||
|
||||
and the heat transfer coefficient as:
|
||||
and the heat transfer coefficient as:
|
||||
|
||||
htc = Nu*K/ds
|
||||
|
||||
where:
|
||||
K is the heat conduction
|
||||
ds is the strut diameter
|
||||
where:
|
||||
K is the heat conduction
|
||||
ds is the strut diameter
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -50,8 +50,11 @@ Description
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class variableHeatTransfer Declaration
|
||||
Class variableHeatTransfer Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class variableHeatTransfer
|
||||
@ -80,7 +83,7 @@ private:
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("variableHeatTransfer");
|
||||
TypeName("variableHeatTransfer");
|
||||
|
||||
|
||||
// Constructors
|
||||
@ -112,17 +115,16 @@ public:
|
||||
|
||||
//- Read dictionary
|
||||
virtual bool read(const dictionary& dict) ;
|
||||
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace fv
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -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
|
||||
@ -32,21 +32,27 @@ License
|
||||
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
defineTypeNameAndDebug(pressureGradientExplicitSource, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
basicSource,
|
||||
option,
|
||||
pressureGradientExplicitSource,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::pressureGradientExplicitSource::writeProps(const scalar gradP) const
|
||||
void Foam::fv::pressureGradientExplicitSource::writeProps
|
||||
(
|
||||
const scalar gradP
|
||||
) const
|
||||
{
|
||||
// Only write on output time
|
||||
if (mesh_.time().outputTime())
|
||||
@ -71,7 +77,7 @@ void Foam::pressureGradientExplicitSource::writeProps(const scalar gradP) const
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::pressureGradientExplicitSource::pressureGradientExplicitSource
|
||||
Foam::fv::pressureGradientExplicitSource::pressureGradientExplicitSource
|
||||
(
|
||||
const word& sourceName,
|
||||
const word& modelType,
|
||||
@ -79,7 +85,7 @@ Foam::pressureGradientExplicitSource::pressureGradientExplicitSource
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
basicSource(sourceName, modelType, dict, mesh),
|
||||
option(sourceName, modelType, dict, mesh),
|
||||
Ubar_(coeffs_.lookup("Ubar")),
|
||||
gradP0_(0.0),
|
||||
dGradP_(0.0),
|
||||
@ -92,7 +98,7 @@ Foam::pressureGradientExplicitSource::pressureGradientExplicitSource
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::pressureGradientExplicitSource::"
|
||||
"Foam::fv::pressureGradientExplicitSource::"
|
||||
"pressureGradientExplicitSource"
|
||||
"("
|
||||
"const word&, "
|
||||
@ -125,7 +131,7 @@ Foam::pressureGradientExplicitSource::pressureGradientExplicitSource
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::pressureGradientExplicitSource::correct(volVectorField& U)
|
||||
void Foam::fv::pressureGradientExplicitSource::correct(volVectorField& U)
|
||||
{
|
||||
const scalarField& rAU = invAPtr_().internalField();
|
||||
|
||||
@ -169,7 +175,7 @@ void Foam::pressureGradientExplicitSource::correct(volVectorField& U)
|
||||
}
|
||||
|
||||
|
||||
void Foam::pressureGradientExplicitSource::addSup
|
||||
void Foam::fv::pressureGradientExplicitSource::addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
@ -197,7 +203,7 @@ void Foam::pressureGradientExplicitSource::addSup
|
||||
}
|
||||
|
||||
|
||||
void Foam::pressureGradientExplicitSource::setValue
|
||||
void Foam::fv::pressureGradientExplicitSource::setValue
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label
|
||||
|
||||
@ -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
|
||||
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::pressureGradientExplicitSource
|
||||
Foam::fv::pressureGradientExplicitSource
|
||||
|
||||
Description
|
||||
Creates a pressure gradient source
|
||||
@ -53,12 +53,14 @@ SourceFiles
|
||||
#include "cellSet.H"
|
||||
#include "fvMesh.H"
|
||||
#include "volFields.H"
|
||||
#include "basicSource.H"
|
||||
#include "fvOption.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class pressureGradientExplicitSource Declaration
|
||||
@ -66,7 +68,7 @@ namespace Foam
|
||||
|
||||
class pressureGradientExplicitSource
|
||||
:
|
||||
public basicSource
|
||||
public option
|
||||
{
|
||||
// Private data
|
||||
|
||||
@ -149,6 +151,7 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace fv
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -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
|
||||
@ -27,11 +27,11 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::pressureGradientExplicitSource::writeData(Ostream& os) const
|
||||
void Foam::fv::pressureGradientExplicitSource::writeData(Ostream& os) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"void Foam::pressureGradientExplicitSource::writeData"
|
||||
"void Foam::fv::pressureGradientExplicitSource::writeData"
|
||||
"("
|
||||
"Ostream&"
|
||||
") const"
|
||||
@ -39,11 +39,11 @@ void Foam::pressureGradientExplicitSource::writeData(Ostream& os) const
|
||||
}
|
||||
|
||||
|
||||
bool Foam::pressureGradientExplicitSource::read(const dictionary& dict)
|
||||
bool Foam::fv::pressureGradientExplicitSource::read(const dictionary& dict)
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"bool Foam::pressureGradientExplicitSource::read"
|
||||
"bool Foam::fv::pressureGradientExplicitSource::read"
|
||||
"("
|
||||
"const dictionary&"
|
||||
") const"
|
||||
|
||||
@ -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
|
||||
@ -31,20 +31,22 @@ License
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
defineTypeNameAndDebug(radialActuationDiskSource, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
basicSource,
|
||||
option,
|
||||
radialActuationDiskSource,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::radialActuationDiskSource::radialActuationDiskSource
|
||||
Foam::fv::radialActuationDiskSource::radialActuationDiskSource
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
@ -61,7 +63,7 @@ Foam::radialActuationDiskSource::radialActuationDiskSource
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::radialActuationDiskSource::addSup
|
||||
void Foam::fv::radialActuationDiskSource::addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
@ -105,15 +107,15 @@ void Foam::radialActuationDiskSource::addSup
|
||||
}
|
||||
|
||||
|
||||
void Foam::radialActuationDiskSource::writeData(Ostream& os) const
|
||||
void Foam::fv::radialActuationDiskSource::writeData(Ostream& os) const
|
||||
{
|
||||
actuationDiskSource::writeData(os);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::radialActuationDiskSource::read(const dictionary& dict)
|
||||
bool Foam::fv::radialActuationDiskSource::read(const dictionary& dict)
|
||||
{
|
||||
if (basicSource::read(dict))
|
||||
if (option::read(dict))
|
||||
{
|
||||
coeffs_.readIfPresent("diskDir", diskDir_);
|
||||
coeffs_.readIfPresent("Cp", Cp_);
|
||||
|
||||
@ -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
|
||||
@ -23,7 +23,7 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::radialActuationDiskSource
|
||||
Foam::fv::radialActuationDiskSource
|
||||
|
||||
Description
|
||||
Actuation disk zone definition.
|
||||
@ -73,6 +73,8 @@ SourceFiles
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class radialActuationDiskSource Declaration
|
||||
@ -131,24 +133,25 @@ public:
|
||||
{}
|
||||
|
||||
|
||||
// Public Functions
|
||||
// Member Functions
|
||||
|
||||
//- Source term to fvMatrix<vector>
|
||||
virtual void addSup(fvMatrix<vector>& eqn, const label fieldI);
|
||||
//- Source term to fvMatrix<vector>
|
||||
virtual void addSup(fvMatrix<vector>& eqn, const label fieldI);
|
||||
|
||||
|
||||
// I-O
|
||||
// I-O
|
||||
|
||||
//- Write data
|
||||
virtual void writeData(Ostream&) const;
|
||||
//- Write data
|
||||
virtual void writeData(Ostream&) const;
|
||||
|
||||
//- Read dictionary
|
||||
virtual bool read(const dictionary& dict);
|
||||
//- Read dictionary
|
||||
virtual bool read(const dictionary& dict);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace fv
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -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
|
||||
@ -33,7 +33,7 @@ License
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class RhoFieldType>
|
||||
void Foam::radialActuationDiskSource::
|
||||
void Foam::fv::radialActuationDiskSource::
|
||||
addRadialActuationDiskAxialInertialResistance
|
||||
(
|
||||
vectorField& Usource,
|
||||
|
||||
@ -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
|
||||
@ -93,7 +93,7 @@ public:
|
||||
|
||||
// Selectors
|
||||
|
||||
//- Return a reference to the selected basicSource model
|
||||
//- Return a reference to the selected fvOption model
|
||||
static autoPtr<profileModel> New(const dictionary& dict);
|
||||
|
||||
|
||||
|
||||
@ -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
|
||||
@ -37,20 +37,23 @@ using namespace Foam::constant;
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(rotorDiskSource, 0);
|
||||
addToRunTimeSelectionTable(basicSource, rotorDiskSource, dictionary);
|
||||
namespace fv
|
||||
{
|
||||
defineTypeNameAndDebug(rotorDiskSource, 0);
|
||||
addToRunTimeSelectionTable(option, rotorDiskSource, dictionary);
|
||||
}
|
||||
|
||||
template<> const char* NamedEnum<rotorDiskSource::geometryModeType, 2>::
|
||||
template<> const char* NamedEnum<fv::rotorDiskSource::geometryModeType, 2>::
|
||||
names[] =
|
||||
{
|
||||
"auto",
|
||||
"specified"
|
||||
};
|
||||
|
||||
const NamedEnum<rotorDiskSource::geometryModeType, 2>
|
||||
rotorDiskSource::geometryModeTypeNames_;
|
||||
const NamedEnum<fv::rotorDiskSource::geometryModeType, 2>
|
||||
fv::rotorDiskSource::geometryModeTypeNames_;
|
||||
|
||||
template<> const char* NamedEnum<rotorDiskSource::inletFlowType, 3>::
|
||||
template<> const char* NamedEnum<fv::rotorDiskSource::inletFlowType, 3>::
|
||||
names[] =
|
||||
{
|
||||
"fixed",
|
||||
@ -58,14 +61,14 @@ namespace Foam
|
||||
"local"
|
||||
};
|
||||
|
||||
const NamedEnum<rotorDiskSource::inletFlowType, 3>
|
||||
rotorDiskSource::inletFlowTypeNames_;
|
||||
const NamedEnum<fv::rotorDiskSource::inletFlowType, 3>
|
||||
fv::rotorDiskSource::inletFlowTypeNames_;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::rotorDiskSource::checkData()
|
||||
void Foam::fv::rotorDiskSource::checkData()
|
||||
{
|
||||
// set inflow type
|
||||
switch (selectionMode())
|
||||
@ -122,7 +125,7 @@ void Foam::rotorDiskSource::checkData()
|
||||
}
|
||||
|
||||
|
||||
void Foam::rotorDiskSource::setFaceArea(vector& axis, const bool correct)
|
||||
void Foam::fv::rotorDiskSource::setFaceArea(vector& axis, const bool correct)
|
||||
{
|
||||
area_ = 0.0;
|
||||
|
||||
@ -235,7 +238,7 @@ void Foam::rotorDiskSource::setFaceArea(vector& axis, const bool correct)
|
||||
}
|
||||
|
||||
|
||||
void Foam::rotorDiskSource::createCoordinateSystem()
|
||||
void Foam::fv::rotorDiskSource::createCoordinateSystem()
|
||||
{
|
||||
// construct the local rotor co-prdinate system
|
||||
vector origin(vector::zero);
|
||||
@ -348,7 +351,7 @@ void Foam::rotorDiskSource::createCoordinateSystem()
|
||||
}
|
||||
|
||||
|
||||
void Foam::rotorDiskSource::constructGeometry()
|
||||
void Foam::fv::rotorDiskSource::constructGeometry()
|
||||
{
|
||||
const vectorField& C = mesh_.C();
|
||||
|
||||
@ -382,7 +385,7 @@ void Foam::rotorDiskSource::constructGeometry()
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::vectorField> Foam::rotorDiskSource::inflowVelocity
|
||||
Foam::tmp<Foam::vectorField> Foam::fv::rotorDiskSource::inflowVelocity
|
||||
(
|
||||
const volVectorField& U
|
||||
) const
|
||||
@ -410,7 +413,7 @@ Foam::tmp<Foam::vectorField> Foam::rotorDiskSource::inflowVelocity
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::tmp<Foam::vectorField> "
|
||||
"Foam::rotorDiskSource::inflowVelocity"
|
||||
"Foam::fv::rotorDiskSource::inflowVelocity"
|
||||
"(const volVectorField&) const"
|
||||
) << "Unknown inlet flow specification" << abort(FatalError);
|
||||
}
|
||||
@ -422,7 +425,7 @@ Foam::tmp<Foam::vectorField> Foam::rotorDiskSource::inflowVelocity
|
||||
|
||||
// * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::rotorDiskSource::rotorDiskSource
|
||||
Foam::fv::rotorDiskSource::rotorDiskSource
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
@ -431,7 +434,7 @@ Foam::rotorDiskSource::rotorDiskSource
|
||||
|
||||
)
|
||||
:
|
||||
basicSource(name, modelType, dict, mesh),
|
||||
option(name, modelType, dict, mesh),
|
||||
rhoName_("none"),
|
||||
rhoRef_(1.0),
|
||||
omega_(0.0),
|
||||
@ -456,13 +459,13 @@ Foam::rotorDiskSource::rotorDiskSource
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::rotorDiskSource::~rotorDiskSource()
|
||||
Foam::fv::rotorDiskSource::~rotorDiskSource()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::rotorDiskSource::calculate
|
||||
void Foam::fv::rotorDiskSource::calculate
|
||||
(
|
||||
const vectorField& U,
|
||||
const scalarField& thetag,
|
||||
@ -585,7 +588,11 @@ void Foam::rotorDiskSource::calculate
|
||||
}
|
||||
|
||||
|
||||
void Foam::rotorDiskSource::addSup(fvMatrix<vector>& eqn, const label fieldI)
|
||||
void Foam::fv::rotorDiskSource::addSup
|
||||
(
|
||||
fvMatrix<vector>& eqn,
|
||||
const label fieldI
|
||||
)
|
||||
{
|
||||
dimensionSet dims = dimless;
|
||||
if (eqn.dimensions() == dimForce)
|
||||
@ -632,16 +639,16 @@ void Foam::rotorDiskSource::addSup(fvMatrix<vector>& eqn, const label fieldI)
|
||||
}
|
||||
|
||||
|
||||
void Foam::rotorDiskSource::writeData(Ostream& os) const
|
||||
void Foam::fv::rotorDiskSource::writeData(Ostream& os) const
|
||||
{
|
||||
os << indent << name_ << endl;
|
||||
dict_.write(os);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::rotorDiskSource::read(const dictionary& dict)
|
||||
bool Foam::fv::rotorDiskSource::read(const dictionary& dict)
|
||||
{
|
||||
if (basicSource::read(dict))
|
||||
if (option::read(dict))
|
||||
{
|
||||
coeffs_.lookup("fieldNames") >> fieldNames_;
|
||||
applied_.setSize(fieldNames_.size(), false);
|
||||
|
||||
@ -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
|
||||
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::rotorDiskSource
|
||||
Foam::fv::rotorDiskSource
|
||||
|
||||
Description
|
||||
Cell based momemtum source
|
||||
@ -87,7 +87,7 @@ SourceFiles
|
||||
#ifndef rotorDiskSource_H
|
||||
#define rotorDiskSource_H
|
||||
|
||||
#include "basicSource.H"
|
||||
#include "fvOption.H"
|
||||
#include "cylindricalCS.H"
|
||||
#include "NamedEnum.H"
|
||||
#include "bladeModel.H"
|
||||
@ -103,13 +103,16 @@ namespace Foam
|
||||
// Forward declaration of classes
|
||||
class trimModel;
|
||||
|
||||
namespace fv
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class rotorDiskSource Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class rotorDiskSource
|
||||
:
|
||||
public basicSource
|
||||
public option
|
||||
{
|
||||
public:
|
||||
|
||||
@ -305,6 +308,7 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace fv
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -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
|
||||
@ -27,37 +27,37 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::scalar Foam::rotorDiskSource::rhoRef() const
|
||||
Foam::scalar Foam::fv::rotorDiskSource::rhoRef() const
|
||||
{
|
||||
return rhoRef_;
|
||||
}
|
||||
|
||||
|
||||
Foam::scalar Foam::rotorDiskSource::omega() const
|
||||
Foam::scalar Foam::fv::rotorDiskSource::omega() const
|
||||
{
|
||||
return omega_;
|
||||
}
|
||||
|
||||
|
||||
const Foam::List<Foam::point>& Foam::rotorDiskSource::x() const
|
||||
const Foam::List<Foam::point>& Foam::fv::rotorDiskSource::x() const
|
||||
{
|
||||
return x_;
|
||||
}
|
||||
|
||||
|
||||
const Foam::cylindricalCS& Foam::rotorDiskSource::coordSys() const
|
||||
const Foam::cylindricalCS& Foam::fv::rotorDiskSource::coordSys() const
|
||||
{
|
||||
return coordSys_;
|
||||
}
|
||||
|
||||
|
||||
bool Foam::rotorDiskSource::compressible() const
|
||||
bool Foam::fv::rotorDiskSource::compressible() const
|
||||
{
|
||||
return rhoName_ != "none";
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::rotorDiskSource::rho() const
|
||||
Foam::tmp<Foam::volScalarField> Foam::fv::rotorDiskSource::rho() const
|
||||
{
|
||||
if (compressible())
|
||||
{
|
||||
@ -69,4 +69,5 @@ Foam::tmp<Foam::volScalarField> Foam::rotorDiskSource::rho() const
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -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
|
||||
@ -29,7 +29,7 @@ License
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void Foam::rotorDiskSource::writeField
|
||||
void Foam::fv::rotorDiskSource::writeField
|
||||
(
|
||||
const word& name,
|
||||
const List<Type>& values,
|
||||
|
||||
@ -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
|
||||
@ -42,7 +42,11 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::fixedTrim::fixedTrim(const rotorDiskSource& rotor, const dictionary& dict)
|
||||
Foam::fixedTrim::fixedTrim
|
||||
(
|
||||
const fv::rotorDiskSource& rotor,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
trimModel(rotor, dict, typeName),
|
||||
thetag_(rotor.cells().size(), 0.0)
|
||||
|
||||
@ -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
|
||||
@ -65,7 +65,7 @@ public:
|
||||
TypeName("fixedTrim");
|
||||
|
||||
//- Constructor
|
||||
fixedTrim(const rotorDiskSource& rotor, const dictionary& dict);
|
||||
fixedTrim(const fv::rotorDiskSource& rotor, const dictionary& dict);
|
||||
|
||||
//- Destructor
|
||||
virtual ~fixedTrim();
|
||||
|
||||
@ -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
|
||||
@ -105,7 +105,7 @@ Foam::vector Foam::targetCoeffTrim::calcCoeffs
|
||||
|
||||
Foam::targetCoeffTrim::targetCoeffTrim
|
||||
(
|
||||
const rotorDiskSource& rotor,
|
||||
const fv::rotorDiskSource& rotor,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
|
||||
@ -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
|
||||
@ -139,7 +139,7 @@ public:
|
||||
TypeName("targetCoeffTrim");
|
||||
|
||||
//- Constructor
|
||||
targetCoeffTrim(const rotorDiskSource& rotor, const dictionary& dict);
|
||||
targetCoeffTrim(const fv::rotorDiskSource& rotor, const dictionary& dict);
|
||||
|
||||
//- Destructor
|
||||
virtual ~targetCoeffTrim();
|
||||
|
||||
@ -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
|
||||
@ -38,7 +38,7 @@ namespace Foam
|
||||
|
||||
Foam::trimModel::trimModel
|
||||
(
|
||||
const rotorDiskSource& rotor,
|
||||
const fv::rotorDiskSource& rotor,
|
||||
const dictionary& dict,
|
||||
const word& name
|
||||
)
|
||||
|
||||
@ -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
|
||||
@ -56,7 +56,7 @@ protected:
|
||||
// Protected data
|
||||
|
||||
//- Reference to the rotor source model
|
||||
const rotorDiskSource& rotor_;
|
||||
const fv::rotorDiskSource& rotor_;
|
||||
|
||||
//- Name of model
|
||||
const word name_;
|
||||
@ -79,7 +79,7 @@ public:
|
||||
trimModel,
|
||||
dictionary,
|
||||
(
|
||||
const rotorDiskSource& rotor,
|
||||
const fv::rotorDiskSource& rotor,
|
||||
const dictionary& dict
|
||||
),
|
||||
(rotor, dict)
|
||||
@ -91,7 +91,7 @@ public:
|
||||
//- Construct from components
|
||||
trimModel
|
||||
(
|
||||
const rotorDiskSource& rotor,
|
||||
const fv::rotorDiskSource& rotor,
|
||||
const dictionary& dict,
|
||||
const word& name
|
||||
);
|
||||
@ -102,7 +102,7 @@ public:
|
||||
//- Return a reference to the selected trim model
|
||||
static autoPtr<trimModel> New
|
||||
(
|
||||
const rotorDiskSource& rotor,
|
||||
const fv::rotorDiskSource& rotor,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
@ -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
|
||||
@ -29,7 +29,7 @@ License
|
||||
|
||||
Foam::autoPtr<Foam::trimModel> Foam::trimModel::New
|
||||
(
|
||||
const rotorDiskSource& rotor,
|
||||
const fv::rotorDiskSource& rotor,
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
|
||||
@ -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
|
||||
@ -29,13 +29,10 @@ License
|
||||
#include "dynamicCode.H"
|
||||
#include "dynamicCodeContext.H"
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void Foam::CodedSource<Type>::prepare
|
||||
void Foam::fv::CodedSource<Type>::prepare
|
||||
(
|
||||
dynamicCode& dynCode,
|
||||
const dynamicCodeContext& context
|
||||
@ -54,10 +51,10 @@ void Foam::CodedSource<Type>::prepare
|
||||
dynCode.setFilterVariable("codeSetValue", codeSetValue_);
|
||||
|
||||
// compile filtered C template
|
||||
dynCode.addCompileFile("codedBasicSourceTemplate.C");
|
||||
dynCode.addCompileFile("codedFvOptionTemplate.C");
|
||||
|
||||
// copy filtered H template
|
||||
dynCode.addCopyFile("codedBasicSourceTemplate.H");
|
||||
dynCode.addCopyFile("codedFvOptionTemplate.H");
|
||||
|
||||
// debugging: make BC verbose
|
||||
// dynCode.setFilterVariable("verbose", "true");
|
||||
@ -84,28 +81,28 @@ void Foam::CodedSource<Type>::prepare
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::dlLibraryTable& Foam::CodedSource<Type>::libs() const
|
||||
Foam::dlLibraryTable& Foam::fv::CodedSource<Type>::libs() const
|
||||
{
|
||||
return const_cast<Time&>(mesh_.time()).libs();
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::string Foam::CodedSource<Type>::description() const
|
||||
Foam::string Foam::fv::CodedSource<Type>::description() const
|
||||
{
|
||||
return "basicSource " + name_;
|
||||
return "fvOption:: " + name_;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::CodedSource<Type>::clearRedirect() const
|
||||
void Foam::fv::CodedSource<Type>::clearRedirect() const
|
||||
{
|
||||
redirectBasicSourcePtr_.clear();
|
||||
redirectFvOptionPtr_.clear();
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
const Foam::dictionary& Foam::CodedSource<Type>::codeDict() const
|
||||
const Foam::dictionary& Foam::fv::CodedSource<Type>::codeDict() const
|
||||
{
|
||||
return coeffs_;
|
||||
}
|
||||
@ -114,7 +111,7 @@ const Foam::dictionary& Foam::CodedSource<Type>::codeDict() const
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::CodedSource<Type>::CodedSource
|
||||
Foam::fv::CodedSource<Type>::CodedSource
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
@ -122,7 +119,7 @@ Foam::CodedSource<Type>::CodedSource
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
basicSource(name, modelType, dict, mesh)
|
||||
option(name, modelType, dict, mesh)
|
||||
{
|
||||
read(dict);
|
||||
}
|
||||
@ -131,27 +128,26 @@ Foam::CodedSource<Type>::CodedSource
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::basicSource& Foam::CodedSource<Type>::redirectBasicSource()
|
||||
const
|
||||
Foam::fv::option& Foam::fv::CodedSource<Type>::redirectFvOption() const
|
||||
{
|
||||
if (!redirectBasicSourcePtr_.valid())
|
||||
if (!redirectFvOptionPtr_.valid())
|
||||
{
|
||||
dictionary constructDict(dict_);
|
||||
constructDict.set("type", redirectType_);
|
||||
|
||||
redirectBasicSourcePtr_ = basicSource::New
|
||||
redirectFvOptionPtr_ = option::New
|
||||
(
|
||||
redirectType_,
|
||||
constructDict,
|
||||
mesh_
|
||||
);
|
||||
}
|
||||
return redirectBasicSourcePtr_();
|
||||
return redirectFvOptionPtr_();
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::CodedSource<Type>::correct
|
||||
void Foam::fv::CodedSource<Type>::correct
|
||||
(
|
||||
GeometricField<Type, fvPatchField, volMesh>& fld
|
||||
)
|
||||
@ -163,12 +159,12 @@ void Foam::CodedSource<Type>::correct
|
||||
}
|
||||
|
||||
updateLibrary(redirectType_);
|
||||
redirectBasicSource().correct(fld);
|
||||
redirectFvOption().correct(fld);
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::CodedSource<Type>::addSup
|
||||
void Foam::fv::CodedSource<Type>::addSup
|
||||
(
|
||||
fvMatrix<Type>& eqn,
|
||||
const label fieldI
|
||||
@ -181,12 +177,12 @@ void Foam::CodedSource<Type>::addSup
|
||||
}
|
||||
|
||||
updateLibrary(redirectType_);
|
||||
redirectBasicSource().addSup(eqn, fieldI);
|
||||
redirectFvOption().addSup(eqn, fieldI);
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::CodedSource<Type>::setValue
|
||||
void Foam::fv::CodedSource<Type>::setValue
|
||||
(
|
||||
fvMatrix<Type>& eqn,
|
||||
const label fieldI
|
||||
@ -199,7 +195,7 @@ void Foam::CodedSource<Type>::setValue
|
||||
}
|
||||
|
||||
updateLibrary(redirectType_);
|
||||
redirectBasicSource().setValue(eqn, fieldI);
|
||||
redirectFvOption().setValue(eqn, fieldI);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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
|
||||
@ -22,10 +22,10 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::codedSource
|
||||
Foam::fv::codedSource
|
||||
|
||||
Description
|
||||
Constructs on-the-fly a new basicSource.
|
||||
Constructs on-the-fly a new fvOption.
|
||||
|
||||
E.g. in constant/sourcesProperties
|
||||
|
||||
@ -80,22 +80,24 @@ SourceFiles
|
||||
#ifndef CodedSource_H
|
||||
#define CodedSource_H
|
||||
|
||||
#include "basicSource.H"
|
||||
#include "fvOption.H"
|
||||
#include "codedBase.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class codedSource Declaration
|
||||
Class codedSource Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
class CodedSource
|
||||
:
|
||||
public basicSource,
|
||||
public option,
|
||||
public codedBase
|
||||
{
|
||||
|
||||
@ -110,7 +112,7 @@ protected:
|
||||
string codeSetValue_;
|
||||
|
||||
//- Underlying functionObject
|
||||
mutable autoPtr<basicSource> redirectBasicSourcePtr_;
|
||||
mutable autoPtr<option> redirectFvOptionPtr_;
|
||||
|
||||
|
||||
// Protected Member Functions
|
||||
@ -119,7 +121,7 @@ protected:
|
||||
virtual dlLibraryTable& libs() const;
|
||||
|
||||
//- adapt the context for the current object
|
||||
virtual void prepare(dynamicCode &,const dynamicCodeContext&) const;
|
||||
virtual void prepare(dynamicCode&, const dynamicCodeContext&) const;
|
||||
|
||||
// Return a description (type + name) for the output
|
||||
virtual string description() const;
|
||||
@ -151,8 +153,8 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Dynamically compiled basicSource
|
||||
basicSource& redirectBasicSource() const;
|
||||
//- Dynamically compiled fvOption
|
||||
option& redirectFvOption() const;
|
||||
|
||||
// Evaluation
|
||||
|
||||
@ -189,6 +191,7 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace fv
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -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
|
||||
@ -29,7 +29,7 @@ License
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void Foam::CodedSource<Type>::writeData(Ostream& os) const
|
||||
void Foam::fv::CodedSource<Type>::writeData(Ostream& os) const
|
||||
{
|
||||
os << indent << name_ << endl;
|
||||
dict_.write(os);
|
||||
@ -37,9 +37,9 @@ void Foam::CodedSource<Type>::writeData(Ostream& os) const
|
||||
|
||||
|
||||
template<class Type>
|
||||
bool Foam::CodedSource<Type>::read(const dictionary& dict)
|
||||
bool Foam::fv::CodedSource<Type>::read(const dictionary& dict)
|
||||
{
|
||||
if (basicSource::read(dict))
|
||||
if (option::read(dict))
|
||||
{
|
||||
coeffs_.lookup("fieldNames") >> fieldNames_;
|
||||
applied_.setSize(fieldNames_.size(), false);
|
||||
|
||||
@ -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
|
||||
@ -23,18 +23,21 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "makeBasicSource.H"
|
||||
#include "makeFvOption.H"
|
||||
#include "CodedSource.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeBasicSource(CodedSource, scalar);
|
||||
makeBasicSource(CodedSource, vector);
|
||||
makeBasicSource(CodedSource, sphericalTensor);
|
||||
makeBasicSource(CodedSource, symmTensor);
|
||||
makeBasicSource(CodedSource, tensor);
|
||||
namespace fv
|
||||
{
|
||||
makeFvOption(CodedSource, scalar);
|
||||
makeFvOption(CodedSource, vector);
|
||||
makeFvOption(CodedSource, sphericalTensor);
|
||||
makeFvOption(CodedSource, symmTensor);
|
||||
makeFvOption(CodedSource, tensor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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
|
||||
@ -32,8 +32,7 @@ License
|
||||
// * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
const Foam::wordList Foam::SemiImplicitSource<Type>::
|
||||
volumeModeTypeNames_
|
||||
const Foam::wordList Foam::fv::SemiImplicitSource<Type>::volumeModeTypeNames_
|
||||
(
|
||||
IStringStream("(absolute specific)")()
|
||||
);
|
||||
@ -42,8 +41,8 @@ volumeModeTypeNames_
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
typename Foam::SemiImplicitSource<Type>::volumeModeType
|
||||
Foam::SemiImplicitSource<Type>::wordToVolumeModeType
|
||||
typename Foam::fv::SemiImplicitSource<Type>::volumeModeType
|
||||
Foam::fv::SemiImplicitSource<Type>::wordToVolumeModeType
|
||||
(
|
||||
const word& vmtName
|
||||
) const
|
||||
@ -69,7 +68,7 @@ Foam::SemiImplicitSource<Type>::wordToVolumeModeType
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::word Foam::SemiImplicitSource<Type>::volumeModeTypeToWord
|
||||
Foam::word Foam::fv::SemiImplicitSource<Type>::volumeModeTypeToWord
|
||||
(
|
||||
const volumeModeType& vmtType
|
||||
) const
|
||||
@ -86,7 +85,7 @@ Foam::word Foam::SemiImplicitSource<Type>::volumeModeTypeToWord
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::SemiImplicitSource<Type>::setFieldData(const dictionary& dict)
|
||||
void Foam::fv::SemiImplicitSource<Type>::setFieldData(const dictionary& dict)
|
||||
{
|
||||
fieldNames_.setSize(dict.toc().size());
|
||||
injectionRate_.setSize(fieldNames_.size());
|
||||
@ -112,7 +111,7 @@ void Foam::SemiImplicitSource<Type>::setFieldData(const dictionary& dict)
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::SemiImplicitSource<Type>::SemiImplicitSource
|
||||
Foam::fv::SemiImplicitSource<Type>::SemiImplicitSource
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
@ -120,7 +119,7 @@ Foam::SemiImplicitSource<Type>::SemiImplicitSource
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
basicSource(name, modelType, dict, mesh),
|
||||
option(name, modelType, dict, mesh),
|
||||
volumeMode_(vmAbsolute),
|
||||
VDash_(1.0),
|
||||
injectionRate_()
|
||||
@ -132,7 +131,7 @@ Foam::SemiImplicitSource<Type>::SemiImplicitSource
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void Foam::SemiImplicitSource<Type>::addSup
|
||||
void Foam::fv::SemiImplicitSource<Type>::addSup
|
||||
(
|
||||
fvMatrix<Type>& eqn,
|
||||
const label fieldI
|
||||
|
||||
@ -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
|
||||
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::SemiImplicitSource
|
||||
Foam::fv::SemiImplicitSource
|
||||
|
||||
Description
|
||||
Semi-implicit source, described using an input dictionary. The injection
|
||||
@ -58,7 +58,7 @@ Description
|
||||
- specific: values are given as \<quantity\>/m3
|
||||
|
||||
SeeAlso
|
||||
Foam::basicSource
|
||||
Foam::fvOption
|
||||
|
||||
SourceFiles
|
||||
SemiImplicitSource.C
|
||||
@ -69,16 +69,17 @@ SourceFiles
|
||||
#define SemiImplicitSource_H
|
||||
|
||||
#include "Tuple2.H"
|
||||
#include "basicSource.H"
|
||||
#include "fvOption.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
|
||||
// Forward declaration of classes
|
||||
|
||||
class fvMesh;
|
||||
|
||||
template<class Type>
|
||||
class SemiImplicitSource;
|
||||
@ -99,7 +100,7 @@ Ostream& operator<<
|
||||
template<class Type>
|
||||
class SemiImplicitSource
|
||||
:
|
||||
public basicSource
|
||||
public option
|
||||
{
|
||||
public:
|
||||
|
||||
@ -198,6 +199,7 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace fv
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -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
|
||||
@ -28,8 +28,8 @@ License
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
inline const typename Foam::SemiImplicitSource<Type>::volumeModeType&
|
||||
Foam::SemiImplicitSource<Type>::volumeMode() const
|
||||
inline const typename Foam::fv::SemiImplicitSource<Type>::volumeModeType&
|
||||
Foam::fv::SemiImplicitSource<Type>::volumeMode() const
|
||||
{
|
||||
return volumeMode_;
|
||||
}
|
||||
@ -37,15 +37,15 @@ Foam::SemiImplicitSource<Type>::volumeMode() const
|
||||
|
||||
template<class Type>
|
||||
inline const Foam::List<Foam::Tuple2<Type, Foam::scalar> >&
|
||||
Foam::SemiImplicitSource<Type>::injectionRate() const
|
||||
Foam::fv::SemiImplicitSource<Type>::injectionRate() const
|
||||
{
|
||||
return injectionRate_;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
inline typename Foam::SemiImplicitSource<Type>::volumeModeType&
|
||||
Foam::SemiImplicitSource<Type>::volumeMode()
|
||||
inline typename Foam::fv::SemiImplicitSource<Type>::volumeModeType&
|
||||
Foam::fv::SemiImplicitSource<Type>::volumeMode()
|
||||
{
|
||||
return volumeMode_;
|
||||
}
|
||||
@ -53,7 +53,7 @@ Foam::SemiImplicitSource<Type>::volumeMode()
|
||||
|
||||
template<class Type>
|
||||
inline Foam::List<Foam::Tuple2<Type,
|
||||
Foam::scalar> >& Foam::SemiImplicitSource<Type>::injectionRate()
|
||||
Foam::scalar> >& Foam::fv::SemiImplicitSource<Type>::injectionRate()
|
||||
{
|
||||
return injectionRate_;
|
||||
}
|
||||
|
||||
@ -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
|
||||
@ -28,7 +28,7 @@ License
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void Foam::SemiImplicitSource<Type>::writeData(Ostream& os) const
|
||||
void Foam::fv::SemiImplicitSource<Type>::writeData(Ostream& os) const
|
||||
{
|
||||
os << indent << name_ << endl;
|
||||
dict_.write(os);
|
||||
@ -36,9 +36,9 @@ void Foam::SemiImplicitSource<Type>::writeData(Ostream& os) const
|
||||
|
||||
|
||||
template<class Type>
|
||||
bool Foam::SemiImplicitSource<Type>::read(const dictionary& dict)
|
||||
bool Foam::fv::SemiImplicitSource<Type>::read(const dictionary& dict)
|
||||
{
|
||||
if (basicSource::read(dict))
|
||||
if (option::read(dict))
|
||||
{
|
||||
volumeMode_ = wordToVolumeModeType(coeffs_.lookup("volumeMode"));
|
||||
setFieldData(coeffs_.subDict("injectionRateSuSp"));
|
||||
|
||||
@ -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
|
||||
@ -23,18 +23,21 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "makeBasicSource.H"
|
||||
#include "makeFvOption.H"
|
||||
#include "SemiImplicitSource.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeBasicSource(SemiImplicitSource, scalar);
|
||||
makeBasicSource(SemiImplicitSource, vector);
|
||||
makeBasicSource(SemiImplicitSource, sphericalTensor);
|
||||
makeBasicSource(SemiImplicitSource, symmTensor);
|
||||
makeBasicSource(SemiImplicitSource, tensor);
|
||||
namespace fv
|
||||
{
|
||||
makeFvOption(SemiImplicitSource, scalar);
|
||||
makeFvOption(SemiImplicitSource, vector);
|
||||
makeFvOption(SemiImplicitSource, sphericalTensor);
|
||||
makeFvOption(SemiImplicitSource, symmTensor);
|
||||
makeFvOption(SemiImplicitSource, tensor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user