dynamicPressure -> staticPressure

This commit is contained in:
andy
2009-02-24 16:47:24 +00:00
parent 8d97ebf3cd
commit 6b3e3c6597
6 changed files with 50 additions and 48 deletions

View File

@ -1,4 +1,4 @@
dynamicPressure/dynamicPressure.C staticPressure/staticPressure.C
dynamicPressure/dynamicPressureFunctionObject.C staticPressure/staticPressureFunctionObject.C
LIB = $(FOAM_LIBBIN)/libutilityFunctionObjects LIB = $(FOAM_LIBBIN)/libutilityFunctionObjects

View File

@ -23,24 +23,24 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Typedef Typedef
Foam::IOdynamicPressure Foam::IOstaticPressure
Description Description
Instance of the generic IOOutputFilter for dynamicPressure. Instance of the generic IOOutputFilter for staticPressure.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef IOdynamicPressure_H #ifndef IOstaticPressure_H
#define IOdynamicPressure_H #define IOstaticPressure_H
#include "dynamicPressure.H" #include "staticPressure.H"
#include "IOOutputFilter.H" #include "IOOutputFilter.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
typedef IOOutputFilter<dynamicPressure> IOdynamicPressure; typedef IOOutputFilter<staticPressure> IOstaticPressure;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "dynamicPressure.H" #include "staticPressure.H"
#include "volFields.H" #include "volFields.H"
#include "dictionary.H" #include "dictionary.H"
@ -32,12 +32,12 @@ License
namespace Foam namespace Foam
{ {
defineTypeNameAndDebug(dynamicPressure, 0); defineTypeNameAndDebug(staticPressure, 0);
} }
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
bool Foam::dynamicPressure::isKinematicPressure() bool Foam::staticPressure::isKinematicPressure()
{ {
const volScalarField& p = obr_.lookupObject<volScalarField>(pName_); const volScalarField& p = obr_.lookupObject<volScalarField>(pName_);
@ -47,7 +47,7 @@ bool Foam::dynamicPressure::isKinematicPressure()
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::dynamicPressure::dynamicPressure Foam::staticPressure::staticPressure
( (
const word& name, const word& name,
const objectRegistry& obr, const objectRegistry& obr,
@ -67,7 +67,7 @@ Foam::dynamicPressure::dynamicPressure
active_ = false; active_ = false;
WarningIn WarningIn
( (
"dynamicPressure::dynamicPressure" "staticPressure::staticPressure"
"(const objectRegistry&, const dictionary&)" "(const objectRegistry&, const dictionary&)"
) << "No fvMesh available, deactivating." << nl ) << "No fvMesh available, deactivating." << nl
<< endl; << endl;
@ -80,7 +80,7 @@ Foam::dynamicPressure::dynamicPressure
active_ = false; active_ = false;
WarningIn WarningIn
( (
"dynamicPressure::dynamicPressure" "staticPressure::staticPressure"
"(const objectRegistry&, const dictionary&)" "(const objectRegistry&, const dictionary&)"
) << "Pressure is not kinematic pressure, deactivating." << nl ) << "Pressure is not kinematic pressure, deactivating." << nl
<< endl; << endl;
@ -93,13 +93,13 @@ Foam::dynamicPressure::dynamicPressure
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::dynamicPressure::~dynamicPressure() Foam::staticPressure::~staticPressure()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::dynamicPressure::read(const dictionary& dict) void Foam::staticPressure::read(const dictionary& dict)
{ {
if (active_) if (active_)
{ {
@ -109,19 +109,19 @@ void Foam::dynamicPressure::read(const dictionary& dict)
} }
void Foam::dynamicPressure::execute() void Foam::staticPressure::execute()
{ {
// Do nothing - only valid on write // Do nothing - only valid on write
} }
void Foam::dynamicPressure::end() void Foam::staticPressure::end()
{ {
// Do nothing - only valid on write // Do nothing - only valid on write
} }
void Foam::dynamicPressure::write() void Foam::staticPressure::write()
{ {
if (active_) if (active_)
{ {

View File

@ -23,20 +23,22 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class Class
Foam::dynamicPressure Foam::staticPressure
Description Description
Converts kinematic pressure to dynamic pressure, from the name of the Converts kinematic pressure to static pressure, from the name of the
pressure field, and density. pressure field, and density, i.e.
p_static = density*p_kinematic
SourceFiles SourceFiles
dynamicPressure.C staticPressure.C
IOdynamicPressure.H IOstaticPressure.H
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef dynamicPressure_H #ifndef staticPressure_H
#define dynamicPressure_H #define staticPressure_H
#include "pointFieldFwd.H" #include "pointFieldFwd.H"
@ -51,14 +53,14 @@ class dictionary;
class mapPolyMesh; class mapPolyMesh;
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class dynamicPressure Declaration Class staticPressure Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class dynamicPressure class staticPressure
{ {
// Private data // Private data
//- Name of this set of dynamicPressure objects //- Name of this set of staticPressure objects
word name_; word name_;
const objectRegistry& obr_; const objectRegistry& obr_;
@ -79,23 +81,23 @@ class dynamicPressure
bool isKinematicPressure(); bool isKinematicPressure();
//- Disallow default bitwise copy construct //- Disallow default bitwise copy construct
dynamicPressure(const dynamicPressure&); staticPressure(const staticPressure&);
//- Disallow default bitwise assignment //- Disallow default bitwise assignment
void operator=(const dynamicPressure&); void operator=(const staticPressure&);
public: public:
//- Runtime type information //- Runtime type information
TypeName("dynamicPressure"); TypeName("staticPressure");
// Constructors // Constructors
//- Construct for given objectRegistry and dictionary. //- Construct for given objectRegistry and dictionary.
// Allow the possibility to load fields from files // Allow the possibility to load fields from files
dynamicPressure staticPressure
( (
const word& name, const word& name,
const objectRegistry&, const objectRegistry&,
@ -106,18 +108,18 @@ public:
// Destructor // Destructor
virtual ~dynamicPressure(); virtual ~staticPressure();
// Member Functions // Member Functions
//- Return name of the set of dynamicPressure //- Return name of the set of staticPressure
virtual const word& name() const virtual const word& name() const
{ {
return name_; return name_;
} }
//- Read the dynamicPressure data //- Read the staticPressure data
virtual void read(const dictionary&); virtual void read(const dictionary&);
//- Execute, currently does nothing //- Execute, currently does nothing
@ -126,7 +128,7 @@ public:
//- Execute at the final time-loop, currently does nothing //- Execute at the final time-loop, currently does nothing
virtual void end(); virtual void end();
//- Calculate the dynamicPressure and write //- Calculate the staticPressure and write
virtual void write(); virtual void write();
//- Update for changes of mesh //- Update for changes of mesh

View File

@ -24,18 +24,18 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "dynamicPressureFunctionObject.H" #include "staticPressureFunctionObject.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
defineNamedTemplateTypeNameAndDebug(dynamicPressureFunctionObject, 0); defineNamedTemplateTypeNameAndDebug(staticPressureFunctionObject, 0);
addToRunTimeSelectionTable addToRunTimeSelectionTable
( (
functionObject, functionObject,
dynamicPressureFunctionObject, staticPressureFunctionObject,
dictionary dictionary
); );
} }

View File

@ -23,29 +23,29 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Typedef Typedef
Foam::dynamicPressureFunctionObject Foam::staticPressureFunctionObject
Description Description
FunctionObject wrapper around dynamicPressure to allow it to be created via FunctionObject wrapper around staticPressure to allow it to be created via
the functions list within controlDict. the functions list within controlDict.
SourceFiles SourceFiles
dynamicPressureFunctionObject.C staticPressureFunctionObject.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef dynamicPressureFunctionObject_H #ifndef staticPressureFunctionObject_H
#define dynamicPressureFunctionObject_H #define staticPressureFunctionObject_H
#include "dynamicPressure.H" #include "staticPressure.H"
#include "OutputFilterFunctionObject.H" #include "OutputFilterFunctionObject.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
typedef OutputFilterFunctionObject<dynamicPressure> typedef OutputFilterFunctionObject<staticPressure>
dynamicPressureFunctionObject; staticPressureFunctionObject;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //