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

#include <hutils.h>

Inheritance diagram for Tank:
Collaboration diagram for Tank:

Public Member Functions

 Tank (unsigned int uL, const DofOwner *pD, HydraulicFluid *hf, const PressureNode *p1, const PressureNode *p2, doublereal press, doublereal A_pipe, doublereal A_serb, doublereal lev, doublereal s_mx, doublereal s_mn, doublereal c_s, flag fOut)
 
 ~Tank (void)
 
virtual HydraulicElem::Type GetHydraulicType (void) const
 
virtual std::ostream & Restart (std::ostream &out) const
 
virtual unsigned int iGetNumDof (void) const
 
virtual DofOrder::Order GetDofType (unsigned int i) const
 
virtual void WorkSpaceDim (integer *piNumRows, integer *piNumCols) const
 
VariableSubMatrixHandlerAssJac (VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
SubVectorHandlerAssRes (SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void Output (OutputHandler &OH) const
 
virtual void SetValue (DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
 
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 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 HydraulicElem
 HydraulicElem (unsigned int uL, const DofOwner *pDO, HydraulicFluid *hf, flag fOut)
 
virtual ~HydraulicElem (void)
 
virtual Elem::Type GetElemType (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)
 

Private Attributes

const PressureNodepNode1
 
const PressureNodepNode2
 
doublereal press
 
doublereal area_pipe
 
doublereal area_serb
 
doublereal level
 
doublereal s_max
 
doublereal s_min
 
doublereal Kappa1
 
doublereal Kappa2
 
doublereal c_spost
 
doublereal s
 
doublereal sp
 
doublereal flow1
 
doublereal flow2
 

Additional Inherited Members

- 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 HydraulicElem
enum  Type {
  UNKNOWN = -1, MINOR_LOSS = 0, THREEWAYMINORLOSS, CONTROL_VALVE,
  DYNAMIC_CONTROL_VALVE, PRESSURE_FLOW_CONTROL_VALVE, PRESSURE_VALVE, FLOW_VALVE,
  ORIFICE, ACCUMULATOR, TANK, PIPE,
  DYNAMIC_PIPE, HYDRAULIC_ACTUATOR, ACTUATOR, LASTHYDRAULICTYPE
}
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from ToBeOutput
flag fOutput
 
- Protected Attributes inherited from HydraulicElem
HydraulicFluidHF
 

Detailed Description

Definition at line 139 of file hutils.h.

Constructor & Destructor Documentation

Tank::Tank ( unsigned int  uL,
const DofOwner pD,
HydraulicFluid hf,
const PressureNode p1,
const PressureNode p2,
doublereal  press,
doublereal  A_pipe,
doublereal  A_serb,
doublereal  lev,
doublereal  s_mx,
doublereal  s_mn,
doublereal  c_s,
flag  fOut 
)

Definition at line 393 of file hutils.cc.

References ASSERT, PressureNode::GetNodeType(), Node::HYDRAULIC, Kappa1, Kappa2, pNode1, and pNode2.

398 : Elem(uL, fOut),
399 HydraulicElem(uL, pDO, hf, fOut),
400 pNode1(p1), pNode2(p2),
401 press(Ps), area_pipe(A_pipe), area_serb(A_serb),level(lev),
402 s_max(s_mx), s_min(s_mn), c_spost(c_s)
403 {
404  ASSERT(pNode1 != NULL);
406  ASSERT(pNode2 != NULL);
408  ASSERT(Ps > std::numeric_limits<doublereal>::epsilon());
409  ASSERT(A_pipe > std::numeric_limits<doublereal>::epsilon());
410  ASSERT(A_serb > std::numeric_limits<doublereal>::epsilon());
411  ASSERT(lev >= 0.);
412  ASSERT(s_mx >= 0.);
413  ASSERT(s_mn >= 0.);
414 
415  Kappa1 = 1.;
416  Kappa2 = .5;
417 }
doublereal area_serb
Definition: hutils.h:145
doublereal press
Definition: hutils.h:143
const PressureNode * pNode2
Definition: hutils.h:142
doublereal level
Definition: hutils.h:146
doublereal Kappa2
Definition: hutils.h:150
HydraulicElem(unsigned int uL, const DofOwner *pDO, HydraulicFluid *hf, flag fOut)
Definition: preselem.cc:54
#define ASSERT(expression)
Definition: colamd.c:977
doublereal c_spost
Definition: hutils.h:151
const PressureNode * pNode1
Definition: hutils.h:141
doublereal s_max
Definition: hutils.h:147
virtual Node::Type GetNodeType(void) const
Definition: presnode.h:54
doublereal s_min
Definition: hutils.h:148
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41
doublereal Kappa1
Definition: hutils.h:149
doublereal area_pipe
Definition: hutils.h:144

Here is the call graph for this function:

Tank::~Tank ( void  )

Definition at line 420 of file hutils.cc.

References NO_OP.

421 {
422  NO_OP;
423 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

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

Implements Elem.

Definition at line 466 of file hutils.cc.

References area_pipe, area_serb, c_spost, DEBUGCOUT, HydraulicFluid::dGetDensity(), ScalarAlgebraicNode::dGetX(), grad::fabs(), flow1, flow2, HydraulicElem::HF, Node::iGetFirstColIndex(), DofOwnerOwner::iGetFirstIndex(), Node::iGetFirstRowIndex(), Kappa1, Kappa2, pNode1, pNode2, press, FullSubMatrixHandler::PutCoef(), FullSubMatrixHandler::PutColIndex(), FullSubMatrixHandler::PutRowIndex(), FullSubMatrixHandler::Resize(), s, s_max, s_min, VariableSubMatrixHandler::SetFull(), and grad::sqrt().

470 {
471  DEBUGCOUT("Entering Tank::AssJac()" << std::endl);
472 
473  FullSubMatrixHandler& WM = WorkMat.SetFull();
474  WM.Resize(3, 3);
475 
476  integer iNode1RowIndex = pNode1->iGetFirstRowIndex()+1;
477  integer iNode2RowIndex = pNode2->iGetFirstRowIndex()+1;
478  integer iNode1ColIndex = pNode1->iGetFirstColIndex()+1;
479  integer iNode2ColIndex = pNode2->iGetFirstColIndex()+1;
480  integer iFirstIndex = iGetFirstIndex();
481 
482  WM.PutRowIndex(1, iNode1RowIndex);
483  WM.PutRowIndex(2, iNode2RowIndex);
484  WM.PutColIndex(1, iNode1ColIndex);
485  WM.PutColIndex(2, iNode2ColIndex);
486 
487  WM.PutRowIndex(3, iFirstIndex+1);
488  WM.PutColIndex(3, iFirstIndex+1);
489 
490  doublereal p1 = pNode1->dGetX();
491  doublereal p2 = pNode2->dGetX();
492  /* p1 = XCurr(pNode1->iGetFirstRowIndex()+1); */
493 
494  s = XCurr(iFirstIndex+1); /* livello */
495 
496  /* salto di pressione nodo1-Tank */
497  doublereal jumpPres1S = fabs(p1-press);
498  /* evito di dividere per un numero troppo piccolo */
499  if (jumpPres1S < 1.e8*std::numeric_limits<doublereal>::epsilon()) {
500  jumpPres1S = 1.e8*std::numeric_limits<doublereal>::epsilon();
501  }
502 
503  /* salto di pressione Tank-nodo2 */
504  doublereal jumpPresS2 = fabs(press-p2);
505  /* evito di dividere per un numero troppo piccolo */
506  if (jumpPresS2 < 1.e8*std::numeric_limits<doublereal>::epsilon()) {
507  jumpPresS2 = 1.e8*std::numeric_limits<doublereal>::epsilon();
508  }
509  doublereal density = HF->dGetDensity((p1+p2)/2.);
510 
511  doublereal Jac11 = -.5*density*area_pipe*sqrt(2./(Kappa1*density*jumpPres1S));
512  doublereal Jac12 = 0.;
513  doublereal Jac13 = 0.;
514 
515  doublereal Jac21 = 0.;
516  doublereal Jac22 = -.5*density*area_pipe*sqrt(2./(Kappa2*density*jumpPresS2));
517  doublereal Jac23 = 0.;
518 
519  doublereal Jac31 = .5*area_pipe/area_serb*sqrt(2./(Kappa1*density*jumpPres1S));
520  doublereal Jac32 = .5*area_pipe/area_serb*sqrt(2./(Kappa2*density*jumpPresS2));
521  doublereal Jac33 = -1.-c_spost*dCoef;
522 
523  if(s < s_min) {
524  /* Livello dell'olio sotto la soglia minima:
525  * esco dalla presa di emergenza */
526 #ifdef HYDR_DEVEL
527  DEBUGCOUT("Jac Esco dalla presa di emergenza: " << std::endl);
528 #endif
529  }
530  if (s > s_max && -flow1 > flow2) {
531  /* se e' pieno non puo' entrare di piu' di quella che esce */
532  Jac31 = Jac32 = 0.;
533 #ifdef HYDR_DEVEL
534  DEBUGCOUT("Jac Serbatoio pieno : " << std::endl);
535 #endif
536  }
537 
538  if (s < 0. && flow2 > -flow1) {
539  /* se e' vuoto non puo' uscire di piu' di quella che entra */
540  Jac31 = Jac32 = 0.;
541 #ifdef HYDR_DEVEL
542  DEBUGCOUT("Jac Serbatoio vuoto : "<< std::endl);
543 #endif
544  }
545 
546  WM.PutCoef(1, 1, Jac11);
547  WM.PutCoef(1, 2, Jac12);
548  WM.PutCoef(1, 3, Jac13);
549  WM.PutCoef(2, 1, Jac21);
550  WM.PutCoef(2, 2, Jac22);
551  WM.PutCoef(2, 3, Jac23);
552  WM.PutCoef(3, 1, Jac31);
553  WM.PutCoef(3, 2, Jac32);
554  WM.PutCoef(3, 3, Jac33);
555 
556  return WorkMat;
557 }
doublereal flow2
Definition: hutils.h:155
doublereal area_serb
Definition: hutils.h:145
doublereal press
Definition: hutils.h:143
const PressureNode * pNode2
Definition: hutils.h:142
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
doublereal s
Definition: hutils.h:152
void Resize(integer iNewRow, integer iNewCol)
Definition: submat.cc:138
void PutCoef(integer iRow, integer iCol, const doublereal &dCoef)
Definition: submat.h:672
doublereal Kappa2
Definition: hutils.h:150
doublereal flow1
Definition: hutils.h:154
GradientExpression< UnaryExpr< FuncFabs, Expr > > fabs(const GradientExpression< Expr > &u)
Definition: gradient.h:2973
virtual doublereal dGetDensity(void) const =0
virtual const doublereal & dGetX(void) const
Definition: node.h:492
HydraulicFluid * HF
Definition: preselem.h:79
#define DEBUGCOUT(msg)
Definition: myassert.h:232
virtual integer iGetFirstRowIndex(void) const
Definition: node.cc:82
doublereal c_spost
Definition: hutils.h:151
GradientExpression< UnaryExpr< FuncSqrt, Expr > > sqrt(const GradientExpression< Expr > &u)
Definition: gradient.h:2974
const PressureNode * pNode1
Definition: hutils.h:141
void PutRowIndex(integer iSubRow, integer iRow)
Definition: submat.h:311
doublereal s_max
Definition: hutils.h:147
doublereal s_min
Definition: hutils.h:148
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51
doublereal Kappa1
Definition: hutils.h:149
doublereal area_pipe
Definition: hutils.h:144
virtual integer iGetFirstColIndex(void) const
Definition: node.cc:88

Here is the call graph for this function:

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

Implements Elem.

Definition at line 561 of file hutils.cc.

References area_pipe, area_serb, c_spost, copysign(), DEBUGCOUT, HydraulicFluid::dGetDensity(), ScalarAlgebraicNode::dGetX(), grad::fabs(), flow1, flow2, WithLabel::GetLabel(), HydraulicElem::HF, DofOwnerOwner::iGetFirstIndex(), Node::iGetFirstRowIndex(), Kappa1, Kappa2, level, MBDYN_EXCEPT_ARGS, pNode1, pNode2, press, SubVectorHandler::PutItem(), VectorHandler::Resize(), s, s_max, s_min, sp, and grad::sqrt().

565 {
566  DEBUGCOUT("Entering Tank::AssRes()" << std::endl);
567 
568  WorkVec.Resize(3);
569 
570  integer iNode1RowIndex = pNode1->iGetFirstRowIndex()+1;
571  integer iNode2RowIndex = pNode2->iGetFirstRowIndex()+1;
572 
573  doublereal p1 = pNode1->dGetX();
574  doublereal p2 = pNode2->dGetX();
575 
576  integer iFirstIndex = iGetFirstIndex();
577 
578  s = XCurr(iFirstIndex+1); /* livello */
579  sp = XPrimeCurr(iFirstIndex+1); /* velocita' del livello */
580 
581  if (s < 0.) {
582  silent_cerr("Tank(" << GetLabel() << ": negative fluid level "
583  << s << " impossible" << std::endl);
585  }
586 
587  doublereal jumpPres1S = fabs(p1-press);
588  doublereal jumpPresS2 = fabs(press-p2);
589  doublereal Res_1 = 0.;
590  doublereal Res_2 = 0.;
591  doublereal Res_3 = 0.;
592  /* unused? doublereal Res_4 = 0.; */
593  c_spost = 0.;
594 
595  doublereal density = HF->dGetDensity((p1+p2/2.));
596 
597  Res_1 = density*area_pipe*sqrt(2./(Kappa1*density))*copysign(sqrt(jumpPres1S), p1-press);
598  Res_2 = -density*area_pipe*sqrt(2./(Kappa2*density))*copysign(sqrt(jumpPresS2), press-p2);
599 
600  if (s > s_max && Res_1 > -Res_2) {
601  /* se e' pieno non puo' entrare di piu' di quella che esce */
602  Res_1 = -Res_2;
603  c_spost = 1.;
604 #ifdef HYDR_DEVEL
605  DEBUGCOUT("Res Serbatoio pieno: " << std::endl);
606 #endif
607  }
608 
609  if (s <s_min) {
610  /* livello dell'olio sotto al livello minimo:
611  * esco dalla presa di emergenza */
612 #ifdef HYDR_DEVEL
613  DEBUGCOUT("Esco dalla presa di emergenza: " << std::endl);
614 #endif
615  }
616 
617 
618  if (s < 0. && Res_2 < -Res_1) {
619  c_spost = 0.;
620  /* se e' vuoto non puo' uscire di piu' di quella che entra */
621  Res_2 = -Res_1;
622 #ifdef HYDR_DEVEL
623  DEBUGCOUT("Res Serbatoio vuoto: " << std::endl);
624 #endif
625  }
626 
627  Res_3 = sp+(-Res_1-Res_2)/(area_serb*density)+c_spost*(s-s_max);
628 
629  flow1 = -Res_1; /* per l'output */
630  flow2 = -Res_2; /* per l'output */
631 
632 #ifdef HYDR_DEVEL
633  DEBUGCOUT("Kappa1: " << Kappa1 << std::endl);
634  DEBUGCOUT("Kappa2: " << Kappa2 << std::endl);
635  DEBUGCOUT("jumpPres1S: " << jumpPres1S << std::endl);
636  DEBUGCOUT("jumpPresS2: " << jumpPresS2 << std::endl);
637  DEBUGCOUT("density: " << density << std::endl);
638  DEBUGCOUT("p1: " << p1 << std::endl);
639  DEBUGCOUT("p2: " << p2 << std::endl);
640  DEBUGCOUT("press: " << press << std::endl);
641  DEBUGCOUT("s: " << s << std::endl);
642  DEBUGCOUT("level: " << level << std::endl);
643  DEBUGCOUT("s_max: " << s_max << std::endl);
644  DEBUGCOUT("s_min: " << s_min << std::endl);
645  DEBUGCOUT("sp: " << sp << std::endl);
646  DEBUGCOUT("area_pipe: " << area_pipe << std::endl);
647  DEBUGCOUT("area_serb: " << area_serb << std::endl);
648  DEBUGCOUT("PORTATE AI VARI NODI (positive se entranti)" << std::endl);
649  DEBUGCOUT("-Res_1: " << -Res_1 << " (portata nodo1) " << std::endl);
650  DEBUGCOUT("-Res_2: " << -Res_2 << " (portata nodo2) " << std::endl);
651  DEBUGCOUT("Res_3: " << Res_3 << std::endl);
652 #endif
653 
654  WorkVec.PutItem(1, iNode1RowIndex, Res_1);
655  WorkVec.PutItem(2, iNode2RowIndex, Res_2);
656  WorkVec.PutItem(3, iFirstIndex+1, Res_3);
657 
658  return WorkVec;
659 }
doublereal flow2
Definition: hutils.h:155
doublereal area_serb
Definition: hutils.h:145
doublereal press
Definition: hutils.h:143
const PressureNode * pNode2
Definition: hutils.h:142
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
doublereal s
Definition: hutils.h:152
doublereal level
Definition: hutils.h:146
doublereal Kappa2
Definition: hutils.h:150
doublereal flow1
Definition: hutils.h:154
GradientExpression< UnaryExpr< FuncFabs, Expr > > fabs(const GradientExpression< Expr > &u)
Definition: gradient.h:2973
virtual void PutItem(integer iSubRow, integer iRow, const doublereal &dCoef)
Definition: submat.h:1445
virtual doublereal dGetDensity(void) const =0
virtual const doublereal & dGetX(void) const
Definition: node.h:492
HydraulicFluid * HF
Definition: preselem.h:79
doublereal copysign(doublereal x, doublereal y)
Definition: gradient.h:97
doublereal sp
Definition: hutils.h:153
#define DEBUGCOUT(msg)
Definition: myassert.h:232
virtual integer iGetFirstRowIndex(void) const
Definition: node.cc:82
doublereal c_spost
Definition: hutils.h:151
GradientExpression< UnaryExpr< FuncSqrt, Expr > > sqrt(const GradientExpression< Expr > &u)
Definition: gradient.h:2974
const PressureNode * pNode1
Definition: hutils.h:141
doublereal s_max
Definition: hutils.h:147
doublereal s_min
Definition: hutils.h:148
virtual integer iGetFirstIndex(void) const
Definition: dofown.h:127
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51
doublereal Kappa1
Definition: hutils.h:149
unsigned int GetLabel(void) const
Definition: withlab.cc:62
virtual void Resize(integer iNewSize)=0
doublereal area_pipe
Definition: hutils.h:144

Here is the call graph for this function:

virtual void Tank::GetConnectedNodes ( std::vector< const Node * > &  connectedNodes) const
inlinevirtual

Reimplemented from Elem.

Definition at line 197 of file hutils.h.

References pNode1, and pNode2.

197  {
198  connectedNodes.resize(2);
199  connectedNodes[0] = pNode1;
200  connectedNodes[1] = pNode2;
201  };
const PressureNode * pNode2
Definition: hutils.h:142
const PressureNode * pNode1
Definition: hutils.h:141
DofOrder::Order Tank::GetDofType ( unsigned int  i) const
virtual

Reimplemented from Elem.

Definition at line 450 of file hutils.cc.

References ASSERT, and DofOrder::DIFFERENTIAL.

451 {
452 
453  ASSERT(i >= 0 && i <= 1);
454  return DofOrder::DIFFERENTIAL;
455 }
#define ASSERT(expression)
Definition: colamd.c:977
HydraulicElem::Type Tank::GetHydraulicType ( void  ) const
virtual

Implements HydraulicElem.

Definition at line 428 of file hutils.cc.

References HydraulicElem::TANK.

429 {
430  return HydraulicElem::TANK;
431 }
unsigned int Tank::iGetNumDof ( void  ) const
virtual

Reimplemented from Elem.

Definition at line 443 of file hutils.cc.

444 {
445  return 1;
446 }
void Tank::Output ( OutputHandler OH) const
virtual

Reimplemented from ToBeOutput.

Definition at line 662 of file hutils.cc.

References ToBeOutput::bToBeOutput(), flow1, flow2, WithLabel::GetLabel(), OutputHandler::Hydraulic(), s, and sp.

663 {
664  if (bToBeOutput()) {
665  std::ostream& out = OH.Hydraulic();
666  out << std::setw(8) << GetLabel();
667  out << " " << s << " " << sp << " " << flow1 << " " << flow2 << std::endl;
668  }
669 }
doublereal flow2
Definition: hutils.h:155
virtual bool bToBeOutput(void) const
Definition: output.cc:890
doublereal s
Definition: hutils.h:152
doublereal flow1
Definition: hutils.h:154
doublereal sp
Definition: hutils.h:153
std::ostream & Hydraulic(void) const
Definition: output.h:492
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

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

Implements Elem.

Definition at line 436 of file hutils.cc.

437 {
438  return out << "Tank not implemented yet!" << std::endl;
439 }
void Tank::SetValue ( DataManager pDM,
VectorHandler X,
VectorHandler XP,
SimulationEntity::Hints ph = 0 
)
virtual

Reimplemented from SimulationEntity.

Definition at line 672 of file hutils.cc.

References DofOwnerOwner::iGetFirstIndex(), level, and VectorHandler::PutCoef().

675 {
676  integer i = iGetFirstIndex();
677  X.PutCoef(i+1, level);
678 }
doublereal level
Definition: hutils.h:146
virtual void PutCoef(integer iRow, const doublereal &dCoef)=0
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 Tank::WorkSpaceDim ( integer piNumRows,
integer piNumCols 
) const
virtual

Implements Elem.

Definition at line 459 of file hutils.cc.

459  {
460  *piNumRows = 3;
461  *piNumCols = 3;
462 }

Member Data Documentation

doublereal Tank::area_pipe
private

Definition at line 144 of file hutils.h.

Referenced by AssJac(), and AssRes().

doublereal Tank::area_serb
private

Definition at line 145 of file hutils.h.

Referenced by AssJac(), and AssRes().

doublereal Tank::c_spost
private

Definition at line 151 of file hutils.h.

Referenced by AssJac(), and AssRes().

doublereal Tank::flow1
private

Definition at line 154 of file hutils.h.

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

doublereal Tank::flow2
private

Definition at line 155 of file hutils.h.

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

doublereal Tank::Kappa1
private

Definition at line 149 of file hutils.h.

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

doublereal Tank::Kappa2
private

Definition at line 150 of file hutils.h.

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

doublereal Tank::level
private

Definition at line 146 of file hutils.h.

Referenced by AssRes(), and SetValue().

const PressureNode* Tank::pNode1
private

Definition at line 141 of file hutils.h.

Referenced by AssJac(), AssRes(), GetConnectedNodes(), and Tank().

const PressureNode* Tank::pNode2
private

Definition at line 142 of file hutils.h.

Referenced by AssJac(), AssRes(), GetConnectedNodes(), and Tank().

doublereal Tank::press
private

Definition at line 143 of file hutils.h.

Referenced by AssJac(), and AssRes().

doublereal Tank::s
private

Definition at line 152 of file hutils.h.

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

doublereal Tank::s_max
private

Definition at line 147 of file hutils.h.

Referenced by AssJac(), and AssRes().

doublereal Tank::s_min
private

Definition at line 148 of file hutils.h.

Referenced by AssJac(), and AssRes().

doublereal Tank::sp
private

Definition at line 153 of file hutils.h.

Referenced by AssRes(), and Output().


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