AGX Dynamics  2.38.0.2
Accumulator.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. 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 #ifndef AGXHYDRAULICS_ACCUMULATOR_H
18 #define AGXHYDRAULICS_ACCUMULATOR_H
19 
20 #include <agxHydraulics/FlowUnit.h>
23 #include <agxPowerLine/Connector.h>
24 #include <agx/Prismatic.h>
25 #include <agx/BallJoint.h>
26 
27 namespace agxHydraulics
28 {
30 
44  {
45  public:
51  Accumulator(agx::Real length, agx::Real area, agx::Real fluidDensity, agx::Real springConstant);
52 
56  agx::Real getSpringConstant() const;
57 
61  const agxHydraulics::detail::AccumulatorConstraint* getAccumulatorConstraint() const;
62 
63  // Methods called by the rest of the power line framework.
64  public:
65 #ifndef SWIG
67  virtual bool addNotification(agxSDK::Simulation* simulation) override;
69  virtual bool removeNotification(agxUtil::ConstraintHolder* constraintHolder, agxSDK::Simulation* simulation) override;
71 
72  virtual agxPowerLine::DimensionAndSide getConnectableDimension(agxPowerLine::PhysicalDimension::Type type,
73  agxPowerLine::Side side) override;
74 
78 #endif
79 
80  protected:
81  Accumulator();
82  virtual ~Accumulator();
83  void createAccumulatorConstraint();
84 
85  private:
86  agx::Real m_springConstant;
87  agxHydraulics::detail::AccumulatorConstraintRef m_accumulatorConstraint;
88  };
89 }
90 
91 
92 #endif
agx::Real
double Real
Definition: Real.h:42
agxPowerLine::Unit::store
virtual bool store(agxStream::StorageStream &str) const override
Stores internal data into stream.
agxPowerLine::Side
Side
Definition: Sides.h:28
DOXYGEN_END_INTERNAL_BLOCK
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:97
agxUtil::ConstraintHolder
Utility class to hold custom implementations of constraints.
Definition: agxUtil.h:463
DOXYGEN_START_INTERNAL_BLOCK
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:96
AGXSTREAM_DECLARE_SERIALIZABLE
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Definition: Serializable.h:207
agxPowerLine::PhysicalDimension::Type
int Type
Definition: PhysicalDimension.h:95
Prismatic.h
PowerLineConstraints.h
AGXHYDRAULICS_EXPORT
#define AGXHYDRAULICS_EXPORT
Definition: agxHydraulics/export.h:39
AccumulatorConstraints.h
agxSDK::Simulation
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:125
Connector.h
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
agxHydraulics
The agxHydraulics namespace contains classes for modeling hydraulic circuits within the power line fr...
Definition: Accumulator.h:27
agxPowerLine::Unit::restore
virtual bool restore(agxStream::StorageStream &str) override
Restores internal data from stream.
agxHydraulics::FlowUnit
FlowUnit is the base class for Units that contains a FlowDimension.
Definition: FlowUnit.h:66
BallJoint.h
FlowUnit.h
agxPowerLine::DimensionAndSide
std::pair< agxPowerLine::PhysicalDimension *, agxPowerLine::Side > DimensionAndSide
Definition: PhysicalDimension.h:77
agxHydraulics::Accumulator
An accumulator is a component that stores fluid and pressure.
Definition: Accumulator.h:43