mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
dynamicPressure -> staticPressure
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
dynamicPressure/dynamicPressure.C
|
||||
dynamicPressure/dynamicPressureFunctionObject.C
|
||||
staticPressure/staticPressure.C
|
||||
staticPressure/staticPressureFunctionObject.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libutilityFunctionObjects
|
||||
|
||||
@ -23,24 +23,24 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Typedef
|
||||
Foam::IOdynamicPressure
|
||||
Foam::IOstaticPressure
|
||||
|
||||
Description
|
||||
Instance of the generic IOOutputFilter for dynamicPressure.
|
||||
Instance of the generic IOOutputFilter for staticPressure.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef IOdynamicPressure_H
|
||||
#define IOdynamicPressure_H
|
||||
#ifndef IOstaticPressure_H
|
||||
#define IOstaticPressure_H
|
||||
|
||||
#include "dynamicPressure.H"
|
||||
#include "staticPressure.H"
|
||||
#include "IOOutputFilter.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
typedef IOOutputFilter<dynamicPressure> IOdynamicPressure;
|
||||
typedef IOOutputFilter<staticPressure> IOstaticPressure;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -24,7 +24,7 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "dynamicPressure.H"
|
||||
#include "staticPressure.H"
|
||||
#include "volFields.H"
|
||||
#include "dictionary.H"
|
||||
|
||||
@ -32,12 +32,12 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(dynamicPressure, 0);
|
||||
defineTypeNameAndDebug(staticPressure, 0);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
bool Foam::dynamicPressure::isKinematicPressure()
|
||||
bool Foam::staticPressure::isKinematicPressure()
|
||||
{
|
||||
const volScalarField& p = obr_.lookupObject<volScalarField>(pName_);
|
||||
|
||||
@ -47,7 +47,7 @@ bool Foam::dynamicPressure::isKinematicPressure()
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dynamicPressure::dynamicPressure
|
||||
Foam::staticPressure::staticPressure
|
||||
(
|
||||
const word& name,
|
||||
const objectRegistry& obr,
|
||||
@ -67,7 +67,7 @@ Foam::dynamicPressure::dynamicPressure
|
||||
active_ = false;
|
||||
WarningIn
|
||||
(
|
||||
"dynamicPressure::dynamicPressure"
|
||||
"staticPressure::staticPressure"
|
||||
"(const objectRegistry&, const dictionary&)"
|
||||
) << "No fvMesh available, deactivating." << nl
|
||||
<< endl;
|
||||
@ -80,7 +80,7 @@ Foam::dynamicPressure::dynamicPressure
|
||||
active_ = false;
|
||||
WarningIn
|
||||
(
|
||||
"dynamicPressure::dynamicPressure"
|
||||
"staticPressure::staticPressure"
|
||||
"(const objectRegistry&, const dictionary&)"
|
||||
) << "Pressure is not kinematic pressure, deactivating." << nl
|
||||
<< endl;
|
||||
@ -93,13 +93,13 @@ Foam::dynamicPressure::dynamicPressure
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::dynamicPressure::~dynamicPressure()
|
||||
Foam::staticPressure::~staticPressure()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::dynamicPressure::read(const dictionary& dict)
|
||||
void Foam::staticPressure::read(const dictionary& dict)
|
||||
{
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
void Foam::dynamicPressure::end()
|
||||
void Foam::staticPressure::end()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::dynamicPressure::write()
|
||||
void Foam::staticPressure::write()
|
||||
{
|
||||
if (active_)
|
||||
{
|
||||
@ -23,20 +23,22 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::dynamicPressure
|
||||
Foam::staticPressure
|
||||
|
||||
Description
|
||||
Converts kinematic pressure to dynamic pressure, from the name of the
|
||||
pressure field, and density.
|
||||
Converts kinematic pressure to static pressure, from the name of the
|
||||
pressure field, and density, i.e.
|
||||
|
||||
p_static = density*p_kinematic
|
||||
|
||||
SourceFiles
|
||||
dynamicPressure.C
|
||||
IOdynamicPressure.H
|
||||
staticPressure.C
|
||||
IOstaticPressure.H
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef dynamicPressure_H
|
||||
#define dynamicPressure_H
|
||||
#ifndef staticPressure_H
|
||||
#define staticPressure_H
|
||||
|
||||
#include "pointFieldFwd.H"
|
||||
|
||||
@ -51,14 +53,14 @@ class dictionary;
|
||||
class mapPolyMesh;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class dynamicPressure Declaration
|
||||
Class staticPressure Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class dynamicPressure
|
||||
class staticPressure
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Name of this set of dynamicPressure objects
|
||||
//- Name of this set of staticPressure objects
|
||||
word name_;
|
||||
|
||||
const objectRegistry& obr_;
|
||||
@ -79,23 +81,23 @@ class dynamicPressure
|
||||
bool isKinematicPressure();
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
dynamicPressure(const dynamicPressure&);
|
||||
staticPressure(const staticPressure&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const dynamicPressure&);
|
||||
void operator=(const staticPressure&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("dynamicPressure");
|
||||
TypeName("staticPressure");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct for given objectRegistry and dictionary.
|
||||
// Allow the possibility to load fields from files
|
||||
dynamicPressure
|
||||
staticPressure
|
||||
(
|
||||
const word& name,
|
||||
const objectRegistry&,
|
||||
@ -106,18 +108,18 @@ public:
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~dynamicPressure();
|
||||
virtual ~staticPressure();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return name of the set of dynamicPressure
|
||||
//- Return name of the set of staticPressure
|
||||
virtual const word& name() const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
//- Read the dynamicPressure data
|
||||
//- Read the staticPressure data
|
||||
virtual void read(const dictionary&);
|
||||
|
||||
//- Execute, currently does nothing
|
||||
@ -126,7 +128,7 @@ public:
|
||||
//- Execute at the final time-loop, currently does nothing
|
||||
virtual void end();
|
||||
|
||||
//- Calculate the dynamicPressure and write
|
||||
//- Calculate the staticPressure and write
|
||||
virtual void write();
|
||||
|
||||
//- Update for changes of mesh
|
||||
@ -24,18 +24,18 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "dynamicPressureFunctionObject.H"
|
||||
#include "staticPressureFunctionObject.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineNamedTemplateTypeNameAndDebug(dynamicPressureFunctionObject, 0);
|
||||
defineNamedTemplateTypeNameAndDebug(staticPressureFunctionObject, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
functionObject,
|
||||
dynamicPressureFunctionObject,
|
||||
staticPressureFunctionObject,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
@ -23,29 +23,29 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Typedef
|
||||
Foam::dynamicPressureFunctionObject
|
||||
Foam::staticPressureFunctionObject
|
||||
|
||||
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.
|
||||
|
||||
SourceFiles
|
||||
dynamicPressureFunctionObject.C
|
||||
staticPressureFunctionObject.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef dynamicPressureFunctionObject_H
|
||||
#define dynamicPressureFunctionObject_H
|
||||
#ifndef staticPressureFunctionObject_H
|
||||
#define staticPressureFunctionObject_H
|
||||
|
||||
#include "dynamicPressure.H"
|
||||
#include "staticPressure.H"
|
||||
#include "OutputFilterFunctionObject.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
typedef OutputFilterFunctionObject<dynamicPressure>
|
||||
dynamicPressureFunctionObject;
|
||||
typedef OutputFilterFunctionObject<staticPressure>
|
||||
staticPressureFunctionObject;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
Reference in New Issue
Block a user