FEDEM Model Database  R8.0
Source code of the FEDEM model database
FmBladeProperty.H
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2023 SAP SE
2 //
3 // SPDX-License-Identifier: Apache-2.0
4 //
5 // This file is part of FEDEM - https://openfedem.org
7 
8 #ifndef FM_BLADE_PROPERTY_H
9 #define FM_BLADE_PROPERTY_H
10 
12 #include "vpmDB/FmSubAssembly.H"
14 
15 class FmBeam;
16 
17 
19 {
21 
22 public:
24 
25  static FmBladeProperty* readAndConnect(std::istream& is,
26  std::ostream& os = std::cout);
27  virtual std::ostream& writeFMF(std::ostream& os = std::cout);
28  virtual bool clone(FmBase* obj, int depth);
29 
30  virtual const char* getUITypeName() const { return "Blade property"; }
31 
33  virtual bool isListable() const { return false; }
34 
35  Doubles getAeroCentre() const;
36  Doubles getElasticCentre() const;
37  Doubles getShearCentre() const;
38  Doubles getMassCentre() const;
39 
40  void getStructData(double* data, double iceMass = 0.0) const;
41  double getStructMass(double iceMass = 0.0) const;
42 
43 protected:
44  virtual ~FmBladeProperty();
45 
46  virtual bool cloneLocal(FmBase* obj, int depth);
47 
48 public:
56 
60 
67 
69 };
70 
71 
73 {
75 
76 public:
77  FmBladeDesign(bool isDummy = false);
78  virtual ~FmBladeDesign() {}
79 
80  virtual bool interactiveErase();
81 
82  static FmBladeDesign* readAndConnect(std::istream& is,
83  std::ostream& os = std::cout,
84  bool autoConnect = false);
85  virtual std::ostream& writeFMF(std::ostream& os = std::cout);
86 
87  bool writeToFMM(const std::string& fileName) const;
88  static FmBladeDesign* readFromFMM(const std::string& fileName,
89  bool setRdOnly = false,
90  bool keepAll = false);
91 
92  std::string getModelFileName() const;
93 
94  virtual const char* getUITypeName() const { return "Blade design"; }
95 
97  virtual bool isListable(bool) const { return false; }
98 
100  void addBladeProperty(FmBladeProperty* bp, int pos = -1);
102  bool removeBladeProperty(int pos);
104 
105  void setBladeSegments(const std::vector<FmBladeProperty*>& segs);
106  void getBladeSegments(std::vector<FmBladeProperty*>& segs) const;
107  bool getSegmentLengths(std::vector<double>& DRNodes) const;
108 
109  bool getEccen(double R, Doubles& ElC, Doubles& CoG) const;
110  bool getStructData(double R, double* data, double iceMass = 0.0) const;
111  double getStructMass(double R, double iceMass = 0.0) const;
112  double getElementMass(const FmBeam* beam) const;
113 
114 private:
115  size_t getPropertyIdxAt(double& R) const;
116 
117 protected:
120 
121 public:
123 
129 };
130 
131 #endif
std::pair< double, double > Doubles
Convenience type alias.
Definition: FFaField.H:22
Classes representing lists of guarded pointers.
Base class for all objects that affect the simulation model.
Base class for all sub-assembly objects.
Base parent class for the model data structure entries.
Definition: FmBase.H:37
Definition: FmBeam.H:20
Definition: FmBladeProperty.H:73
FFaField< bool > withSstiff
Include shear stiffness?
Definition: FmBladeProperty.H:128
FFaNoPrintField< bool > readOnly
Should the blade design be write-locked?
Definition: FmBladeProperty.H:122
FmBladeProperty * getBladeProperty(int pos)
Definition: FmBladeProperty.C:290
FFaField< bool > withAstiff
Include axial stiffness?
Definition: FmBladeProperty.H:125
static FmBladeDesign * readAndConnect(std::istream &is, std::ostream &os=std::cout, bool autoConnect=false)
Definition: FmBladeProperty.C:374
size_t getPropertyIdxAt(double &R) const
Definition: FmBladeProperty.C:532
double getStructMass(double R, double iceMass=0.0) const
Definition: FmBladeProperty.C:671
virtual std::ostream & writeFMF(std::ostream &os=std::cout)
Writes out this object in the model database file format.
Definition: FmBladeProperty.C:357
FmBladeDesign(bool isDummy=false)
Definition: FmBladeProperty.C:224
void addBladeProperty(FmBladeProperty *bp, int pos=-1)
Inserts a blade property at position pos (default at end).
Definition: FmBladeProperty.C:266
bool getEccen(double R, Doubles &ElC, Doubles &CoG) const
Definition: FmBladeProperty.C:566
void setBladeSegments(const std::vector< FmBladeProperty * > &segs)
Definition: FmBladeProperty.C:299
FFaField< FFaReferenceListBase * > segmentField
Definition: FmBladeProperty.H:119
double getElementMass(const FmBeam *beam) const
Definition: FmBladeProperty.C:694
bool removeBladeProperty(int pos)
Deletes the blade property at position pos.
Definition: FmBladeProperty.C:279
FFaField< bool > withBstiff
Include bending stiffness?
Definition: FmBladeProperty.H:126
FFaField< bool > withTstiff
Include torsion stiffness?
Definition: FmBladeProperty.H:127
bool getSegmentLengths(std::vector< double > &DRNodes) const
Definition: FmBladeProperty.C:314
virtual bool isListable(bool) const
Hides the blade design objects in the objects list view.
Definition: FmBladeProperty.H:97
FFaField< double > autoEmod
Youngs modulus used in auto-stiffness creation.
Definition: FmBladeProperty.H:124
void getBladeSegments(std::vector< FmBladeProperty * > &segs) const
Definition: FmBladeProperty.C:308
FFaReferenceList< FmBladeProperty > segment
Definition: FmBladeProperty.H:118
bool getStructData(double R, double *data, double iceMass=0.0) const
Definition: FmBladeProperty.C:601
static FmBladeDesign * readFromFMM(const std::string &fileName, bool setRdOnly=false, bool keepAll=false)
Definition: FmBladeProperty.C:450
virtual const char * getUITypeName() const
Returns the type name of this object for use in the GUI.
Definition: FmBladeProperty.H:94
virtual ~FmBladeDesign()
Definition: FmBladeProperty.H:78
std::string getModelFileName() const
Definition: FmBladeProperty.C:726
bool writeToFMM(const std::string &fileName) const
Definition: FmBladeProperty.C:423
virtual bool interactiveErase()
Hook for class-dependent tasks for interactive deleting an object.
Definition: FmBladeProperty.C:240
Definition: FmBladeProperty.H:19
FmBladeProperty()
Definition: FmBladeProperty.C:59
FFaField< double > Tinertia
Torsional mass inertia.
Definition: FmBladeProperty.H:59
FFaField< Doubles > ElCentre
Elastic centre (w.r.t. leading edge)
Definition: FmBladeProperty.H:49
virtual bool isListable() const
Hides the blade property objects in the objects list view.
Definition: FmBladeProperty.H:33
void getStructData(double *data, double iceMass=0.0) const
Definition: FmBladeProperty.C:182
FFaField< Doubles > ShrCentre
Shear centre (w.r.t Elastic centre)
Definition: FmBladeProperty.H:51
virtual std::ostream & writeFMF(std::ostream &os=std::cout)
Writes out this object in the model database file format.
Definition: FmBladeProperty.C:93
virtual ~FmBladeProperty()
Definition: FmBladeProperty.C:87
FFaField< double > Chord
Chord length (blade segment width)
Definition: FmBladeProperty.H:64
FFaField< Doubles > GAs
Shear stiffness.
Definition: FmBladeProperty.H:54
Doubles getAeroCentre() const
Definition: FmBladeProperty.C:147
FFaField< Doubles > EI
Bending stiffness.
Definition: FmBladeProperty.H:53
FFaField< double > EA
Axial stiffness.
Definition: FmBladeProperty.H:52
FFaField< Doubles > MassCentre
Mass centre (w.r.t. Elastic centre)
Definition: FmBladeProperty.H:57
virtual const char * getUITypeName() const
Returns the type name of this object for use in the GUI.
Definition: FmBladeProperty.H:30
FFaField< double > Twist
Aerodynamic twist.
Definition: FmBladeProperty.H:63
FFaField< Doubles > PitchCentre
Pitch axis location (w.r.t. leading edge)
Definition: FmBladeProperty.H:61
FFaField< double > GIt
Torsional stiffness.
Definition: FmBladeProperty.H:55
Doubles getShearCentre() const
Definition: FmBladeProperty.C:170
Doubles getElasticCentre() const
Definition: FmBladeProperty.C:155
FFaField< double > Length
Blade segment length.
Definition: FmBladeProperty.H:66
FFaField< double > Thick
Blade segment thickness.
Definition: FmBladeProperty.H:65
Doubles getMassCentre() const
Definition: FmBladeProperty.C:176
virtual bool cloneLocal(FmBase *obj, int depth)
Clones the data fields of *obj into *this.
Definition: FmBladeProperty.C:109
FFaField< double > ElAxisRot
Elastic centre rotation (relative to Twist)
Definition: FmBladeProperty.H:50
FFaField< double > AeroCentre
Aerodynamic centre (w.r.t leading edge)
Definition: FmBladeProperty.H:62
double getStructMass(double iceMass=0.0) const
Definition: FmBladeProperty.C:211
FFaField< double > Mass
Mass per unith length.
Definition: FmBladeProperty.H:58
static FmBladeProperty * readAndConnect(std::istream &is, std::ostream &os=std::cout)
Definition: FmBladeProperty.C:117
FFaField< std::string > AirFoil
Name of airfoil file.
Definition: FmBladeProperty.H:68
virtual bool clone(FmBase *, int)
Copies the fields of another object into *this.
Definition: FmBase.H:109
Base class for structural property objects without physical shape.
Definition: FmSimulationModelBase.H:84
Base class for all sub-assembly objects.
Definition: FmSubAssembly.H:28