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

#include <aeromodal.h>

Inheritance diagram for AerodynamicModal:
Collaboration diagram for AerodynamicModal:

Public Types

enum  RigidF_t { NO_RIGID = 0, RIGID = 6 }
 
- Public Types inherited from Elem
enum  Type {
  UNKNOWN = -1, AIRPROPERTIES = 0, INDUCEDVELOCITY, AUTOMATICSTRUCTURAL,
  GRAVITY, BODY, JOINT, JOINT_REGULARIZATION,
  BEAM, PLATE, FORCE, INERTIA,
  ELECTRICBULK, ELECTRIC, THERMAL, HYDRAULIC,
  BULK, LOADABLE, DRIVEN, EXTERNAL,
  AEROMODAL, AERODYNAMIC, GENEL, SOCKETSTREAM_OUTPUT,
  RTAI_OUTPUT = SOCKETSTREAM_OUTPUT, LASTELEMTYPE
}
 
- Public Types inherited from SimulationEntity
typedef std::vector< Hint * > Hints
 
- Public Types inherited from ToBeOutput
enum  { OUTPUT = 0x1U, OUTPUT_MASK = 0xFU, OUTPUT_PRIVATE = 0x10U, OUTPUT_PRIVATE_MASK = ~OUTPUT_MASK }
 
- Public Types inherited from AerodynamicElem
enum  Type {
  UNKNOWN = -1, INDUCEDVELOCITY = 0, AEROMODAL, AERODYNAMICBODY,
  AERODYNAMICBEAM, AERODYNAMICEXTERNAL, AERODYNAMICEXTERNALMODAL, AERODYNAMICLOADABLE,
  AIRCRAFTINSTRUMENTS, GENERICFORCE, LASTAEROTYPE
}
 

Public Member Functions

 AerodynamicModal (unsigned int uLabel, const StructNode *pN, const Modal *pMJ, const Mat3x3 &RaTmp, const DofOwner *pDO, doublereal Cd, const int NModal, const int NAero, RigidF_t rgF, const int Gust, const doublereal Vff, SpMapMatrixHandler *pAMat, FullMatrixHandler *pBMat, FullMatrixHandler *pCMat, FullMatrixHandler *pD0Mat, FullMatrixHandler *pD1Mat, FullMatrixHandler *pD2Mat, flag fout)
 
 ~AerodynamicModal (void)
 
std::ostream & Restart (std::ostream &out) const
 
unsigned int iGetNumDof (void) const
 
DofOrder::Order GetDofType (unsigned int i) const
 
Elem::Type GetElemType (void) const
 
void WorkSpaceDim (integer *piNumRows, integer *piNumCols) const
 
VariableSubMatrixHandlerAssJac (VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &, const VectorHandler &)
 
SubVectorHandlerAssRes (SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
void Output (OutputHandler &OH) const
 
unsigned int iGetInitialNumDof (void) const
 
void InitialWorkSpaceDim (integer *piNumRows, integer *piNumCols) const
 
VariableSubMatrixHandlerInitialAssJac (VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
 
SubVectorHandlerInitialAssRes (SubVectorHandler &WorkVec, const VectorHandler &XCurr)
 
AerodynamicElem::Type GetAerodynamicElemType (void) const
 
virtual void GetConnectedNodes (std::vector< const Node * > &connectedNodes) const
 
- Public Member Functions inherited from Elem
 Elem (unsigned int uL, flag fOut)
 
virtual ~Elem (void)
 
virtual std::ostream & DescribeDof (std::ostream &out, const char *prefix="", bool bInitial=false) const
 
virtual void DescribeDof (std::vector< std::string > &desc, bool bInitial=false, int i=-1) const
 
virtual std::ostream & DescribeEq (std::ostream &out, const char *prefix="", bool bInitial=false) const
 
virtual void DescribeEq (std::vector< std::string > &desc, bool bInitial=false, int i=-1) const
 
virtual void AssMats (VariableSubMatrixHandler &WorkMatA, VariableSubMatrixHandler &WorkMatB, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual bool bInverseDynamics (void) const
 
void SetInverseDynamicsFlags (unsigned uIDF)
 
unsigned GetInverseDynamicsFlags (void) const
 
bool bIsErgonomy (void) const
 
bool bIsRightHandSide (void) const
 
virtual VariableSubMatrixHandlerAssJac (VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
 
virtual SubVectorHandlerAssRes (SubVectorHandler &WorkVec, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr, const VectorHandler &XPrimePrimeCurr, InverseDynamics::Order iOrder=InverseDynamics::INVERSE_DYNAMICS)
 
virtual int GetNumConnectedNodes (void) const
 
- Public Member Functions inherited from WithLabel
 WithLabel (unsigned int uL=0, const std::string &sN="")
 
virtual ~WithLabel (void)
 
void PutLabel (unsigned int uL)
 
void PutName (const std::string &sN)
 
unsigned int GetLabel (void) const
 
const std::string & GetName (void) const
 
- Public Member Functions inherited from SimulationEntity
 SimulationEntity (void)
 
virtual ~SimulationEntity (void)
 
virtual bool bIsValidIndex (unsigned int i) const
 
virtual DofOrder::Order GetEqType (unsigned int i) const
 
virtual void SetValue (DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *h=0)
 
virtual HintParseHint (DataManager *pDM, const char *s) const
 
virtual void BeforePredict (VectorHandler &, VectorHandler &, VectorHandler &, VectorHandler &) const
 
virtual void AfterPredict (VectorHandler &X, VectorHandler &XP)
 
virtual void Update (const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void DerivativesUpdate (const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void Update (const VectorHandler &XCurr, InverseDynamics::Order iOrder)
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP)
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP, const VectorHandler &XPP)
 
virtual unsigned int iGetNumPrivData (void) const
 
virtual unsigned int iGetPrivDataIdx (const char *s) const
 
virtual doublereal dGetPrivData (unsigned int i) const
 
virtual std::ostream & OutputAppend (std::ostream &out) const
 
virtual void ReadInitialState (MBDynParser &HP)
 
- Public Member Functions inherited from ToBeOutput
 ToBeOutput (flag fOut=fDefaultOut)
 
virtual ~ToBeOutput (void)
 
virtual void OutputPrepare (OutputHandler &OH)
 
virtual void Output (OutputHandler &OH, const VectorHandler &X, const VectorHandler &XP) const
 
virtual flag fToBeOutput (void) const
 
virtual bool bToBeOutput (void) const
 
virtual void SetOutputFlag (flag f=flag(1))
 
- Public Member Functions inherited from AerodynamicElem
 AerodynamicElem (unsigned int uL, const DofOwner *pDO, flag fOut)
 
virtual ~AerodynamicElem (void)
 
virtual bool NeedsAirProperties (void) const
 
virtual const InducedVelocitypGetInducedVelocity (void) const
 
- Public Member Functions inherited from ElemWithDofs
 ElemWithDofs (unsigned int uL, const DofOwner *pDO, flag fOut)
 
virtual ~ElemWithDofs (void)
 
- Public Member Functions inherited from DofOwnerOwner
 DofOwnerOwner (const DofOwner *pDO)
 
virtual ~DofOwnerOwner ()
 
virtual const DofOwnerpGetDofOwner (void) const
 
virtual integer iGetFirstIndex (void) const
 
virtual void SetInitialValue (VectorHandler &X)
 
- Public Member Functions inherited from AirPropOwner
 AirPropOwner (void)
 
virtual ~AirPropOwner (void)
 
virtual void PutAirProperties (const AirProperties *pAP)
 
virtual flag fGetAirVelocity (Vec3 &Velocity, const Vec3 &X) const
 
virtual doublereal dGetAirDensity (const Vec3 &X) const
 
virtual doublereal dGetAirPressure (const Vec3 &X) const
 
virtual doublereal dGetAirTemperature (const Vec3 &X) const
 
virtual doublereal dGetSoundSpeed (const Vec3 &X) const
 
virtual bool GetAirProps (const Vec3 &X, doublereal &rho, doublereal &c, doublereal &p, doublereal &T) const
 
- Public Member Functions inherited from InitialAssemblyElem
 InitialAssemblyElem (unsigned int uL, flag fOut)
 
virtual ~InitialAssemblyElem (void)
 
- Public Member Functions inherited from SubjectToInitialAssembly
 SubjectToInitialAssembly (void)
 
virtual ~SubjectToInitialAssembly (void)
 

Protected Member Functions

void AssVec (SubVectorHandler &WorkVec)
 

Protected Attributes

const StructNodepModalNode
 
const ModalpModalJoint
 
Vec3 P0
 
Mat3x3 R0
 
const Mat3x3 Ra
 
doublereal Chord
 
unsigned int NStModes
 
unsigned int NAeroStates
 
unsigned int NGust
 
SpMapMatrixHandlerpA
 
FullMatrixHandlerpB
 
FullMatrixHandlerpC
 
FullMatrixHandlerpD0
 
FullMatrixHandlerpD1
 
FullMatrixHandlerpD2
 
MyVectorHandlerpq
 
MyVectorHandlerpqPrime
 
MyVectorHandlerpqSec
 
MyVectorHandlerpxa
 
MyVectorHandlerpxaPrime
 
MyVectorHandlerpgs
 
MyVectorHandlerpgsPrime
 
const doublereal gustVff
 
const doublereal gustXi
 
RigidF_t RigidF
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from ToBeOutput
flag fOutput
 
- Protected Attributes inherited from AirPropOwner
const AirPropertiespAirProperties
 

Detailed Description

Definition at line 69 of file aeromodal.h.

Member Enumeration Documentation

Enumerator
NO_RIGID 
RIGID 

Definition at line 107 of file aeromodal.h.

107  {
108  NO_RIGID = 0,
109  RIGID = 6
110  };

Constructor & Destructor Documentation

AerodynamicModal::AerodynamicModal ( unsigned int  uLabel,
const StructNode pN,
const Modal pMJ,
const Mat3x3 RaTmp,
const DofOwner pDO,
doublereal  Cd,
const int  NModal,
const int  NAero,
RigidF_t  rgF,
const int  Gust,
const doublereal  Vff,
SpMapMatrixHandler pAMat,
FullMatrixHandler pBMat,
FullMatrixHandler pCMat,
FullMatrixHandler pD0Mat,
FullMatrixHandler pD1Mat,
FullMatrixHandler pD2Mat,
flag  fout 
)

Definition at line 43 of file aeromodal.cc.

References ASSERT, DEBUGCOUTFNAME, StructDispNode::GetNodeType(), StructNode::GetRCurr(), StructDispNode::GetXCurr(), Mat3x3::MulTV(), NAeroStates, NGust, NStModes, P0, pgs, pgsPrime, pModalNode, pq, pqPrime, pqSec, pxa, pxaPrime, R0, Ra, RigidF, SAFENEWWITHCONSTRUCTOR, and Node::STRUCTURAL.

61 : Elem(uLabel, fout),
62 AerodynamicElem(uLabel, pDO, fout),
64 pModalNode(pN), pModalJoint(pMJ),
65 Ra(RaTmp),
66 Chord(Cd),
67 NStModes(NModal),
68 NAeroStates(NAero),
69 NGust(Gust),
70 pA(pAMat), pB(pBMat), pC(pCMat),
71 pD0(pD0Mat), pD1(pD1Mat), pD2(pD2Mat),
72 pq(0), pqPrime(0), pqSec(0),
73 pxa(0), pxaPrime(0),
74 pgs(0), pgsPrime(0),
75 gustVff(Vff), gustXi(0.707),
76 RigidF(rgF)
77 {
78  DEBUGCOUTFNAME("AerodynamicModal::AerodynamicModal");
79 
80  R0 = pModalNode->GetRCurr()*Ra;
82 
97 
98  ASSERT(pModalNode != 0);
100 }
MyVectorHandler * pq
Definition: aeromodal.h:93
const StructNode * pModalNode
Definition: aeromodal.h:75
FullMatrixHandler * pB
Definition: aeromodal.h:87
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
unsigned int NStModes
Definition: aeromodal.h:82
FullMatrixHandler * pC
Definition: aeromodal.h:88
SpMapMatrixHandler * pA
Definition: aeromodal.h:86
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
FullMatrixHandler * pD2
Definition: aeromodal.h:91
AerodynamicElem(unsigned int uL, const DofOwner *pDO, flag fOut)
Definition: aerodyn.cc:771
virtual Node::Type GetNodeType(void) const
Definition: strnode.cc:145
const Mat3x3 Ra
Definition: aeromodal.h:79
MyVectorHandler * pgs
Definition: aeromodal.h:100
MyVectorHandler * pqSec
Definition: aeromodal.h:95
const Modal * pModalJoint
Definition: aeromodal.h:76
MyVectorHandler * pxaPrime
Definition: aeromodal.h:98
FullMatrixHandler * pD0
Definition: aeromodal.h:89
Vec3 MulTV(const Vec3 &v) const
Definition: matvec3.cc:482
RigidF_t RigidF
Definition: aeromodal.h:113
MyVectorHandler * pxa
Definition: aeromodal.h:97
const doublereal gustVff
Definition: aeromodal.h:103
const doublereal gustXi
Definition: aeromodal.h:104
unsigned int NAeroStates
Definition: aeromodal.h:83
doublereal Chord
Definition: aeromodal.h:81
unsigned int uLabel
Definition: withlab.h:44
#define ASSERT(expression)
Definition: colamd.c:977
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
MyVectorHandler * pqPrime
Definition: aeromodal.h:94
FullMatrixHandler * pD1
Definition: aeromodal.h:90
MyVectorHandler * pgsPrime
Definition: aeromodal.h:101
unsigned int NGust
Definition: aeromodal.h:84
InitialAssemblyElem(unsigned int uL, flag fOut)
Definition: elem.cc:233
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41

Here is the call graph for this function:

AerodynamicModal::~AerodynamicModal ( void  )

Definition at line 102 of file aeromodal.cc.

References DEBUGCOUTFNAME, pA, pB, pC, pD0, pD1, pD2, pq, pqPrime, pqSec, pxa, pxaPrime, and SAFEDELETE.

103 {
104  DEBUGCOUTFNAME("AerodynamicModal::~AerodynamicModal");
105  if (pq != 0) {
106  SAFEDELETE(pq);
107  }
108  if (pqPrime != 0) {
110  }
111  if (pqSec != 0) {
112  SAFEDELETE(pqSec);
113  }
114  if (pxa != 0) {
115  SAFEDELETE(pxa);
116  }
117  if (pxaPrime != 0) {
119  }
120  if (pA != 0) {
121  SAFEDELETE(pA);
122  }
123  if (pB != 0) {
124  SAFEDELETE(pB);
125  }
126  if (pC != 0) {
127  SAFEDELETE(pC);
128  }
129  if (pD0 != 0) {
130  SAFEDELETE(pD0);
131  }
132  if (pD1 != 0) {
133  SAFEDELETE(pD1);
134  }
135  if (pD2 != 0) {
136  SAFEDELETE(pD2);
137  }
138 }
MyVectorHandler * pq
Definition: aeromodal.h:93
FullMatrixHandler * pB
Definition: aeromodal.h:87
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
FullMatrixHandler * pC
Definition: aeromodal.h:88
SpMapMatrixHandler * pA
Definition: aeromodal.h:86
FullMatrixHandler * pD2
Definition: aeromodal.h:91
MyVectorHandler * pqSec
Definition: aeromodal.h:95
MyVectorHandler * pxaPrime
Definition: aeromodal.h:98
FullMatrixHandler * pD0
Definition: aeromodal.h:89
MyVectorHandler * pxa
Definition: aeromodal.h:97
MyVectorHandler * pqPrime
Definition: aeromodal.h:94
FullMatrixHandler * pD1
Definition: aeromodal.h:90
#define SAFEDELETE(pnt)
Definition: mynewmem.h:710

Member Function Documentation

VariableSubMatrixHandler & AerodynamicModal::AssJac ( VariableSubMatrixHandler WorkMat,
doublereal  dCoef,
const VectorHandler XCurr,
const VectorHandler XPrimeCurr 
)
virtual

Implements Elem.

Definition at line 149 of file aeromodal.cc.

References Chord, DEBUGCOUT, AirPropOwner::fGetAirVelocity(), AirPropOwner::GetAirProps(), StructNode::GetRCurr(), StructDispNode::GetVCurr(), StructDispNode::GetXCurr(), gustVff, gustXi, DofOwnerOwner::iGetFirstIndex(), Modal::iGetModalIndex(), FullSubMatrixHandler::IncCoef(), NAeroStates, NGust, NStModes, pA, pB, pC, pD0, pD1, pD2, pModalJoint, pModalNode, FullSubMatrixHandler::PutColIndex(), FullSubMatrixHandler::PutRowIndex(), Ra, FullSubMatrixHandler::ResizeReset(), RigidF, VariableSubMatrixHandler::SetFull(), WorkSpaceDim(), and Zero3.

Referenced by InitialAssJac().

153 {
154  DEBUGCOUT("Entering AerodynamicModal::AssJac()" << std::endl);
155 
156  FullSubMatrixHandler& WM = WorkMat.SetFull();
157 
158  integer iNumRows = 0;
159  integer iNumCols = 0;
160  WorkSpaceDim(&iNumRows, &iNumCols);
161  WM.ResizeReset(iNumRows, iNumCols);
162 
163  integer iModalIndex = pModalJoint->iGetModalIndex();
164  for (unsigned int iCnt = 1; iCnt <= NStModes; iCnt++) {
165  WM.PutRowIndex(iCnt, iModalIndex+NStModes+iCnt);
166  WM.PutColIndex(iCnt, iModalIndex+iCnt);
167  WM.PutColIndex(NStModes+iCnt, iModalIndex+NStModes+iCnt);
168  }
169 
170  integer iAeroIndex = iGetFirstIndex();
171  for (unsigned int iCnt = 1; iCnt <= NAeroStates+2*NGust; iCnt++) {
172  WM.PutRowIndex(NStModes+iCnt, iAeroIndex+iCnt);
173  WM.PutColIndex(2*NStModes+iCnt, iAeroIndex+iCnt);
174  }
175 
176  /* Dati del nodo rigido */
177  const Vec3& X0(pModalNode->GetXCurr());
178  const Vec3& V0(pModalNode->GetVCurr());
179  const Mat3x3& Rn(pModalNode->GetRCurr());
180  Mat3x3 RR(Rn*Ra);
181  Vec3 Vr(V0);
182 
183  doublereal rho, vs, p, T;
184  GetAirProps(X0, rho, vs, p, T); /* p, T are not used yet */
185 
186  Vec3 VTmp(Zero3);
187  if (fGetAirVelocity(VTmp, X0)) {
188  Vr -= VTmp;
189  }
190 
191  /* velocitÓ nel riferimento nodale aerodinamico */
192  VTmp = RR.MulTV(Vr);
193  doublereal nV = std::abs(VTmp(1));
194  /* doublereal CV=Chord/(2*nV); */
195  doublereal qd = 0.5*rho*nV*nV;
196  doublereal qd1 = 0.25*rho*nV*Chord; /* qd*CV */
197  doublereal qd2 = 0.125*rho*Chord*Chord; /* qd*CV*CV */
198 
199  /* parte deformabile :
200  *
201  * | ||aP|
202  * | || |
203  * | cKae Mae+cCae -cqC ||bP|
204  * | || |
205  * |-c(1/CV)B 0 I-c(1/CV)A ||xa|
206  *
207  * con
208  * Mae=-qd CV^2 D2
209  * Cae=-qd CV D1
210  * Kae=-qd D0
211  */
212  for (unsigned int i = 1; i <= NStModes; i++) {
213  for (unsigned int j = 1; j <= NStModes; j++) {
214  WM.IncCoef(i, j,
215  -dCoef*qd*pD0->operator()(RigidF + i, RigidF + j));
216  WM.IncCoef(i, j + NStModes,
217  -qd2*pD2->operator()(RigidF + i, RigidF + j)
218  -dCoef*qd1*pD1->operator()(RigidF + i, RigidF + j));
219  }
220  }
221 
222  for (unsigned int j = 1; j <= NAeroStates; j++) {
223  for (unsigned int i = 1; i <= NStModes; i++) {
224  WM.IncCoef(i, j + 2*NStModes,
225  -dCoef*qd*pC->operator()(RigidF + i, j));
226  WM.IncCoef(j + NStModes, i,
227  -dCoef*(2*nV/Chord)*pB->operator()(j, RigidF + i));
228  }
229  }
230 
231  for (unsigned int j = 1; j <= NAeroStates; j++) {
232  for (unsigned int i = 1; i <= NAeroStates; i++) {
233  WM.IncCoef(i + NStModes, j + 2*NStModes,
234  1.*(i == j) - dCoef*(2*nV/Chord)*pA->operator()(i, j));
235  }
236  }
237 
238  if (NGust) {
239  for (unsigned int i = 1; i <= NStModes; i++) {
240  WM.IncCoef(i, 2*NStModes + NAeroStates + 1,
241  -dCoef*qd*pD0->operator()(RigidF + i, RigidF + NStModes + 1));
242  WM.IncCoef(i, 2*NStModes + NAeroStates + 3,
243  -dCoef*qd*pD0->operator()(RigidF + i, RigidF + NStModes + 2));
244  WM.IncCoef(i, 2*NStModes + NAeroStates + 2,
245  -qd2*pD2->operator()(RigidF + i, RigidF + NStModes + 1)
246  -dCoef*qd1*pD1->operator()(RigidF + i, RigidF + NStModes + 1));
247  WM.IncCoef(i, 2*NStModes + NAeroStates + 4,
248  -qd2*pD2->operator()(RigidF + i, RigidF + NStModes + 2)
249  -dCoef*qd1*pD1->operator()(RigidF + i, RigidF + NStModes + 2));
250  }
251 
252  for (unsigned int i = 1; i <= NAeroStates; i++) {
253  WM.IncCoef(i + NStModes, 2*NStModes + NAeroStates + 1,
254  -dCoef*(2*nV/Chord)*pB->operator()(i, RigidF + NStModes + 1));
255  WM.IncCoef(i + NStModes, 2*NStModes + NAeroStates + 3,
256  -dCoef*(2*nV/Chord)*pB->operator()(i, RigidF + NStModes + 2));
257  }
258 
259  for (unsigned int i = 0; i < NGust; i++) {
260  WM.IncCoef(i*2 + 1 + NStModes+NAeroStates,
261  i*2 + 1 + 2*NStModes + NAeroStates, 1.);
262  WM.IncCoef(i*2 + 1 + NStModes+NAeroStates,
263  i*2 + 2 + 2*NStModes + NAeroStates, -dCoef);
264  WM.IncCoef(i*2 + 2 + NStModes+NAeroStates,
265  i*2 + 1 + 2*NStModes+NAeroStates,
266  dCoef*gustVff*gustVff);
267  WM.IncCoef(i*2 + 2 + NStModes + NAeroStates,
268  i*2 + 2 + 2*NStModes + NAeroStates,
269  1. + dCoef*2*gustXi*gustVff);
270  }
271  }
272 
273  return WorkMat;
274 }
const StructNode * pModalNode
Definition: aeromodal.h:75
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
const Vec3 Zero3(0., 0., 0.)
virtual bool GetAirProps(const Vec3 &X, doublereal &rho, doublereal &c, doublereal &p, doublereal &T) const
Definition: aerodyn.cc:760
FullMatrixHandler * pB
Definition: aeromodal.h:87
Definition: matvec3.h:98
void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: aeromodal.h:163
unsigned int NStModes
Definition: aeromodal.h:82
FullMatrixHandler * pC
Definition: aeromodal.h:88
SpMapMatrixHandler * pA
Definition: aeromodal.h:86
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
FullMatrixHandler * pD2
Definition: aeromodal.h:91
const Mat3x3 Ra
Definition: aeromodal.h:79
void IncCoef(integer iRow, integer iCol, const doublereal &dCoef)
Definition: submat.h:683
const Modal * pModalJoint
Definition: aeromodal.h:76
FullMatrixHandler * pD0
Definition: aeromodal.h:89
RigidF_t RigidF
Definition: aeromodal.h:113
const doublereal gustVff
Definition: aeromodal.h:103
const doublereal gustXi
Definition: aeromodal.h:104
#define DEBUGCOUT(msg)
Definition: myassert.h:232
unsigned int NAeroStates
Definition: aeromodal.h:83
doublereal Chord
Definition: aeromodal.h:81
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
virtual void ResizeReset(integer, integer)
Definition: submat.cc:182
integer iGetModalIndex(void) const
Definition: modal.h:391
FullMatrixHandler * pD1
Definition: aeromodal.h:90
void PutRowIndex(integer iSubRow, integer iRow)
Definition: submat.h:311
unsigned int NGust
Definition: aeromodal.h:84
virtual const Vec3 & GetVCurr(void) const
Definition: strnode.h:322
virtual flag fGetAirVelocity(Vec3 &Velocity, const Vec3 &X) const
Definition: aerodyn.cc:725
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

SubVectorHandler & AerodynamicModal::AssRes ( SubVectorHandler WorkVec,
doublereal  dCoef,
const VectorHandler XCurr,
const VectorHandler XPrimeCurr 
)
virtual

Implements Elem.

Definition at line 278 of file aeromodal.cc.

References AssVec(), DEBUGCOUTFNAME, StructNode::GetRCurr(), StructDispNode::GetVCurr(), StructNode::GetWCurr(), StructNode::GetWPCurr(), StructDispNode::GetXCurr(), StructDispNode::GetXPPCurr(), DofOwnerOwner::iGetFirstIndex(), StructDispNode::iGetFirstMomentumIndex(), Modal::iGetModalIndex(), NAeroStates, NGust, NStModes, P0, pgs, pgsPrime, pModalJoint, pModalNode, pq, pqPrime, pqSec, MyVectorHandler::Put(), MyVectorHandler::PutCoef(), SubVectorHandler::PutRowIndex(), pxa, pxaPrime, R0, Ra, VectorHandler::ResizeReset(), RigidF, and RotManip::VecRot().

282 {
283  DEBUGCOUTFNAME("AerodynamicModal::AssRes");
284  WorkVec.ResizeReset(RigidF + NStModes + NAeroStates + 2*NGust);
285 
286  if (RigidF) {
287  integer iFirstIndex = pModalNode->iGetFirstMomentumIndex();
288  for (int iCnt = 1; iCnt <= RigidF; iCnt++) {
289  WorkVec.PutRowIndex(iCnt, iFirstIndex + iCnt);
290  }
291 
292  const Vec3& X0(pModalNode->GetXCurr());
293  const Mat3x3& Rn(pModalNode->GetRCurr());
294 
295  Mat3x3 RR(Rn*Ra);
296 
297  // q
298  pq->Put(1, RR.MulTV(X0) - P0);
299  pq->Put(4, RotManip::VecRot(RR.MulMT(R0))); // nota: wrappa; se serve si pu˛ eliminare
300 
301  // dot{q}
302  const Vec3& V0(pModalNode->GetVCurr());
303  const Vec3& W0(pModalNode->GetWCurr());
304  pqPrime->Put(1, RR.MulTV(V0 + X0.Cross(W0)));
305  pqPrime->Put(4, RR.MulTV(W0));
306 
307  // ddot{q}
308  const Vec3& XPP0(pModalNode->GetXPPCurr());
309  const Vec3& WP0(pModalNode->GetWPCurr());
310  pqSec->Put(1, RR.MulTV(XPP0)); // verificare: non mancano i termini di trasporto ecc?
311  pqSec->Put(4, RR.MulTV(WP0));
312  }
313 
314  integer iModalIndex = pModalJoint->iGetModalIndex();
315 
316  for (unsigned int iCnt = 1; iCnt <= NStModes; iCnt++) {
317  WorkVec.PutRowIndex(RigidF + iCnt, iModalIndex + NStModes + iCnt);
318  }
319 
320  integer iAeroIndex = iGetFirstIndex();
321  for (unsigned int iCnt = 1; iCnt <= NAeroStates + 2*NGust; iCnt++) {
322  WorkVec.PutRowIndex(RigidF + NStModes+iCnt, iAeroIndex + iCnt);
323  }
324 
325  /* Recupera i vettori {a} e {aP} e {aS} (deformate modali) */
326  // FIXME: get this info from modal joint?
327  for (unsigned int iCnt = 1; iCnt <= NStModes; iCnt++) {
328  pq->PutCoef(iCnt + RigidF, XCurr(iModalIndex + iCnt));
329  pqPrime->PutCoef(iCnt + RigidF, XPrimeCurr(iModalIndex + iCnt));
330  pqSec->PutCoef(iCnt + RigidF, XPrimeCurr(iModalIndex + NStModes + iCnt));
331  }
332 
333  /* Recupera i vettori {xa} e {xaP} */
334  for (unsigned int iCnt = 1; iCnt <= NAeroStates; iCnt++) {
335  pxa->PutCoef(iCnt, XCurr(iAeroIndex + iCnt));
336  pxaPrime->PutCoef(iCnt, XPrimeCurr(iAeroIndex + iCnt));
337  }
338 
339  for (unsigned int iCnt = 1; iCnt <= 2*NGust; iCnt++) {
340  pgs->PutCoef(iCnt, XCurr(iAeroIndex + NAeroStates + iCnt));
341  pgsPrime->PutCoef(iCnt, XPrimeCurr(iAeroIndex + NAeroStates + iCnt));
342  }
343 
344  AssVec(WorkVec);
345 
346  return WorkVec;
347 }
MyVectorHandler * pq
Definition: aeromodal.h:93
const StructNode * pModalNode
Definition: aeromodal.h:75
void AssVec(SubVectorHandler &WorkVec)
Definition: aeromodal.cc:430
Definition: matvec3.h:98
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
virtual void ResizeReset(integer)
Definition: vh.cc:55
unsigned int NStModes
Definition: aeromodal.h:82
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
const Mat3x3 Ra
Definition: aeromodal.h:79
MyVectorHandler * pgs
Definition: aeromodal.h:100
virtual void Put(integer iRow, const Vec3 &v)
Definition: vh.cc:699
MyVectorHandler * pqSec
Definition: aeromodal.h:95
const Modal * pModalJoint
Definition: aeromodal.h:76
MyVectorHandler * pxaPrime
Definition: aeromodal.h:98
virtual void PutCoef(integer iRow, const doublereal &dCoef)
Definition: vh.h:261
Vec3 VecRot(const Mat3x3 &Phi)
Definition: Rot.cc:136
RigidF_t RigidF
Definition: aeromodal.h:113
MyVectorHandler * pxa
Definition: aeromodal.h:97
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
unsigned int NAeroStates
Definition: aeromodal.h:83
virtual integer iGetFirstMomentumIndex(void) const =0
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
virtual const Vec3 & GetWPCurr(void) const
Definition: strnode.h:1042
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
MyVectorHandler * pqPrime
Definition: aeromodal.h:94
integer iGetModalIndex(void) const
Definition: modal.h:391
MyVectorHandler * pgsPrime
Definition: aeromodal.h:101
unsigned int NGust
Definition: aeromodal.h:84
virtual const Vec3 & GetVCurr(void) const
Definition: strnode.h:322
virtual const Vec3 & GetXPPCurr(void) const
Definition: strnode.h:334
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

void AerodynamicModal::AssVec ( SubVectorHandler WorkVec)
protected

Definition at line 430 of file aeromodal.cc.

References VectorHandler::Add(), Chord, DEBUGCOUTFNAME, AirPropOwner::fGetAirVelocity(), AirPropOwner::GetAirProps(), StructNode::GetRCurr(), StructDispNode::GetVCurr(), StructDispNode::GetXCurr(), gustVff, gustXi, VectorHandler::IncCoef(), MyVectorHandler::IncCoef(), MatrixHandler::MatVecIncMul(), NAeroStates, NGust, NStModes, pA, pB, pC, pD0, pD1, pD2, pgs, pgsPrime, pModalNode, pq, pqPrime, pqSec, Vec3::Put(), pxa, pxaPrime, Ra, MyVectorHandler::Reset(), RigidF, and Zero3.

Referenced by AssRes(), and InitialAssRes().

431 {
432  DEBUGCOUTFNAME("AerodynamicModal::AssVec");
433 
434  /* Dati del nodo rigido */
435  const Vec3& X0(pModalNode->GetXCurr());
436  Vec3 V0(pModalNode->GetVCurr());
437  const Mat3x3& Rn(pModalNode->GetRCurr());
438  Mat3x3 RR(Rn*Ra);
439  Vec3 Vr(V0);
440 
441  Vr(1) = 0.0; // perturbazione di velocita', verificare
442 
443  doublereal rho, vs, p, T;
444  GetAirProps(X0, rho, vs, p, T); /* p, T are not used yet */
445 
446  Vec3 Vair(Zero3);
447  if (fGetAirVelocity(Vair, X0)) {
448  Vr -= Vair;
449  }
450  /* velocita' nel riferimento nodale aerodinamico */
451  V0 = RR.MulTV(Vr);
452  doublereal nV = std::abs(V0(1));
454  TmpA.Reset();
456  Tmp.Reset();
458  TmpP.Reset();
460  TmpS.Reset();
461 
462  // FIXME: use matrix/vector product?
463  for (unsigned int i = 1; i <= NAeroStates; i++) {
464  for (unsigned int j = 1; j <= NStModes + RigidF; j++) {
465  TmpA.IncCoef(i, pB->operator()(i, j)*(pq->operator()(j)));
466  }
467  }
468 
469  pA->MatVecIncMul(TmpA, *pxa);
470 
471  /* doublereal CV = Chord/(2*nV); */
472  doublereal qd = 0.5*rho*nV*nV;
473  doublereal qd1 = 0.25*rho*nV*Chord; /* qd*CV */
474  doublereal qd2 = 0.125*rho*Chord*Chord; /* qd*CV*CV */
475 
476  for (unsigned int i = 1; i <= NAeroStates; i++) {
477  WorkVec.IncCoef(RigidF + NStModes + i, -pxaPrime->operator()(i) + (2*nV/Chord)*(TmpA(i)));
478  }
479 
480  for (unsigned int i = 1; i <= NStModes + RigidF; i++) {
481  for (unsigned int j = 1; j <= NStModes + RigidF; j++) {
482  Tmp.IncCoef(i, pD0->operator()(i, j)*(pq->operator()(j)));
483  TmpP.IncCoef(i, pD1->operator()(i, j)*(pqPrime->operator()(j)));
484  TmpS.IncCoef(i, pD2->operator()(i, j)*(pqSec->operator()(j)));
485  }
486  }
487 
488  for (unsigned int i = 1; i <= NStModes + RigidF; i++) {
489  for (unsigned int j = 1; j <= NAeroStates; j++) {
490  Tmp.IncCoef(i, pC->operator()(i, j)*(pxa->operator()(j)));
491  }
492  }
493 
494  if (RigidF) {
495  Vec3 F(Zero3);
496  Vec3 M(Zero3);
497 
498  for (unsigned int i = 1; i <= 3; i++) {
499  F.Put(i, qd*Tmp(i) + qd1*TmpP(i) + qd2*TmpS(i));
500  M.Put(i, qd*Tmp(i + 3) + qd1*TmpP(i + 3) + qd2*TmpS(i + 3));
501  }
502 
503  // std::cout << F << std::endl;
504  F = RR*F;
505  M = RR*M;
506 
507 #if 0
508  // tolti perche' altrimenti inizia un Dutch Roll
509  F(1) = 0.;
510  F(2) = 0.;
511  M(1) = 0.;
512  M(3) = 0.;
513 #endif
514 
515  WorkVec.Add(1, F);
516  WorkVec.Add(4, M);
517  }
518 
519  for (unsigned int i = 1 + RigidF; i <= NStModes + RigidF; i++) {
520  WorkVec.IncCoef(i, qd*Tmp(i) + qd1*TmpP(i) + qd2*TmpS(i));
521  }
522 
523  if (NGust) {
524 #if 0 /* unused */
525  doublereal Vyg = Vair(2)/nV;
526  doublereal Vzg = Vair(3)/nV;
527 #endif
528  for (unsigned int i = 1; i <= NAeroStates; i++) {
529  WorkVec.IncCoef(RigidF + NStModes + i,
530  (2*nV/Chord)*pB->operator()(i, RigidF + NStModes + 1)*pgs->operator()(1)
531  + (2*nV/Chord)*pB->operator()(i, RigidF + NStModes + 2)*pgs->operator()(3));
532  }
533 
534  if (RigidF) {
535  Vec3 F(Zero3);
536  Vec3 M(Zero3);
537 
538  for (unsigned int i = 1; i <= 3; i++) {
539  F.Put(i, qd*pD0->operator()(i, RigidF + NStModes + 1)*pgs->operator()(1)
540  + qd*pD0->operator()(i, RigidF + NStModes + 2)*pgs->operator()(3)
541  + qd1*pD1->operator()(i, RigidF + NStModes + 1)*pgs->operator()(2)
542  + qd1*pD1->operator()(i, RigidF + NStModes + 2)*pgs->operator()(4)
543  + qd2*pD2->operator()(i, RigidF + NStModes + 1)*pgsPrime->operator()(2)
544  + qd2*pD2->operator()(i, RigidF + NStModes + 2)*pgsPrime->operator()(4));
545  M.Put(i, qd*pD0->operator()(i + 3, RigidF + NStModes + 1)*pgs->operator()(1)
546  + qd*pD0->operator()(i + 3, RigidF + NStModes + 2)*pgs->operator()(3)
547  + qd1*pD1->operator()(i + 3, RigidF + NStModes + 1)*pgs->operator()(2)
548  + qd1*pD1->operator()(i + 3, RigidF + NStModes + 2)*pgs->operator()(4)
549  + qd2*pD2->operator()(i + 3, RigidF + NStModes + 1)*pgsPrime->operator()(2)
550  + qd2*pD2->operator()(i + 3, RigidF + NStModes + 2)*pgsPrime->operator()(4));
551  }
552 
553  // std::cout << F << std::endl;
554  F = RR*F;
555  M = RR*M;
556  WorkVec.Add(1, F);
557  WorkVec.Add(4, M);
558  }
559 
560  for (unsigned int i = 1 + RigidF; i <= NStModes + RigidF; i++) {
561  WorkVec.IncCoef(i, qd*pD0->operator()(i, RigidF + NStModes + 1)*pgs->operator()(1)
562  + qd*pD0->operator()(i, RigidF + NStModes + 2)*pgs->operator()(3)
563  + qd1*pD1->operator()(i, RigidF + NStModes + 1)*pgs->operator()(2)
564  + qd1*pD1->operator()(i, RigidF + NStModes + 2)*pgs->operator()(4)
565  + qd2*pD2->operator()(i, RigidF + NStModes + 1)*pgsPrime->operator()(2)
566  + qd2*pD2->operator()(i, RigidF + NStModes + 2)*pgsPrime->operator()(4));
567  }
568 
569  for (unsigned int i = 0; i < NGust; i++) {
570  WorkVec.IncCoef(RigidF + i*2 + 1 + NStModes + NAeroStates,
571  -pgsPrime->operator()(1 + i*2) + pgs->operator()(2 + i*2));
572  if (nV != 0) {
573  WorkVec.IncCoef(RigidF + i*2 + 2 + NStModes + NAeroStates,
574  -pgsPrime->operator()(2 + i*2)
575  - gustVff*gustVff*pgs->operator()(1 + i*2)
576  - 2*gustXi*gustVff*pgs->operator()(2 + i*2)
577  + gustVff*gustVff*Vair(2 + i)/nV);
578 
579  } else {
580  WorkVec.IncCoef(RigidF + i*2 + 2 + NStModes + NAeroStates,
581  -pgsPrime->operator()(2 + i*2)
582  - gustVff*gustVff*pgs->operator()(1 + i*2)
583  - 2*gustXi*gustVff*pgs->operator()(2 + i*2));
584  }
585  }
586 
587  // std::cout << X0 << std::endl;
588  // std::cout << WorkVec(3) << std::endl;
589  }
590 }
MyVectorHandler * pq
Definition: aeromodal.h:93
const StructNode * pModalNode
Definition: aeromodal.h:75
const Vec3 Zero3(0., 0., 0.)
virtual bool GetAirProps(const Vec3 &X, doublereal &rho, doublereal &c, doublereal &p, doublereal &T) const
Definition: aerodyn.cc:760
FullMatrixHandler * pB
Definition: aeromodal.h:87
Definition: matvec3.h:98
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
unsigned int NStModes
Definition: aeromodal.h:82
FullMatrixHandler * pC
Definition: aeromodal.h:88
SpMapMatrixHandler * pA
Definition: aeromodal.h:86
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
FullMatrixHandler * pD2
Definition: aeromodal.h:91
const Mat3x3 Ra
Definition: aeromodal.h:79
virtual VectorHandler & MatVecIncMul(VectorHandler &out, const VectorHandler &in) const
Definition: mh.cc:350
virtual void IncCoef(integer iRow, const doublereal &dCoef)=0
MyVectorHandler * pgs
Definition: aeromodal.h:100
MyVectorHandler * pqSec
Definition: aeromodal.h:95
MyVectorHandler * pxaPrime
Definition: aeromodal.h:98
FullMatrixHandler * pD0
Definition: aeromodal.h:89
RigidF_t RigidF
Definition: aeromodal.h:113
MyVectorHandler * pxa
Definition: aeromodal.h:97
const doublereal gustVff
Definition: aeromodal.h:103
const doublereal gustXi
Definition: aeromodal.h:104
unsigned int NAeroStates
Definition: aeromodal.h:83
doublereal Chord
Definition: aeromodal.h:81
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
virtual void Add(integer iRow, const Vec3 &v)
Definition: vh.cc:63
MyVectorHandler * pqPrime
Definition: aeromodal.h:94
FullMatrixHandler * pD1
Definition: aeromodal.h:90
MyVectorHandler * pgsPrime
Definition: aeromodal.h:101
unsigned int NGust
Definition: aeromodal.h:84
virtual const Vec3 & GetVCurr(void) const
Definition: strnode.h:322
virtual flag fGetAirVelocity(Vec3 &Velocity, const Vec3 &X) const
Definition: aerodyn.cc:725
double doublereal
Definition: colamd.c:52

Here is the call graph for this function:

AerodynamicElem::Type AerodynamicModal::GetAerodynamicElemType ( void  ) const
inlinevirtual

Implements AerodynamicElem.

Definition at line 213 of file aeromodal.h.

References AerodynamicElem::AEROMODAL.

213  {
215  };
virtual void AerodynamicModal::GetConnectedNodes ( std::vector< const Node * > &  connectedNodes) const
inlinevirtual

Reimplemented from Elem.

Definition at line 221 of file aeromodal.h.

References pModalNode.

221  {
222  connectedNodes.resize(1);
223  connectedNodes[0] = pModalNode;
224  };
const StructNode * pModalNode
Definition: aeromodal.h:75
DofOrder::Order AerodynamicModal::GetDofType ( unsigned int  i) const
inlinevirtual

Reimplemented from Elem.

Definition at line 149 of file aeromodal.h.

References ASSERT, DofOrder::DIFFERENTIAL, and iGetNumDof().

149  {
150  /* gradi di liberta' differenziali (eq. modali) */
151  ASSERT(i < iGetNumDof());
152  return DofOrder::DIFFERENTIAL;
153  };
unsigned int iGetNumDof(void) const
Definition: aeromodal.h:144
#define ASSERT(expression)
Definition: colamd.c:977

Here is the call graph for this function:

Elem::Type AerodynamicModal::GetElemType ( void  ) const
inlinevirtual

Implements Elem.

Definition at line 156 of file aeromodal.h.

References Elem::AEROMODAL.

156  {
157  return Elem::AEROMODAL;
158  };
unsigned int AerodynamicModal::iGetInitialNumDof ( void  ) const
inlinevirtual

Implements SubjectToInitialAssembly.

Definition at line 187 of file aeromodal.h.

References NAeroStates, and NGust.

187  {
188  return NAeroStates + NGust*2;
189  };
unsigned int NAeroStates
Definition: aeromodal.h:83
unsigned int NGust
Definition: aeromodal.h:84
unsigned int AerodynamicModal::iGetNumDof ( void  ) const
inlinevirtual

Reimplemented from Elem.

Definition at line 144 of file aeromodal.h.

References NAeroStates, and NGust.

Referenced by GetDofType().

144  {
145  return NAeroStates + NGust*2;
146  };
unsigned int NAeroStates
Definition: aeromodal.h:83
unsigned int NGust
Definition: aeromodal.h:84
VariableSubMatrixHandler& AerodynamicModal::InitialAssJac ( VariableSubMatrixHandler WorkMat,
const VectorHandler XCurr 
)
inlinevirtual

Implements SubjectToInitialAssembly.

Definition at line 200 of file aeromodal.h.

References AssJac(), and DEBUGCOUTFNAME.

202  {
203  DEBUGCOUTFNAME("AerodynamicModal::InitialAssJac");
204  AssJac(WorkMat, 0, XCurr, XCurr);
205  return WorkMat;
206  };
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &, const VectorHandler &)
Definition: aeromodal.cc:149

Here is the call graph for this function:

SubVectorHandler & AerodynamicModal::InitialAssRes ( SubVectorHandler WorkVec,
const VectorHandler XCurr 
)
virtual

Implements SubjectToInitialAssembly.

Definition at line 350 of file aeromodal.cc.

References AssVec(), grad::atan(), DEBUGCOUTFNAME, StructNode::GetRCurr(), StructDispNode::GetVCurr(), StructNode::GetWCurr(), StructDispNode::GetXCurr(), DofOwnerOwner::iGetFirstIndex(), Modal::iGetModalIndex(), NAeroStates, NGust, NStModes, P0, CGR_Rot::Param, pgs, pgsPrime, pModalJoint, pModalNode, pq, pqPrime, pqSec, MyVectorHandler::Put(), MyVectorHandler::PutCoef(), SubVectorHandler::PutRowIndex(), pxa, pxaPrime, R0, Ra, VectorHandler::ResizeReset(), RigidF, and Zero3.

352 {
353  DEBUGCOUTFNAME("AerodynamicModal::AssRes");
354  const Vec3& X0(pModalNode->GetXCurr());
355  const Mat3x3& Rn(pModalNode->GetRCurr());
356  R0 = Rn*Ra;
357  P0 = R0.MulTV(X0);
358 
359  WorkVec.ResizeReset(RigidF + NStModes + NAeroStates + 2*NGust);
360 
361  if (RigidF) {
362  integer iFirstIndex = pModalNode->iGetFirstIndex();
363  for (int iCnt = 1; iCnt <= RigidF; iCnt++) {
364  WorkVec.PutRowIndex(iCnt, iFirstIndex + RigidF + iCnt);
365  }
366 
367  const Vec3& X0(pModalNode->GetXCurr());
368  const Mat3x3& Rn(pModalNode->GetRCurr());
369  Mat3x3 RR(Rn*Ra);
370 
371  // q
372  pq->Put(1, RR.MulTV(X0) - P0);
373 
374  Vec3 g(CGR_Rot::Param, RR.MulMT(R0));
375  doublereal d(g.Norm());
376  if (d > std::numeric_limits<doublereal>::epsilon()) {
377  pq->Put(4, g*(2./d*atan(d/2.)));
378 
379  } else {
380  pq->Put(4, Zero3);
381  }
382 
383  // dot{q}
384  const Vec3& V0(pModalNode->GetVCurr());
385  const Vec3& W0(pModalNode->GetWCurr());
386  pqPrime->Put(1, RR.MulTV(V0));
387  pqPrime->Put(4, RR.MulTV(W0));
388 
389  // ddot{q}
390  pqPrime->Put(1, Zero3);
391  pqPrime->Put(4, Zero3);
392  }
393 
394  integer iModalIndex = pModalJoint->iGetModalIndex();
395 
396  for (unsigned int iCnt = 1; iCnt <= NStModes; iCnt++) {
397  WorkVec.PutRowIndex(RigidF + iCnt, iModalIndex + NStModes + iCnt);
398  }
399 
400  integer iAeroIndex = iGetFirstIndex();
401  for (unsigned int iCnt = 1; iCnt <= NAeroStates + 2*NGust; iCnt++) {
402  WorkVec.PutRowIndex(RigidF + NStModes + iCnt, iAeroIndex + iCnt);
403  }
404 
405  /* Recupera i vettori {a} e {aP} e {aS} (deformate modali) */
406  for (unsigned int iCnt = 1; iCnt <= NStModes; iCnt++) {
407  pq->PutCoef(iCnt + RigidF, XCurr(iModalIndex + iCnt));
408  pqPrime->PutCoef(iCnt + RigidF, 0);
409  pqSec->PutCoef(iCnt + RigidF, 0);
410  }
411 
412  /* Recupera i vettori {xa} e {xaP} */
413  for (unsigned int iCnt = 1; iCnt <= NAeroStates; iCnt++) {
414  pxa->PutCoef(iCnt, XCurr(iAeroIndex + iCnt));
415  pxaPrime->PutCoef(iCnt, 0);
416  }
417 
418  for (unsigned int iCnt = 1; iCnt <= 2*NGust; iCnt++) {
419  pgs->PutCoef(iCnt, XCurr(iAeroIndex + NAeroStates + iCnt));
420  pgsPrime->PutCoef(iCnt, 0.);
421  }
422 
423  AssVec(WorkVec);
424 
425  return WorkVec;
426 }
MyVectorHandler * pq
Definition: aeromodal.h:93
const StructNode * pModalNode
Definition: aeromodal.h:75
const Vec3 Zero3(0., 0., 0.)
const Param_Manip Param
Definition: matvec3.cc:644
void AssVec(SubVectorHandler &WorkVec)
Definition: aeromodal.cc:430
Definition: matvec3.h:98
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
virtual void ResizeReset(integer)
Definition: vh.cc:55
unsigned int NStModes
Definition: aeromodal.h:82
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
const Mat3x3 Ra
Definition: aeromodal.h:79
MyVectorHandler * pgs
Definition: aeromodal.h:100
virtual void Put(integer iRow, const Vec3 &v)
Definition: vh.cc:699
MyVectorHandler * pqSec
Definition: aeromodal.h:95
const Modal * pModalJoint
Definition: aeromodal.h:76
MyVectorHandler * pxaPrime
Definition: aeromodal.h:98
virtual void PutCoef(integer iRow, const doublereal &dCoef)
Definition: vh.h:261
RigidF_t RigidF
Definition: aeromodal.h:113
MyVectorHandler * pxa
Definition: aeromodal.h:97
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
unsigned int NAeroStates
Definition: aeromodal.h:83
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
MyVectorHandler * pqPrime
Definition: aeromodal.h:94
integer iGetModalIndex(void) const
Definition: modal.h:391
MyVectorHandler * pgsPrime
Definition: aeromodal.h:101
unsigned int NGust
Definition: aeromodal.h:84
virtual const Vec3 & GetVCurr(void) const
Definition: strnode.h:322
GradientExpression< UnaryExpr< FuncAtan, Expr > > atan(const GradientExpression< Expr > &u)
Definition: gradient.h:2985
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

void AerodynamicModal::InitialWorkSpaceDim ( integer piNumRows,
integer piNumCols 
) const
inlinevirtual

Implements SubjectToInitialAssembly.

Definition at line 193 of file aeromodal.h.

References NAeroStates, NGust, and NStModes.

193  {
194  *piNumRows = NAeroStates + NStModes + NGust*2;
195  *piNumCols = NAeroStates + 2*NStModes + NGust*2;
196  };
unsigned int NStModes
Definition: aeromodal.h:82
unsigned int NAeroStates
Definition: aeromodal.h:83
unsigned int NGust
Definition: aeromodal.h:84
void AerodynamicModal::Output ( OutputHandler OH) const
virtual

Reimplemented from ToBeOutput.

Definition at line 595 of file aeromodal.cc.

References OutputHandler::AeroModals(), ToBeOutput::bToBeOutput(), WithLabel::GetLabel(), NAeroStates, NGust, pxa, and pxaPrime.

596 {
597  if (bToBeOutput()) {
598  OH.AeroModals() << std::setw(8) << GetLabel() << " ";
599  for (unsigned int iCnt = 1; iCnt <= NAeroStates; iCnt++) {
600  OH.AeroModals() << " " << pxa->operator()(iCnt);
601  }
602  for (unsigned int iCnt = 1; iCnt <= NAeroStates + 2*NGust; iCnt++) {
603  OH.AeroModals() << " " << pxaPrime->operator()(iCnt);
604  }
605  OH.AeroModals() << std::endl;
606  }
607 }
virtual bool bToBeOutput(void) const
Definition: output.cc:890
std::ostream & AeroModals(void) const
Definition: output.h:527
MyVectorHandler * pxaPrime
Definition: aeromodal.h:98
MyVectorHandler * pxa
Definition: aeromodal.h:97
unsigned int NAeroStates
Definition: aeromodal.h:83
unsigned int NGust
Definition: aeromodal.h:84
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

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

Implements Elem.

Definition at line 142 of file aeromodal.cc.

143 {
144  return out << " /* aerodynamic modal: not implemented yet */" << std::endl;
145 }
void AerodynamicModal::WorkSpaceDim ( integer piNumRows,
integer piNumCols 
) const
inlinevirtual

Implements Elem.

Definition at line 163 of file aeromodal.h.

References NAeroStates, NGust, and NStModes.

Referenced by AssJac().

163  {
164  *piNumRows = NAeroStates + NStModes + NGust*2;
165  *piNumCols = NAeroStates + 2*NStModes + NGust*2;
166  };
unsigned int NStModes
Definition: aeromodal.h:82
unsigned int NAeroStates
Definition: aeromodal.h:83
unsigned int NGust
Definition: aeromodal.h:84

Member Data Documentation

doublereal AerodynamicModal::Chord
protected

Definition at line 81 of file aeromodal.h.

Referenced by AssJac(), and AssVec().

const doublereal AerodynamicModal::gustVff
protected

Definition at line 103 of file aeromodal.h.

Referenced by AssJac(), and AssVec().

const doublereal AerodynamicModal::gustXi
protected

Definition at line 104 of file aeromodal.h.

Referenced by AssJac(), and AssVec().

unsigned int AerodynamicModal::NAeroStates
protected
unsigned int AerodynamicModal::NGust
protected
unsigned int AerodynamicModal::NStModes
protected
Vec3 AerodynamicModal::P0
protected

Definition at line 77 of file aeromodal.h.

Referenced by AerodynamicModal(), AssRes(), and InitialAssRes().

SpMapMatrixHandler* AerodynamicModal::pA
protected

Definition at line 86 of file aeromodal.h.

Referenced by AssJac(), AssVec(), and ~AerodynamicModal().

FullMatrixHandler* AerodynamicModal::pB
protected

Definition at line 87 of file aeromodal.h.

Referenced by AssJac(), AssVec(), and ~AerodynamicModal().

FullMatrixHandler* AerodynamicModal::pC
protected

Definition at line 88 of file aeromodal.h.

Referenced by AssJac(), AssVec(), and ~AerodynamicModal().

FullMatrixHandler* AerodynamicModal::pD0
protected

Definition at line 89 of file aeromodal.h.

Referenced by AssJac(), AssVec(), and ~AerodynamicModal().

FullMatrixHandler* AerodynamicModal::pD1
protected

Definition at line 90 of file aeromodal.h.

Referenced by AssJac(), AssVec(), and ~AerodynamicModal().

FullMatrixHandler* AerodynamicModal::pD2
protected

Definition at line 91 of file aeromodal.h.

Referenced by AssJac(), AssVec(), and ~AerodynamicModal().

MyVectorHandler* AerodynamicModal::pgs
protected

Definition at line 100 of file aeromodal.h.

Referenced by AerodynamicModal(), AssRes(), AssVec(), and InitialAssRes().

MyVectorHandler* AerodynamicModal::pgsPrime
protected

Definition at line 101 of file aeromodal.h.

Referenced by AerodynamicModal(), AssRes(), AssVec(), and InitialAssRes().

const Modal* AerodynamicModal::pModalJoint
protected

Definition at line 76 of file aeromodal.h.

Referenced by AssJac(), AssRes(), and InitialAssRes().

const StructNode* AerodynamicModal::pModalNode
protected

Definition at line 75 of file aeromodal.h.

Referenced by AerodynamicModal(), AssJac(), AssRes(), AssVec(), GetConnectedNodes(), and InitialAssRes().

MyVectorHandler* AerodynamicModal::pq
protected

Definition at line 93 of file aeromodal.h.

Referenced by AerodynamicModal(), AssRes(), AssVec(), InitialAssRes(), and ~AerodynamicModal().

MyVectorHandler* AerodynamicModal::pqPrime
protected

Definition at line 94 of file aeromodal.h.

Referenced by AerodynamicModal(), AssRes(), AssVec(), InitialAssRes(), and ~AerodynamicModal().

MyVectorHandler* AerodynamicModal::pqSec
protected

Definition at line 95 of file aeromodal.h.

Referenced by AerodynamicModal(), AssRes(), AssVec(), InitialAssRes(), and ~AerodynamicModal().

MyVectorHandler* AerodynamicModal::pxa
protected

Definition at line 97 of file aeromodal.h.

Referenced by AerodynamicModal(), AssRes(), AssVec(), InitialAssRes(), Output(), and ~AerodynamicModal().

MyVectorHandler* AerodynamicModal::pxaPrime
protected

Definition at line 98 of file aeromodal.h.

Referenced by AerodynamicModal(), AssRes(), AssVec(), InitialAssRes(), Output(), and ~AerodynamicModal().

Mat3x3 AerodynamicModal::R0
protected

Definition at line 78 of file aeromodal.h.

Referenced by AerodynamicModal(), AssRes(), and InitialAssRes().

const Mat3x3 AerodynamicModal::Ra
protected

Definition at line 79 of file aeromodal.h.

Referenced by AerodynamicModal(), AssJac(), AssRes(), AssVec(), and InitialAssRes().

RigidF_t AerodynamicModal::RigidF
protected

Definition at line 113 of file aeromodal.h.

Referenced by AerodynamicModal(), AssJac(), AssRes(), AssVec(), and InitialAssRes().


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