AGXDynamics  2.35.0.3
RotationalFlowConnector.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 
18 #ifndef AGXHYDRAULICS_ROTATIONAL_FLOW_CONNECTOR_H
19 #define AGXHYDRAULICS_ROTATIONAL_FLOW_CONNECTOR_H
20 
21 #include <agxHydraulics/FlowUnit.h>
23 
25 
26 namespace agxHydraulics
27 {
32  {
33  public:
41  virtual void setDisplacement(agx::Real displacement);
42 
46  virtual agx::Real getDisplacement() const;
47 
55  void setCompliance(agx::Real compliance);
56 
60  agx::Real getCompliance() const;
61 
68  agx::Real getPressure() const override;
69 
70 
71 
72  // Methods called by the rest of the power line framework.
73  public:
75  virtual agx::RegularizationParameters::VariableType calculateComplianceAndDamping(
76  const agx::Real timeStep, agx::Real& compliance, agx::Real& damping) override;
77 
78 #ifndef SWIG
79 
82  virtual bool store(agxStream::StorageStream& str) const override;
83 
87  virtual bool restore(agxStream::StorageStream& str) override;
88 
90  void restore(agxStream::InputArchive& in) override;
91  void store(agxStream::OutputArchive& out) const override;
92 #endif
94 
95  protected:
98 
99  virtual agx::Real displacementToRatio(agx::Real displacement) = 0;
100  virtual agx::Real constraintForceToPressure(agx::Real constraintForce, agx::Real displacement) const = 0;
101  virtual agx::Real pressureToConstraintForce(agx::Real pressure, agx::Real ratio) const = 0;
102 
103  protected:
106  };
107 
109 }
110 
111 #endif
agx::Real
double Real
Definition: Real.h:42
agxHydraulics::RotationalFlowConnector::m_compliance
agx::Real m_compliance
Definition: RotationalFlowConnector.h:105
agx::RegularizationParameters::VariableType
VariableType
Definition: RegularizationParameters.h:32
agxStream::out
OutputRef< Serializable > out(const char *name, const Serializable *obj)
Return an object that contain the name and the object that should be serialized to an archive.
Definition: OutputArchive.h:412
agxHydraulics::RotationalFlowConnector::m_displacement
agx::Real m_displacement
Definition: RotationalFlowConnector.h:104
DOXYGEN_END_INTERNAL_BLOCK
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:97
DOXYGEN_START_INTERNAL_BLOCK
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:96
agxFMI2::Export::Constraint::setCompliance
AGXFMI_EXPORT InputVariable_Real * setCompliance(agx::Constraint *constraint)
agxStream::StorageStream
Abstract base class for storing/restoring a line/drums with version control.
Definition: StorageStream.h:48
AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
Definition: Serializable.h:221
agxHydraulics::RotationalFlowConnector::~RotationalFlowConnector
virtual ~RotationalFlowConnector()
Definition: RotationalFlowConnector.h:97
agxStream::in
InputRef< T > in(const char *name, T &obj)
Create an object with a name and a reference to the object that should be restored (usually a pointer...
Definition: InputArchive.h:400
AGXHYDRAULICS_EXPORT
#define AGXHYDRAULICS_EXPORT
Definition: agxHydraulics/export.h:39
agx::ref_ptr< agxHydraulics::RotationalFlowConnector >
agxHydraulics::PressureConnector
The PressureConnector is an abstract base class for all Connectors that has a pressure.
Definition: PressureConnector.h:36
agxStream::OutputArchive
Class for writing serialized data in binary format to a stream.
Definition: OutputArchive.h:56
agxStream::InputArchive
Class for reading a binary stream of serialized data.
Definition: InputArchive.h:51
agxHydraulics::RotationalFlowConnectorRef
agx::ref_ptr< agxHydraulics::RotationalFlowConnector > RotationalFlowConnectorRef
Definition: RotationalFlowConnector.h:108
agxHydraulics::RotationalFlowConnector
Abstract base class containing overlapping functionality for pump and motor.
Definition: RotationalFlowConnector.h:31
agxHydraulics
The agxHydraulics namespace contains classes for modeling hydraulic circuits within the power line fr...
Definition: Accumulator.h:27
RotationalDimension.h
PressureConnector.h
FlowUnit.h