51 :
WithLabel(Label), dPres0(dPres0), dTemp0(dTemp0)
57 :
WithLabel(HF.GetLabel()), dPres0(HF.dPres0), dTemp0(HF.dTemp0)
88 const char* sKeyWords[] = {
91 "linear" "compressible",
92 "linear" "thermal" "compressible",
105 LINEARTHERMALCOMPRESSIBLE,
118 CurrKeyWord = INCOMPRESSIBLE;
123 switch (CurrKeyWord) {
125 case INCOMPRESSIBLE: {
131 if (dDensity < std::numeric_limits<doublereal>::epsilon()) {
133 <<
": illegal density " << dDensity
134 <<
" for hydraulic fluid " << uLabel << std::endl);
143 if (dViscosity < std::numeric_limits<doublereal>::epsilon()) {
145 <<
": illegal viscosity " << dViscosity
155 <<
": illegal reference pressure " << dPres0
156 <<
" for hydraulic fluid " << uLabel << std::endl);
165 <<
": illegal reference temperature " << dTemp0
166 <<
" for hydraulic fluid " << uLabel << std::endl);
179 case LINEARCOMPRESSIBLE:
190 if (sound < std::numeric_limits<doublereal>::epsilon()) {
192 <<
": illegal sound celerity " << sound
197 dBeta = sound*sound*dDensity;
200 if (std::abs(dBeta) < std::numeric_limits<doublereal>::epsilon()) {
202 <<
": illegal bulk modulus " << dBeta
208 if (dDensity < std::numeric_limits<doublereal>::epsilon()) {
210 <<
": illegal density " << dDensity
211 <<
" for hydraulic fluid " << uLabel << std::endl);
217 <<
": illegal reference pressure " << dPres0
218 <<
" for hydraulic fluid " << uLabel << std::endl);
227 if (dViscosity < std::numeric_limits<doublereal>::epsilon()) {
229 <<
": illegal viscosity " << dViscosity
239 <<
": illegal reference temperature " << dTemp0
240 <<
" for hydraulic fluid " << uLabel << std::endl);
244 switch (CurrKeyWord) {
248 case LINEARCOMPRESSIBLE:
287 case LINEARTHERMALCOMPRESSIBLE: {
298 if (sound < std::numeric_limits<doublereal>::epsilon()) {
300 <<
": illegal sound celerity " << sound
301 <<
" for hydraulic fluid " << uLabel << std::endl);
305 dBeta = sound*sound*dDensity;
309 if (std::abs(dBeta) < std::numeric_limits<doublereal>::epsilon()) {
311 <<
": illegal bulk modulus " << dBeta
312 <<
" for hydraulic fluid " << uLabel << std::endl);
317 if (dDensity < std::numeric_limits<doublereal>::epsilon()) {
319 <<
": illegal density " << dDensity
320 <<
" for hydraulic fluid " << uLabel << std::endl);
326 <<
": illegal reference pressure " << dPres0
327 <<
" for hydraulic fluid " << uLabel << std::endl);
335 <<
": illegal reference temperature " << dTemp0
336 <<
" for hydraulic fluid " << uLabel << std::endl);
345 if (dViscosity < std::numeric_limits<doublereal>::epsilon()) {
347 <<
": illegal viscosity " << dViscosity
365 <<
": unknown hydraulic fluid type" << std::endl);
#define MBDYN_EXCEPT_ARGS
HydraulicFluid(unsigned int Label, const doublereal dPres0=-1., const doublereal dTemp0=-1.)
virtual doublereal dGetTemp0(void) const
virtual bool IsKeyWord(const char *sKeyWord)
virtual ~HydraulicFluid()
#define ASSERT(expression)
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
virtual doublereal dGetPres0(void) const
virtual HighParser::ErrOut GetLineData(void) const
HydraulicFluid * ReadHydraulicFluid(MBDynParser &HP, unsigned int uLabel)
virtual doublereal GetReal(const doublereal &dDefval=0.0)