MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
LogarithmicWindProfile Class Reference

#include <windprof.h>

Inheritance diagram for LogarithmicWindProfile:
Collaboration diagram for LogarithmicWindProfile:

Public Member Functions

 LogarithmicWindProfile (const Vec3 &X0, const Mat3x3 &R0, const doublereal dZRef, const DriveCaller *pVRef, const doublereal dSurfaceRoughnessLength)
 
virtual ~LogarithmicWindProfile (void)
 
virtual bool GetVelocity (const Vec3 &X, Vec3 &V) const
 
virtual std::ostream & Restart (std::ostream &out) const
 
- Public Member Functions inherited from WindProfile
 WindProfile (const Vec3 &X0, const Mat3x3 &R0)
 
virtual ~WindProfile (void)
 
- Public Member Functions inherited from Gust
virtual ~Gust (void)
 
void SetAirProperties (const AirProperties *pap)
 
virtual Vec3 GetVelocity (const Vec3 &X) const
 

Protected Attributes

const doublereal dZRef
 
DriveOwner VRef
 
const doublereal dSurfaceRoughnessLength
 
const doublereal logZRefZ0
 
- Protected Attributes inherited from WindProfile
const Vec3 X0
 
const Mat3x3 R0
 
- Protected Attributes inherited from Gust
const AirPropertiespAP
 

Detailed Description

Definition at line 110 of file windprof.h.

Constructor & Destructor Documentation

LogarithmicWindProfile::LogarithmicWindProfile ( const Vec3 X0,
const Mat3x3 R0,
const doublereal  dZRef,
const DriveCaller pVRef,
const doublereal  dSurfaceRoughnessLength 
)

Definition at line 327 of file windprof.cc.

References ASSERT.

333 : WindProfile(X0, R0),
334 dZRef(dZRef),
335 VRef(pVRef),
338 {
339  ASSERT(dZRef > 0.);
340  ASSERT(pVRef != 0);
342 }
const doublereal logZRefZ0
Definition: windprof.h:116
GradientExpression< UnaryExpr< FuncLog, Expr > > log(const GradientExpression< Expr > &u)
Definition: gradient.h:2976
WindProfile(const Vec3 &X0, const Mat3x3 &R0)
Definition: windprof.cc:45
#define ASSERT(expression)
Definition: colamd.c:977
const doublereal dSurfaceRoughnessLength
Definition: windprof.h:114
const doublereal dZRef
Definition: windprof.h:112
LogarithmicWindProfile::~LogarithmicWindProfile ( void  )
virtual

Definition at line 344 of file windprof.cc.

References NO_OP.

345 {
346  NO_OP;
347 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

bool LogarithmicWindProfile::GetVelocity ( const Vec3 X,
Vec3 V 
) const
virtual

Implements Gust.

Definition at line 350 of file windprof.cc.

References DriveOwner::dGet(), dSurfaceRoughnessLength, Mat3x3::GetVec(), grad::log(), logZRefZ0, WindProfile::R0, VRef, and WindProfile::X0.

351 {
352  // dZ is the component of (X - X0) along axis 3 of R0
353  doublereal dZ = R0.GetVec(3)*(X - X0);
354  if (dZ <= 0.) {
355  return false;
356  }
357 
358  // V is projected along axis 1 of R0
359  V = R0.GetVec(1)*(VRef.dGet()*(std::log(dZ/dSurfaceRoughnessLength) - 0.)/(logZRefZ0 - 0.));
360 
361  return true;
362 }
Vec3 GetVec(unsigned short int i) const
Definition: matvec3.h:893
const doublereal logZRefZ0
Definition: windprof.h:116
GradientExpression< UnaryExpr< FuncLog, Expr > > log(const GradientExpression< Expr > &u)
Definition: gradient.h:2976
const Mat3x3 R0
Definition: windprof.h:50
doublereal dGet(const doublereal &dVar) const
Definition: drive.cc:664
double doublereal
Definition: colamd.c:52
const doublereal dSurfaceRoughnessLength
Definition: windprof.h:114
const Vec3 X0
Definition: windprof.h:49

Here is the call graph for this function:

std::ostream & LogarithmicWindProfile::Restart ( std::ostream &  out) const
virtual

Implements Gust.

Definition at line 365 of file windprof.cc.

References dSurfaceRoughnessLength, dZRef, DriveOwner::pGetDriveCaller(), WindProfile::R0, DriveCaller::Restart(), VRef, and WindProfile::X0.

366 {
367  out << "logarithmic"
368  << ", reference position, " << X0
369  << ", reference orientation, " << R0
370  << ", reference elevation, " << dZRef
371  << ", reference velocity, ", VRef.pGetDriveCaller()->Restart(out)
372  << ", surface roughness length, " << dSurfaceRoughnessLength;
373  return out;
374 }
virtual std::ostream & Restart(std::ostream &out) const =0
const Mat3x3 R0
Definition: windprof.h:50
DriveCaller * pGetDriveCaller(void) const
Definition: drive.cc:658
const doublereal dSurfaceRoughnessLength
Definition: windprof.h:114
const doublereal dZRef
Definition: windprof.h:112
const Vec3 X0
Definition: windprof.h:49

Here is the call graph for this function:

Member Data Documentation

const doublereal LogarithmicWindProfile::dSurfaceRoughnessLength
protected

Definition at line 114 of file windprof.h.

Referenced by GetVelocity(), and Restart().

const doublereal LogarithmicWindProfile::dZRef
protected

Definition at line 112 of file windprof.h.

Referenced by Restart().

const doublereal LogarithmicWindProfile::logZRefZ0
protected

Definition at line 116 of file windprof.h.

Referenced by GetVelocity().

DriveOwner LogarithmicWindProfile::VRef
protected

Definition at line 113 of file windprof.h.

Referenced by GetVelocity(), and Restart().


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