MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
HydraulicDamperCLR Struct Reference
Inheritance diagram for HydraulicDamperCLR:
Collaboration diagram for HydraulicDamperCLR:

Public Member Functions

virtual ConstitutiveLaw
< doublereal, doublereal > * 
Read (const DataManager *pDM, MBDynParser &HP, ConstLawType::Type &CLType)
 
- Public Member Functions inherited from ConstitutiveLawRead< doublereal, doublereal >
virtual ~ConstitutiveLawRead (void)
 

Detailed Description

Definition at line 90 of file module-damper-hydraulic.cc.

Member Function Documentation

virtual ConstitutiveLaw<doublereal, doublereal>* HydraulicDamperCLR::Read ( const DataManager pDM,
MBDynParser HP,
ConstLawType::Type CLType 
)
inlinevirtual

Implements ConstitutiveLawRead< doublereal, doublereal >.

Definition at line 92 of file module-damper-hydraulic.cc.

References IncludeParser::GetLineData(), HighParser::GetReal(), HighParser::IsArg(), HighParser::IsKeyWord(), MBDYN_EXCEPT_ARGS, SAFENEWWITHCONSTRUCTOR, and ConstLawType::VISCOUS.

92  {
94 
95  if (HP.IsKeyWord("help")) {
96  silent_cerr("HydraulicDamperCL:\n"
97  " hydraulic damper , <sigma> , <dotz_L> , <d>\n"
98  "# according to the formula\n"
99  "# f = sigma*|dotz|*dotz for |dotz| <= dotz_L\n"
100  "# f = sign(dotz)*(d*(|dotz| - dotz_L) + sigma*dotz_L^2) for |dotz| > dotz_L\n"
101  << std::endl);
102 
103  if (!HP.IsArg()) {
104  throw NoErr(MBDYN_EXCEPT_ARGS);
105  }
106  }
107 
108  CLType = ConstLawType::VISCOUS;
109 
110  doublereal sigma = HP.GetReal();
111  if (sigma <= 0.) {
112  silent_cerr("warning, null or negative parabolic slope "
113  "at line " << HP.GetLineData() << std::endl);
114  }
115 
116  doublereal dotz_L = HP.GetReal();
117  if (dotz_L <= 0.) {
118  silent_cerr("warning, null or negative limit velocity "
119  "at line " << HP.GetLineData() << std::endl);
120  }
121 
122  doublereal d = HP.GetReal();
123  if (d < 0.) {
124  silent_cerr("warning, negative slope "
125  "at line " << HP.GetLineData() << std::endl);
126  }
127 
128  typedef HydraulicDamperCL L;
129  SAFENEWWITHCONSTRUCTOR(pCL, L, L(sigma, dotz_L, d));
130 
131  return pCL;
132  };
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
virtual bool IsKeyWord(const char *sKeyWord)
Definition: parser.cc:910
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
Definition: except.h:79
virtual bool IsArg(void)
Definition: parser.cc:807
double doublereal
Definition: colamd.c:52
virtual HighParser::ErrOut GetLineData(void) const
Definition: parsinc.cc:697
virtual doublereal GetReal(const doublereal &dDefval=0.0)
Definition: parser.cc:1056

Here is the call graph for this function:


The documentation for this struct was generated from the following file: