Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
rotorDiskSource Class Reference

Applies cell-based momentum sources on velocity (i.e. U) within a specified cylindrical region to approximate the mean effects of rotor forces. More...

Inheritance diagram for rotorDiskSource:
Inheritance graph
[legend]
Collaboration diagram for rotorDiskSource:
Collaboration graph
[legend]

Classes

struct  flapData
 

Public Types

enum  geometryModeType { gmAuto, gmSpecified }
 
enum  inletFlowType { ifFixed, ifSurfaceNormal, ifLocal }
 
- Public Types inherited from cellSetOption
enum  selectionModeType { smAll, smCellSet, smCellZone, smPoints }
 

Public Member Functions

 TypeName ("rotorDisk")
 
 rotorDiskSource (const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
 
 rotorDiskSource (const rotorDiskSource &)=delete
 
void operator= (const rotorDiskSource &)=delete
 
virtual ~rotorDiskSource ()=default
 
scalar rhoRef () const
 
scalar omega () const
 
const List< point > & x () const
 
const coordSystem::cylindricalcoordSys () const
 
template<class RhoFieldType >
void calculate (const RhoFieldType &rho, const vectorField &U, const scalarField &thetag, vectorField &force, const bool divideVolume=true, const bool output=true) const
 
virtual void addSup (fvMatrix< vector > &eqn, const label fieldi)
 
virtual void addSup (const volScalarField &rho, fvMatrix< vector > &eqn, const label fieldi)
 
virtual bool read (const dictionary &dict)
 
- Public Member Functions inherited from cellSetOption
 TypeName ("cellSetOption")
 
 cellSetOption (const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
 
virtual ~cellSetOption ()=default
 
scalar timeStart () const noexcept
 
scalar duration () const noexcept
 
bool inTimeLimits (const scalar timeValue) const
 
selectionModeType selectionMode () const noexcept
 
bool useSubMesh () const noexcept
 
const wordcellSetName () const noexcept
 
scalar V () const noexcept
 
const labelListcells () const noexcept
 
scalar timeStart (scalar val) noexcept
 
scalar duration (scalar val) noexcept
 
virtual bool isActive ()
 
- Public Member Functions inherited from option
 TypeName ("option")
 
 declareRunTimeSelectionTable (autoPtr, option, dictionary,(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh),(name, modelType, dict, mesh))
 
 option (const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
 
autoPtr< optionclone () const
 
virtual ~option ()=default
 
const wordname () const noexcept
 
const fvMeshmesh () const noexcept
 
const dictionarycoeffs () const noexcept
 
bool active () const noexcept
 
void setApplied (const label fieldi)
 
bool active (const bool on) noexcept
 
virtual label applyToField (const word &fieldName) const
 
virtual void checkApplied () const
 
virtual void addSup (fvMatrix< scalar > &eqn, const label fieldi)
 
virtual void addSup (fvMatrix< symmTensor > &eqn, const label fieldi)
 
virtual void addSup (fvMatrix< sphericalTensor > &eqn, const label fieldi)
 
virtual void addSup (fvMatrix< tensor > &eqn, const label fieldi)
 
virtual void addSup (const volScalarField &rho, fvMatrix< scalar > &eqn, const label fieldi)
 
virtual void addSup (const volScalarField &rho, fvMatrix< symmTensor > &eqn, const label fieldi)
 
virtual void addSup (const volScalarField &rho, fvMatrix< sphericalTensor > &eqn, const label fieldi)
 
virtual void addSup (const volScalarField &rho, fvMatrix< tensor > &eqn, const label fieldi)
 
virtual void addSup (const volScalarField &alpha, const volScalarField &rho, fvMatrix< scalar > &eqn, const label fieldi)
 
virtual void addSup (const volScalarField &alpha, const volScalarField &rho, fvMatrix< vector > &eqn, const label fieldi)
 
virtual void addSup (const volScalarField &alpha, const volScalarField &rho, fvMatrix< symmTensor > &eqn, const label fieldi)
 
virtual void addSup (const volScalarField &alpha, const volScalarField &rho, fvMatrix< sphericalTensor > &eqn, const label fieldi)
 
virtual void addSup (const volScalarField &alpha, const volScalarField &rho, fvMatrix< tensor > &eqn, const label fieldi)
 
virtual void constrain (fvMatrix< scalar > &eqn, const label fieldi)
 
virtual void constrain (fvMatrix< vector > &eqn, const label fieldi)
 
virtual void constrain (fvMatrix< sphericalTensor > &eqn, const label fieldi)
 
virtual void constrain (fvMatrix< symmTensor > &eqn, const label fieldi)
 
virtual void constrain (fvMatrix< tensor > &eqn, const label fieldi)
 
virtual void correct (volScalarField &field)
 
virtual void correct (volVectorField &field)
 
virtual void correct (volSphericalTensorField &field)
 
virtual void correct (volSymmTensorField &field)
 
virtual void correct (volTensorField &field)
 
virtual void postProcessSens (scalarField &sensField, const word &fieldName=word::null, const word &designVariablesName=word::null)
 
virtual void postProcessSens (vectorField &sensField, const word &fieldName=word::null, const word &designVariablesName=word::null)
 
virtual void postProcessSens (tensorField &sensField, const word &fieldName=word::null, const word &designVariablesName=word::null)
 
virtual void writeHeader (Ostream &) const
 
virtual void writeFooter (Ostream &) const
 
virtual void writeData (Ostream &) const
 

Static Public Attributes

static const Enum< geometryModeTypegeometryModeTypeNames_
 
static const Enum< inletFlowTypeinletFlowTypeNames_
 
- Static Public Attributes inherited from cellSetOption
static const Enum< selectionModeTypeselectionModeTypeNames_
 

Protected Member Functions

void checkData ()
 
void setFaceArea (vector &axis, const bool correct)
 
void createCoordinateSystem ()
 
void constructGeometry ()
 
tmp< vectorFieldinflowVelocity (const volVectorField &U) const
 
template<class Type >
void writeField (const word &name, const List< Type > &values, const bool writeNow=false) const
 
- Protected Member Functions inherited from cellSetOption
void setSelection (const dictionary &dict)
 
void setCellSelection ()
 
void setVol ()
 
- Protected Member Functions inherited from option
void resetApplied ()
 

Protected Attributes

scalar rhoRef_
 
scalar omega_
 
label nBlades_
 
inletFlowType inletFlow_
 
vector inletVelocity_
 
scalar tipEffect_
 
flapData flap_
 
List< pointx_
 
List< tensorRcone_
 
List< scalar > area_
 
coordSystem::cylindrical coordSys_
 
autoPtr< tensorFieldRcyl_
 
scalar rMax_
 
autoPtr< trimModeltrim_
 
bladeModel blade_
 
profileModelList profiles_
 
- Protected Attributes inherited from cellSetOption
scalar timeStart_
 
scalar duration_
 
selectionModeType selectionMode_
 
word cellSetName_
 
List< pointpoints_
 
labelList cells_
 
scalar V_
 
- Protected Attributes inherited from option
const word name_
 
const word modelType_
 
const fvMeshmesh_
 
dictionary dict_
 
dictionary coeffs_
 
wordList fieldNames_
 
List< boolapplied_
 
bool active_
 

Additional Inherited Members

- Static Public Member Functions inherited from option
static autoPtr< optionNew (const word &name, const dictionary &dict, const fvMesh &mesh)
 
- Public Attributes inherited from option
bool log
 

Detailed Description

Applies cell-based momentum sources on velocity (i.e. U) within a specified cylindrical region to approximate the mean effects of rotor forces.

Sources applied to:

  U         | Velocity    [m/s]

Required fields:

  U         | Velocity    [m/s]
Usage
Minimal example by using constant/fvOptions: rotorDiskSource1 { Mandatory entries (unmodifiable) type rotorDiskSource;

Mandatory entries (runtime modifiable) fields (<field1> <field2> ... <fieldN>); rhoRef 1.0; rpm 5.5; nBlades 3; inletFlowType local; geometryMode auto; tipEffect 0.96; // [0, 1] refDirection (-1 0 0 ); flapCoeffs { beta0 0.0; beta1c 0.0; beta2s 0.0; }

trimModel fixed;

blade { see bladeModel.H for documentation }

profiles { profile1 { type lookup; // lookup || series ... see lookupProfile.H or seriesProfile.H for documentation } profile2 { ... } }

Conditional mandatory entries (runtime modifiable)

when inletFlowType=fixed inletVelocity (1 0 0);

when inletFlowType=surfaceNormal inletNormalVelocity 5.0;

when geometryMode=auto pointAbove (1 0 0);

when geometryMode=specified origin (0 0 0); axis (1 0 0);

Mandatory/Optional (inherited) entries ... }

where the entries mean:

Property Description Type Reqd Dflt
type Type name: rotorDiskSource word yes -
fields Names of operand fields wordList yes -
rhoRef Reference density for incompressible case scalar yes -
rpm Rotational speed [rad/s] scalar yes -
nBlades Number of rotor blades label yes -
tipEffect Ratio of blade radius beyond which lift=0 scalar yes -
refDirection Reference direction used as reference for psi angle vector yes -
beta0 Coning angle [deg] scalar yes -
beta1c Lateral flapping coeff (cos coeff) [deg] scalar yes -
beta2s Longitudinal flapping coeff (sin coeff) [deg] scalar yes -
inletFlowType Inlet flow type specification word yes -
inletVelocity Inlet velocity [m/s] vector cndtnl -
inletNormalVelocity Inlet normal velocity magnitude scalar cndtnl -
geometryMode Geometry mode specification word yes -
pointAbove Correct the axis direction using a point above the rotor vector cndtnl -
origin Origin of the specified coordinate system vector cndtnl -
axis Axis of the specified coordinate system vector cndtnl -
trimModel Trim model specification word yes -
blade Blade properties dictionary yes -

The inherited entries are elaborated in:

Options for the inletFlowType entry:

      fixed    | Use a specified velocity
      local    | Use local flow conditions
      surfaceNormal | Use a specified normal velocity (positive towards rotor)

Options for the geometryMode entry:

      auto      | Determine rotor coordinate system from selected cells
      specified | Use a specified coordinate system

Options for the trimModel entry:

      fixed       | Fixed blade/angle characteristics
      targetForce | Target thrust/torque by using time-variant blade characs.
Note
  • The entry rpm is positive anti-clockwise when looking along -ve lift direction.
See also
Source files

Definition at line 326 of file rotorDiskSource.H.

Member Enumeration Documentation

◆ geometryModeType

Enumerator
gmAuto 
gmSpecified 

Definition at line 335 of file rotorDiskSource.H.

◆ inletFlowType

Enumerator
ifFixed 
ifSurfaceNormal 
ifLocal 

Definition at line 345 of file rotorDiskSource.H.

Constructor & Destructor Documentation

◆ rotorDiskSource() [1/2]

rotorDiskSource ( const word name,
const word modelType,
const dictionary dict,
const fvMesh mesh 
)

Definition at line 439 of file rotorDiskSource.C.

References dict, and Foam::read().

Here is the call graph for this function:

◆ rotorDiskSource() [2/2]

rotorDiskSource ( const rotorDiskSource )
delete

◆ ~rotorDiskSource()

virtual ~rotorDiskSource ( )
virtualdefault

Member Function Documentation

◆ checkData()

void checkData ( )
protected

Definition at line 69 of file rotorDiskSource.C.

References Foam::abort(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.

Here is the call graph for this function:

◆ setFaceArea()

void setFaceArea ( vector axis,
const bool  correct 
)
protected

◆ createCoordinateSystem()

void createCoordinateSystem ( )
protected

◆ constructGeometry()

void constructGeometry ( )
protected

Rcyl_.reset(coordSys_.R(cc).ptr());

Definition at line 371 of file rotorDiskSource.C.

References beta(), Foam::constant::universal::c, Foam::cos(), forAll, Foam::max(), psi, s, Foam::sin(), and x.

Here is the call graph for this function:

◆ inflowVelocity()

Foam::tmp< Foam::vectorField > inflowVelocity ( const volVectorField U) const
protected

Definition at line 406 of file rotorDiskSource.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, tmp::New(), U, and Foam::Zero.

Here is the call graph for this function:

◆ writeField()

void writeField ( const word name,
const List< Type > &  values,
const bool  writeNow = false 
) const
protected

◆ TypeName()

TypeName ( "rotorDisk"  )

◆ operator=()

void operator= ( const rotorDiskSource )
delete

◆ rhoRef()

Foam::scalar rhoRef ( ) const
inline

Definition at line 25 of file rotorDiskSourceI.H.

References rotorDiskSource::rhoRef_.

◆ omega()

Foam::scalar omega ( ) const
inline

Definition at line 31 of file rotorDiskSourceI.H.

◆ x()

const Foam::List< Foam::point > & x ( ) const
inline

Definition at line 37 of file rotorDiskSourceI.H.

◆ coordSys()

const Foam::coordSystem::cylindrical & coordSys ( ) const
inline

Definition at line 44 of file rotorDiskSourceI.H.

◆ calculate()

void calculate ( const RhoFieldType &  rho,
const vectorField U,
const scalarField thetag,
vectorField force,
const bool  divideVolume = true,
const bool  output = true 
) const

◆ addSup() [1/2]

void addSup ( fvMatrix< vector > &  eqn,
const label  fieldi 
)
virtual

Reimplemented from option.

Definition at line 471 of file rotorDiskSource.C.

References fvMatrix::dimensions(), Foam::dimVolume, fvMatrix::psi(), and Foam::Zero.

Here is the call graph for this function:

◆ addSup() [2/2]

void addSup ( const volScalarField rho,
fvMatrix< vector > &  eqn,
const label  fieldi 
)
virtual

Reimplemented from option.

Definition at line 506 of file rotorDiskSource.C.

References fvMatrix::dimensions(), Foam::dimVolume, fvMatrix::psi(), rho, and Foam::Zero.

Here is the call graph for this function:

◆ read()

bool read ( const dictionary dict)
virtual

Member Data Documentation

◆ geometryModeTypeNames_

const Foam::Enum< Foam::fv::rotorDiskSource::geometryModeType > geometryModeTypeNames_
static

Definition at line 342 of file rotorDiskSource.H.

◆ inletFlowTypeNames_

const Foam::Enum< Foam::fv::rotorDiskSource::inletFlowType > inletFlowTypeNames_
static

Definition at line 353 of file rotorDiskSource.H.

◆ rhoRef_

scalar rhoRef_
protected

Definition at line 372 of file rotorDiskSource.H.

Referenced by rotorDiskSource::rhoRef().

◆ omega_

scalar omega_
protected

Definition at line 376 of file rotorDiskSource.H.

◆ nBlades_

label nBlades_
protected

Definition at line 379 of file rotorDiskSource.H.

◆ inletFlow_

inletFlowType inletFlow_
protected

Definition at line 382 of file rotorDiskSource.H.

◆ inletVelocity_

vector inletVelocity_
protected

Definition at line 385 of file rotorDiskSource.H.

◆ tipEffect_

scalar tipEffect_
protected

Definition at line 389 of file rotorDiskSource.H.

◆ flap_

flapData flap_
protected

Definition at line 392 of file rotorDiskSource.H.

◆ x_

List<point> x_
protected

Definition at line 396 of file rotorDiskSource.H.

◆ Rcone_

List<tensor> Rcone_
protected

Definition at line 399 of file rotorDiskSource.H.

◆ area_

List<scalar> area_
protected

Definition at line 402 of file rotorDiskSource.H.

◆ coordSys_

coordSystem::cylindrical coordSys_
protected

Definition at line 405 of file rotorDiskSource.H.

◆ Rcyl_

autoPtr<tensorField> Rcyl_
protected

Definition at line 408 of file rotorDiskSource.H.

◆ rMax_

scalar rMax_
protected

Definition at line 411 of file rotorDiskSource.H.

◆ trim_

autoPtr<trimModel> trim_
protected

Definition at line 414 of file rotorDiskSource.H.

◆ blade_

bladeModel blade_
protected

Definition at line 417 of file rotorDiskSource.H.

◆ profiles_

profileModelList profiles_
protected

Definition at line 420 of file rotorDiskSource.H.


The documentation for this class was generated from the following files: