93 // Optionally write wake text files
94 // Note: controlled by writeControl
97 // Sample plane (disk) properties
98 // Note: controlled by writeControl
106 interpolationScheme cellPoint;
107 errorOnPointNotFound false;
112 Where the entries comprise:
114 Property | Description | Reqd | Deflt
115 type | Type name: propellerInfo | yes |
116 log | Write to standard output | no | no
117 patches | Patches included in the forces calculation | yes |
118 p | Pressure field name | no | p
119 U | Velocity field name | no | U
120 rho | Density field name | no | rho
121 URef | Reference velocity | yes |
122 rotationMode | Rotation mode (see below) | yes |
123 origin | Sample disk centre | no* |
124 axis | Propeller axis | no* |
125 alphaAxis | Axis that defines alpha=0 dir | no |
126 n | Rotation speed [rev/sec] | no* |
127 rpm | Rotation speed [rev/min] | no* |
128 MRF | Name of MRF zone | no* |
129 originOffset | Origin offset for MRF mode | no | (0 0 0)
130 writePropellerPerformance| Write propeller performance text file | yes |
131 writeWakeFields | Write wake field text files | yes |
132 surfaceWriter | Sample disk surface writer | no* |
133 r1 | Sample disk inner radius | no | 0
134 r2 | Sample disk outer radius | no* |
135 nTheta | Divisions in theta direction | no* |
136 nRadial | Divisions in radial direction | no* |
137 interpolationScheme | Sampling interpolation scheme | no* | cell
142- URef is a scalar Function1 type, i.e. supports constant, table, lookup values
143- rotationMode is used to set the origin, axis and revolutions per second
145 - if set to 'specified' all 3 entries are required
146 - note: origin is the sample disk origin
147 - if set to 'MRF' only the MRF entry is required
148 - to move the sample disk away from the MRF origin, use the originOffset
149- if writePropellerPerformance is set to on|true:
150 - propellerPerformance text file will be written
151- if writeWakeFields is set to on|true:
152 - wake and axialWake text files will be written
153- if the surfaceWriter entry is set, the sample disk surface will be written
154 - extents set according to the r1 and r2 entries
155 - discretised according to the nTheta and nRadial entries
158 Foam::functionObject::forces
164\*---------------------------------------------------------------------------*/
166#ifndef Foam_functionObjects_propellerInfo_H
167#define Foam_functionObjects_propellerInfo_H
216 autoPtr<Function1<scalar>>
URefPtr_;
351 const Type& defaultValue
401 virtual bool write();
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
Generic GeometricField class.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Base class for coordinate system specification, the default coordinate system type is cartesian .
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Computes forces and moments over a given list of patches by integrating pressure and viscous forces a...
forces(const word &name, const Time &runTime, const dictionary &dict, const bool readFields=true)
Construct from name, Time and dictionary.
Calculates propeller performance and wake field properties.
word MRFName_
Name of MRF zone (if applicable).
label nTheta_
Number of surface divisions in theta direction.
boolList pointMask_
List of participating points (parallel reduced).
virtual ~propellerInfo()=default
Destructor.
autoPtr< OFstream > propellerPerformanceFilePtr_
Propeller performance file.
void UpdateMesh(const mapPolyMesh &mpm)
labelList cellIds_
Surface point sample cell IDs.
void writeWake(const vectorField &U, const scalar URef)
Write the wake text file.
void writeWakeFields(const scalar URef)
Write the wake fields.
void createFiles()
Create output files.
rotationMode rotationMode_
Rotation mode.
void setSampleDiskSurface(const dictionary &dict)
Set the sample surface based on dictionary settings.
void writeAxialWake(const vectorField &U, const scalar URef)
Write the axial wake text file.
autoPtr< OFstream > wakeFilePtr_
Wake field file.
void writeSampleDiskSurface(const vectorField &U, const vectorField &Ur, const scalar URef)
Write the sample surface.
faceList faces_
Surface faces.
const volVectorField & U() const
Return the velocity field.
bool initialised_
Initialised flag.
dictionary dict_
Copy of dictionary used during construction.
propellerInfo(const propellerInfo &)=delete
No copy construct.
autoPtr< OFstream > axialWakeFilePtr_
Axial wake field file.
void writePropellerPerformance()
Write the wake fields.
void movePoints(const polyMesh &mesh)
Update for changes of mesh.
tmp< Field< Type > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &psi, const Type &defaultValue) const
Interpolate from the mesh onto the sample surface.
autoPtr< Function1< scalar > > URefPtr_
Reference velocity.
bool writePropellerPerformance_
Flag to write performance data.
bool errorOnPointNotFound_
Flag to raise an error if the sample point is not found in the mesh. Default = false to enable....
void setCoordinateSystem(const dictionary &dict)
Set the coordinate system.
scalar meanSampleDiskField(const scalarField &field) const
Return the area average of a field.
void setRotationalSpeed()
Set the rotational speed.
pointField points_
Surface points.
scalar radius_
Propeller radius.
void setSampleDiskGeometry(const coordinateSystem &coordSys, const scalar r1, const scalar r2, const scalar nTheta, const label nRadius, faceList &faces, pointField &points) const
Set the faces and points for the sample surface.
scalar nanValue_
Default value when a sample point is not found; default = scalar::min.
word interpolationScheme_
Interpolation scheme.
label nRadial_
Number of surface divisions in radial direction.
autoPtr< surfaceWriter > surfaceWriterPtr_
Surface writer.
scalar n_
Propeller speed (revolutions per second).
virtual bool execute()
Execute the function-object operations.
virtual bool write()
Write the function-object results.
void updateSampleDiskCells()
Set the sample cells corresponding to the sample points.
void operator=(const propellerInfo &)=delete
No copy assignment.
TypeName("propellerInfo")
Runtime type information.
bool writeWakeFields_
Flag to write wake fields.
static const Enum< rotationMode > rotationModeNames_
virtual bool read(const dictionary &)
Read the function-object dictionary.
Reads fields from the time directories and adds them to the mesh database for further post-processing...
virtual const objectRegistry & obr() const
The region or sub-region registry being used.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Registry of regIOobjects.
Mesh consisting of general polyhedral cells.
Base class for surface writers.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
const volScalarField & psi
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
GeometricField< vector, fvPatchField, volMesh > volVectorField
List< label > labelList
A List of labels.
List< face > faceList
List of faces.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Field< vector > vectorField
Specialisation of Field<T> for vector.
List< bool > boolList
A List of bools.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
vectorField pointField
pointField is a vectorField.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.