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

#include <valve.h>

Inheritance diagram for Control_valve:
Collaboration diagram for Control_valve:

Public Member Functions

 Control_valve (unsigned int uL, const DofOwner *pD, HydraulicFluid *hf, const PressureNode *p1, const PressureNode *p2, const PressureNode *p3, const PressureNode *p4, doublereal A_max, doublereal Loss_a, const DriveCaller *pDC, flag fOut)
 
 ~Control_valve (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 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 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)
 
- Public Member Functions inherited from DriveOwner
 DriveOwner (const DriveCaller *pDC=0)
 
 DriveOwner (const DriveOwner &drive)
 
virtual ~DriveOwner (void)
 
void Set (const DriveCaller *pDC)
 
DriveCallerpGetDriveCaller (void) const
 
doublereal dGet (const doublereal &dVar) const
 
doublereal dGet (void) const
 
bool bIsDifferentiable (void) const
 
doublereal dGetP (const doublereal &dVar) const
 
doublereal dGetP (void) const
 

Private Attributes

const PressureNodepNode1
 
const PressureNodepNode2
 
const PressureNodepNode3
 
const PressureNodepNode4
 
doublereal Stato
 
doublereal Cd
 
doublereal area_max
 
doublereal loss_area
 
doublereal s_max
 
doublereal flow1
 
doublereal flow2
 
doublereal flow3
 
doublereal flow4
 
doublereal A1
 
doublereal A2
 
doublereal A3
 
doublereal A4
 
doublereal A1min
 
doublereal A2min
 
doublereal A3min
 
doublereal A4min
 

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
 
- Protected Attributes inherited from DriveOwner
DriveCallerpDriveCaller
 

Detailed Description

Definition at line 44 of file valve.h.

Constructor & Destructor Documentation

Control_valve::Control_valve ( unsigned int  uL,
const DofOwner pD,
HydraulicFluid hf,
const PressureNode p1,
const PressureNode p2,
const PressureNode p3,
const PressureNode p4,
doublereal  A_max,
doublereal  Loss_a,
const DriveCaller pDC,
flag  fOut 
)

Definition at line 46 of file valve.cc.

References ASSERT, Cd, PressureNode::GetNodeType(), Node::HYDRAULIC, loss_area, M_PI, pNode1, pNode2, pNode3, and pNode4.

52 : Elem(uL, fOut),
53 HydraulicElem(uL, pDO, hf, fOut),
54 DriveOwner(pDC),
55 pNode1(p1), pNode2(p2), pNode3(p3), pNode4(p4),
56 area_max(A_max), loss_area(Loss_A),
61 {
62  ASSERT(pNode1 != NULL);
64  ASSERT(pNode2 != NULL);
66  ASSERT(pNode3 != NULL);
68  ASSERT(pNode4 != NULL);
70  ASSERT(A_max > std::numeric_limits<doublereal>::epsilon());
71  ASSERT(loss_area >= 0.);
72 
73  /*
74  * Cd = pi / ( pi + 2 ) ~= .611
75  *
76  * cfr. Merritt, Hydraulic Control Systems, Par. 3.4, pp. 39-45
77  * John Wiley & Sons, New York, 1967
78  */
79  Cd = M_PI / ( M_PI + 2. );
80 }
#define M_PI
Definition: gradienttest.cc:67
doublereal A4min
Definition: valve.h:66
const PressureNode * pNode2
Definition: valve.h:47
doublereal A2min
Definition: valve.h:64
const PressureNode * pNode4
Definition: valve.h:49
const PressureNode * pNode3
Definition: valve.h:48
doublereal Cd
Definition: valve.h:51
doublereal area_max
Definition: valve.h:52
HydraulicElem(unsigned int uL, const DofOwner *pDO, HydraulicFluid *hf, flag fOut)
Definition: preselem.cc:54
const PressureNode * pNode1
Definition: valve.h:46
#define ASSERT(expression)
Definition: colamd.c:977
doublereal A3min
Definition: valve.h:65
virtual Node::Type GetNodeType(void) const
Definition: presnode.h:54
doublereal loss_area
Definition: valve.h:53
doublereal A1min
Definition: valve.h:63
Elem(unsigned int uL, flag fOut)
Definition: elem.cc:41
DriveOwner(const DriveCaller *pDC=0)
Definition: drive.cc:627

Here is the call graph for this function:

Control_valve::~Control_valve ( void  )

Definition at line 82 of file valve.cc.

References NO_OP.

83 {
84  NO_OP;
85 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

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

Implements Elem.

Definition at line 120 of file valve.cc.

References A1, A2, A3, A4, Cd, DEBUGCOUT, HydraulicFluid::dGetDensity(), ScalarAlgebraicNode::dGetX(), grad::fabs(), HydraulicElem::HF, Node::iGetFirstColIndex(), Node::iGetFirstRowIndex(), pNode1, pNode2, pNode3, pNode4, FullSubMatrixHandler::PutCoef(), FullSubMatrixHandler::PutColIndex(), FullSubMatrixHandler::PutRowIndex(), FullSubMatrixHandler::Resize(), VariableSubMatrixHandler::SetFull(), and grad::sqrt().

124 {
125  DEBUGCOUT("Entering Control_valve::AssJac()" << std::endl);
126 
127  FullSubMatrixHandler& WM = WorkMat.SetFull();
128  WM.Resize(4, 4);
129 
130  integer iNode1RowIndex = pNode1->iGetFirstRowIndex()+1;
131  integer iNode2RowIndex = pNode2->iGetFirstRowIndex()+1;
132  integer iNode3RowIndex = pNode3->iGetFirstRowIndex()+1;
133  integer iNode4RowIndex = pNode4->iGetFirstRowIndex()+1;
134  integer iNode1ColIndex = pNode1->iGetFirstColIndex()+1;
135  integer iNode2ColIndex = pNode2->iGetFirstColIndex()+1;
136  integer iNode3ColIndex = pNode3->iGetFirstColIndex()+1;
137  integer iNode4ColIndex = pNode4->iGetFirstColIndex()+1;
138 
139  WM.PutRowIndex(1, iNode1RowIndex);
140  WM.PutRowIndex(2, iNode2RowIndex);
141  WM.PutRowIndex(3, iNode3RowIndex);
142  WM.PutRowIndex(4, iNode4RowIndex);
143  WM.PutColIndex(1, iNode1ColIndex);
144  WM.PutColIndex(2, iNode2ColIndex);
145  WM.PutColIndex(3, iNode3ColIndex);
146  WM.PutColIndex(4, iNode4ColIndex);
147 
148  doublereal p1 = pNode1->dGetX();
149  doublereal p2 = pNode2->dGetX();
150  doublereal p3 = pNode3->dGetX();
151  doublereal p4 = pNode4->dGetX();
152  doublereal density = HF->dGetDensity();
153 
154  doublereal jumpPres12 = fabs(p1-p2); /* salto di pressione nodo1 & nodo3 */
155  doublereal jumpPres13 = fabs(p1-p3); /* salto di pressione nodo1 & nodo4 */
156  doublereal jumpPres24 = fabs(p2-p4); /* salto di pressione nodo2 & nodo3 */
157  doublereal jumpPres34 = fabs(p3-p4); /* salto di pressione nodo2 & nodo4 */
158 
159  if (jumpPres12 < 1.e8*std::numeric_limits<doublereal>::epsilon()) {
160  jumpPres12 = 1.e8*std::numeric_limits<doublereal>::epsilon();
161  }
162  if (jumpPres13 < 1.e8*std::numeric_limits<doublereal>::epsilon()) {
163  jumpPres13 = 1.e8*std::numeric_limits<doublereal>::epsilon();
164  }
165  if (jumpPres24 < 1.e8*std::numeric_limits<doublereal>::epsilon()) {
166  jumpPres24 = 1.e8*std::numeric_limits<doublereal>::epsilon();
167  }
168  if (jumpPres34 < 1.e8*std::numeric_limits<doublereal>::epsilon()) {
169  jumpPres34 = 1.e8*std::numeric_limits<doublereal>::epsilon();
170  }
171 
172  doublereal primo = Cd*A1/sqrt(2*jumpPres12/density);
173  doublereal secondo = Cd*A2/sqrt(2*jumpPres13/density);
174  doublereal terzo = Cd*A4/sqrt(2*jumpPres24/density);
175  doublereal quarto = Cd*A3/sqrt(2*jumpPres34/density);
176 
177  doublereal Jac11 = -primo-secondo;
178  doublereal Jac12 = primo;
179  doublereal Jac13 = secondo;
180  // doublereal Jac14 = 0.;
181  doublereal Jac21 = primo;
182  doublereal Jac22 = -primo-terzo;
183  // doublereal Jac23 = 0.;
184  doublereal Jac24 = terzo;
185  doublereal Jac31 = secondo;
186  // doublereal Jac32 = 0.;
187  doublereal Jac33 = -secondo-quarto;
188  doublereal Jac34 = quarto;
189  // doublereal Jac41 = 0.;
190  doublereal Jac42 = terzo;
191  doublereal Jac43 = quarto;
192  doublereal Jac44 = -terzo-quarto;
193 
194  WM.PutCoef(1, 1, Jac11);
195  WM.PutCoef(1, 2, Jac12);
196  WM.PutCoef(1, 3, Jac13);
197  // WM.PutCoef(1, 4, Jac14);
198  WM.PutCoef(2, 1, Jac21);
199  WM.PutCoef(2, 2, Jac22);
200  // WM.PutCoef(2, 3, Jac23);
201  WM.PutCoef(2, 4, Jac24);
202  WM.PutCoef(3, 1, Jac31);
203  // WM.PutCoef(3, 2, Jac32);
204  WM.PutCoef(3, 3, Jac33);
205  WM.PutCoef(3, 4, Jac24);
206  // WM.PutCoef(4, 1, Jac41);
207  WM.PutCoef(4, 2, Jac42);
208  WM.PutCoef(4, 3, Jac43);
209  WM.PutCoef(4, 4, Jac44);
210 
211  return WorkMat;
212 }
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
const PressureNode * pNode2
Definition: valve.h:47
void Resize(integer iNewRow, integer iNewCol)
Definition: submat.cc:138
const PressureNode * pNode4
Definition: valve.h:49
void PutCoef(integer iRow, integer iCol, const doublereal &dCoef)
Definition: submat.h:672
doublereal A1
Definition: valve.h:59
const PressureNode * pNode3
Definition: valve.h:48
GradientExpression< UnaryExpr< FuncFabs, Expr > > fabs(const GradientExpression< Expr > &u)
Definition: gradient.h:2973
doublereal Cd
Definition: valve.h:51
virtual doublereal dGetDensity(void) const =0
virtual const doublereal & dGetX(void) const
Definition: node.h:492
HydraulicFluid * HF
Definition: preselem.h:79
const PressureNode * pNode1
Definition: valve.h:46
#define DEBUGCOUT(msg)
Definition: myassert.h:232
virtual integer iGetFirstRowIndex(void) const
Definition: node.cc:82
doublereal A2
Definition: valve.h:60
GradientExpression< UnaryExpr< FuncSqrt, Expr > > sqrt(const GradientExpression< Expr > &u)
Definition: gradient.h:2974
void PutRowIndex(integer iSubRow, integer iRow)
Definition: submat.h:311
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51
doublereal A3
Definition: valve.h:61
doublereal A4
Definition: valve.h:62
virtual integer iGetFirstColIndex(void) const
Definition: node.cc:88

Here is the call graph for this function:

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

Implements Elem.

Definition at line 216 of file valve.cc.

References A1, A1min, A2, A2min, A3, A3min, A4, A4min, area_max, Cd, copysign(), DEBUGCOUT, DriveCaller::dGet(), HydraulicFluid::dGetDensity(), ScalarAlgebraicNode::dGetX(), grad::fabs(), flow1, flow2, flow3, flow4, HydraulicElem::HF, Node::iGetFirstRowIndex(), loss_area, DriveOwner::pGetDriveCaller(), pNode1, pNode2, pNode3, pNode4, SubVectorHandler::PutItem(), VectorHandler::Resize(), grad::sqrt(), and Stato.

220 {
221  DEBUGCOUT("Entering Control_valve::AssRes()" << std::endl);
222 
223  WorkVec.Resize(4);
224 
225  integer iNode1RowIndex = pNode1->iGetFirstRowIndex()+1;
226  integer iNode2RowIndex = pNode2->iGetFirstRowIndex()+1;
227  integer iNode3RowIndex = pNode3->iGetFirstRowIndex()+1;
228  integer iNode4RowIndex = pNode4->iGetFirstRowIndex()+1;
229 
230  doublereal p1 = pNode1->dGetX();
231  doublereal p2 = pNode2->dGetX();
232  doublereal p3 = pNode3->dGetX();
233  doublereal p4 = pNode4->dGetX();
234  doublereal density = HF->dGetDensity();
235 
236  Stato = pGetDriveCaller()->dGet();
237 
238  doublereal dp12 = p1-p2;
239  doublereal dp13 = p1-p3;
240  doublereal dp24 = p2-p4;
241  doublereal dp34 = p3-p4;
242 
243  doublereal jumpPres12 = fabs(dp12); /* salto di pressione nodo1 & nodo2 */
244  doublereal jumpPres13 = fabs(dp13); /* salto di pressione nodo1 & nodo3 */
245  doublereal jumpPres24 = fabs(dp24); /* salto di pressione nodo2 & nodo4 */
246  doublereal jumpPres34 = fabs(dp34); /* salto di pressione nodo3 & nodo4 */
247 
248  if (Stato > 1.) {
249  Stato = 1.;
250  } else if (Stato < -1.) {
251  Stato = -1.;
252  }
253 
254  if (Stato > 0.) {
256  A2 = A2min;
258  A4 = A4min;
259  } else {
260  A1 = A1min;
261  A2 = -Stato*area_max+A2min;
262  A3 = A3min;
263  A4 = -Stato*area_max+A4min;
264  }
265 
266  doublereal Q12 = Cd*A1*copysign(sqrt(2.*jumpPres12*density), dp12);
267  doublereal Q13 = Cd*A2*copysign(sqrt(2.*jumpPres13*density), dp13);
268  doublereal Q24 = Cd*A4*copysign(sqrt(2.*jumpPres24*density), dp24);
269  doublereal Q34 = Cd*A3*copysign(sqrt(2.*jumpPres34*density), dp34);
270 
271  doublereal Res_1 = Q12+Q13;
272  doublereal Res_2 = -Q12+Q24;
273  doublereal Res_3 = -Q13+Q34;
274  doublereal Res_4 = -Q34-Q24;
275 
276  flow1 = -Res_1;
277  flow2 = -Res_2;
278  flow3 = -Res_3;
279  flow4 = -Res_4;
280 
281 #ifdef HYDR_DEVEL
282  DEBUGCOUT("Stato: " << Stato << std::endl);
283  DEBUGCOUT("A1: " << A1 << std::endl);
284  DEBUGCOUT("A2: " << A2 << std::endl);
285  DEBUGCOUT("A3: " << A3 << std::endl);
286  DEBUGCOUT("A4: " << A4 << std::endl);
287  DEBUGCOUT("p1: " << p1 << std::endl);
288  DEBUGCOUT("p2: " << p2 << std::endl);
289  DEBUGCOUT("p3: " << p3 << std::endl);
290  DEBUGCOUT("p4: " << p4 << std::endl);
291  DEBUGCOUT("Cd: " << Cd << std::endl);
292  DEBUGCOUT("density: " << density << std::endl);
293  DEBUGCOUT("Area_max: " << area_max << std::endl);
294  DEBUGCOUT("Loss_area in %: " << loss_area << std::endl);
295  DEBUGCOUT("Q12: " << Q12 << std::endl);
296  DEBUGCOUT("Q13: " << Q13 << std::endl);
297  DEBUGCOUT("Q24: " << Q24 << std::endl);
298  DEBUGCOUT("Q34: " << Q34 << std::endl);
299  DEBUGCOUT("PORTATE AI VARI NODI (positive se entranti)"<< std::endl);
300  DEBUGCOUT("-Res_1 (portata nodo1): " << -Res_1 << std::endl);
301  DEBUGCOUT("-Res_2 (portata nodo2): " << -Res_2 << std::endl);
302  DEBUGCOUT("-Res_3 (portata nodo3): " << -Res_3 << std::endl);
303  DEBUGCOUT("-Res_4 (portata nodo4): " << -Res_4 << std::endl);
304 #endif
305 
306  WorkVec.PutItem(1, iNode1RowIndex, Res_1);
307  WorkVec.PutItem(2, iNode2RowIndex, Res_2);
308  WorkVec.PutItem(3, iNode3RowIndex, Res_3);
309  WorkVec.PutItem(4, iNode4RowIndex, Res_4);
310 
311  return WorkVec;
312 }
doublereal A4min
Definition: valve.h:66
const PressureNode * pNode2
Definition: valve.h:47
doublereal A2min
Definition: valve.h:64
const PressureNode * pNode4
Definition: valve.h:49
doublereal A1
Definition: valve.h:59
const PressureNode * pNode3
Definition: valve.h:48
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
doublereal Cd
Definition: valve.h:51
doublereal area_max
Definition: valve.h:52
virtual doublereal dGetDensity(void) const =0
virtual const doublereal & dGetX(void) const
Definition: node.h:492
doublereal flow4
Definition: valve.h:58
doublereal flow1
Definition: valve.h:55
HydraulicFluid * HF
Definition: preselem.h:79
const PressureNode * pNode1
Definition: valve.h:46
doublereal copysign(doublereal x, doublereal y)
Definition: gradient.h:97
#define DEBUGCOUT(msg)
Definition: myassert.h:232
virtual integer iGetFirstRowIndex(void) const
Definition: node.cc:82
doublereal A2
Definition: valve.h:60
GradientExpression< UnaryExpr< FuncSqrt, Expr > > sqrt(const GradientExpression< Expr > &u)
Definition: gradient.h:2974
DriveCaller * pGetDriveCaller(void) const
Definition: drive.cc:658
doublereal A3min
Definition: valve.h:65
virtual doublereal dGet(const doublereal &dVar) const =0
doublereal loss_area
Definition: valve.h:53
doublereal A1min
Definition: valve.h:63
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51
doublereal Stato
Definition: valve.h:50
doublereal flow2
Definition: valve.h:56
doublereal A3
Definition: valve.h:61
virtual void Resize(integer iNewSize)=0
doublereal A4
Definition: valve.h:62
doublereal flow3
Definition: valve.h:57

Here is the call graph for this function:

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

Reimplemented from Elem.

Definition at line 102 of file valve.h.

References pNode1, pNode2, pNode3, and pNode4.

102  {
103  connectedNodes.resize(4);
104  connectedNodes[0] = pNode1;
105  connectedNodes[1] = pNode2;
106  connectedNodes[2] = pNode3;
107  connectedNodes[3] = pNode4;
108  };
const PressureNode * pNode2
Definition: valve.h:47
const PressureNode * pNode4
Definition: valve.h:49
const PressureNode * pNode3
Definition: valve.h:48
const PressureNode * pNode1
Definition: valve.h:46
DofOrder::Order Control_valve::GetDofType ( unsigned int  i) const
virtual

Reimplemented from Elem.

Definition at line 104 of file valve.cc.

References WithLabel::GetLabel(), and MBDYN_EXCEPT_ARGS.

105 {
106  silent_cerr("ControlValve(" << GetLabel() << ") has no dofs!" << std::endl);
108 }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
unsigned int GetLabel(void) const
Definition: withlab.cc:62

Here is the call graph for this function:

HydraulicElem::Type Control_valve::GetHydraulicType ( void  ) const
virtual

Implements HydraulicElem.

Definition at line 88 of file valve.cc.

References HydraulicElem::CONTROL_VALVE.

unsigned int Control_valve::iGetNumDof ( void  ) const
virtual

Reimplemented from Elem.

Definition at line 99 of file valve.cc.

100 {
101  return 0;
102 }
void Control_valve::Output ( OutputHandler OH) const
virtual

Reimplemented from ToBeOutput.

Definition at line 314 of file valve.cc.

References ToBeOutput::bToBeOutput(), flow1, flow2, flow3, flow4, WithLabel::GetLabel(), OutputHandler::Hydraulic(), and Stato.

315 {
316  if (bToBeOutput()) {
317  std::ostream& out = OH.Hydraulic();
318  out << std::setw(8) << GetLabel()
319  << " " << Stato
320  << " " << flow1 << " " << flow2
321  << " " << flow3 << " " << flow4 << std::endl;
322  }
323 }
virtual bool bToBeOutput(void) const
Definition: output.cc:890
doublereal flow4
Definition: valve.h:58
doublereal flow1
Definition: valve.h:55
std::ostream & Hydraulic(void) const
Definition: output.h:492
doublereal Stato
Definition: valve.h:50
unsigned int GetLabel(void) const
Definition: withlab.cc:62
doublereal flow2
Definition: valve.h:56
doublereal flow3
Definition: valve.h:57

Here is the call graph for this function:

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

Implements Elem.

Definition at line 94 of file valve.cc.

95 {
96  return out << "Control_valve not implemented yet!" << std::endl;
97 }
void Control_valve::WorkSpaceDim ( integer piNumRows,
integer piNumCols 
) const
virtual

Implements Elem.

Definition at line 112 of file valve.cc.

113 {
114  *piNumRows = 4;
115  *piNumCols = 4;
116 }

Member Data Documentation

doublereal Control_valve::A1
private

Definition at line 59 of file valve.h.

Referenced by AssJac(), and AssRes().

doublereal Control_valve::A1min
private

Definition at line 63 of file valve.h.

Referenced by AssRes().

doublereal Control_valve::A2
private

Definition at line 60 of file valve.h.

Referenced by AssJac(), and AssRes().

doublereal Control_valve::A2min
private

Definition at line 64 of file valve.h.

Referenced by AssRes().

doublereal Control_valve::A3
private

Definition at line 61 of file valve.h.

Referenced by AssJac(), and AssRes().

doublereal Control_valve::A3min
private

Definition at line 65 of file valve.h.

Referenced by AssRes().

doublereal Control_valve::A4
private

Definition at line 62 of file valve.h.

Referenced by AssJac(), and AssRes().

doublereal Control_valve::A4min
private

Definition at line 66 of file valve.h.

Referenced by AssRes().

doublereal Control_valve::area_max
private

Definition at line 52 of file valve.h.

Referenced by AssRes().

doublereal Control_valve::Cd
private

Definition at line 51 of file valve.h.

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

doublereal Control_valve::flow1
private

Definition at line 55 of file valve.h.

Referenced by AssRes(), and Output().

doublereal Control_valve::flow2
private

Definition at line 56 of file valve.h.

Referenced by AssRes(), and Output().

doublereal Control_valve::flow3
private

Definition at line 57 of file valve.h.

Referenced by AssRes(), and Output().

doublereal Control_valve::flow4
private

Definition at line 58 of file valve.h.

Referenced by AssRes(), and Output().

doublereal Control_valve::loss_area
private

Definition at line 53 of file valve.h.

Referenced by AssRes(), and Control_valve().

const PressureNode* Control_valve::pNode1
private

Definition at line 46 of file valve.h.

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

const PressureNode* Control_valve::pNode2
private

Definition at line 47 of file valve.h.

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

const PressureNode* Control_valve::pNode3
private

Definition at line 48 of file valve.h.

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

const PressureNode* Control_valve::pNode4
private

Definition at line 49 of file valve.h.

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

doublereal Control_valve::s_max
private

Definition at line 54 of file valve.h.

doublereal Control_valve::Stato
private

Definition at line 50 of file valve.h.

Referenced by AssRes(), and Output().


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