30 void Foam::fv::propellerDiskAdjustment::readCoeffs(
const dictionary&
dict)
32 forces_ =
new functionObjects::forces
36 dict.subDict(
"forces")
45 dict.lookupOrDefault<scalar>(
"resistanceFraction", 1.0);
48 "resistanceDirection",
58 forces_->calcForcesMoments();
59 return -resistanceFraction_*(forces_->forceEff() & resistanceDirection_);
78 propellerDisk_.
mesh(),
97 const scalar&
n = n_.value();
104 const scalarField zoneRho(forces_->rho(), zoneCells);
105 const scalar
rho =
gSum(zoneCellVolumes*zoneRho)/zone.
V();
108 const scalar res = resistance();
111 const scalar diffForce = (res - sfc_ -
T*
rho);
115 const scalar magDeltaN =
min(
mag(deltaN), nFraction_*
n);
116 deltaN =
sign(deltaN)*magDeltaN;
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
dimensionedScalar deltaT() const
Return time step.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
const Type & value() const
Return const reference to value.
cellZone selection or generation class with caching of zone volume
scalar V() const
Return const access to the total cell volume.
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
const fvMesh & mesh() const
Return const access to the mesh database.
scalar nFraction_
Maximum fractional change of rotation speed.
const propellerDisk & propellerDisk_
Reference to the propellerDisk fvModel.
scalar sfc_
Skin friction correction for model-scale ship [N].
autoPtr< functionObjects::forces > forces_
Function object to calculate the resistance force.
propellerDiskAdjustment(const propellerDisk &, const dictionary &dict)
Construct from components.
scalar deltaTStar_
Relaxation time scale for rotation speed adjustment.
vector resistanceDirection_
Resistance force direction.
scalar Tmin_
Minimum thrust for beta [N].
scalar resistanceFraction_
Resistance fraction for multi-propulsor configurations.
scalar startTime_
Start time for rotation speed adjustment.
scalar resistance() const
Return the ship resistance (for self-propulsion correction)
void correctn(const scalar T) const
Correct the rotation speed from the current propulsion force.
Disk momentum source which approximates a propeller based on a given propeller curve.
vector normal_
Propeller disk normal direction.
const cellZone & zone() const
Return const access to the cell set.
const scalarField & cellVolumes() const
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
const dimensionSet & dimless
dimensionedScalar sign(const dimensionedScalar &ds)
Type gSum(const UList< Type > &f, const label comm)
tmp< DimensionedField< typename outerProduct< Type, Type >::type, GeoMesh, Field >> sqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
Vector< scalar > vector
A scalar version of the templated Vector.
const dimensionSet & dimTime
dimensioned< Type > min(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
word typedName(Name name)
Return the name of the object within the given type.
const dimensionSet & dimRate
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
tmp< DimensionedField< scalar, GeoMesh, Field > > mag(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
void T(GeometricField< Type, GeoMesh, PrimitiveField1 > &gf, const GeometricField< Type, GeoMesh, PrimitiveField2 > &gf1)
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.