AGX Dynamics
2.37.2.0
WindAndWaterParameters.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 AGXMODEL_WINDANDWATERPARAMETERS_H
18
#define AGXMODEL_WINDANDWATERPARAMETERS_H
19
20
#include <
agxModel/AddedMassDb.h
>
21
22
#include <
agx/Referenced.h
>
23
24
namespace
agxModel
25
{
26
class
WindAndWaterController;
27
28
class
AGXMODEL_EXPORT
WindAndWaterParameters
:
public
agx::Referenced
29
{
30
public
:
35
enum
ShapeTessellation
36
{
37
LOW
,
38
MEDIUM
,
39
HIGH
,
40
ULTRA_HIGH
,
41
DEFAULT_TESSELLATION = MEDIUM
42
};
43
44
enum
Coefficient
{
45
PRESSURE_DRAG
,
46
VISCOUS_DRAG
,
47
LIFT
,
48
BUOYANCY
49
};
50
54
static
agx::Real
shapeTessellationLevelToResolution(
agxModel::WindAndWaterParameters::ShapeTessellation
tessellationLevel );
55
56
public
:
57
63
void
setCoefficient(
Coefficient
type,
agx::Real
coefficient );
64
68
agx::Real
getCoefficient(
Coefficient
type )
const
;
69
77
static
void
setHydrodynamicCoefficient(
WindAndWaterController
* controller,
agx::RigidBody
* rb,
Coefficient
type,
agx::Real
coefficient );
78
86
static
void
setAerodynamicCoefficient(
WindAndWaterController
* controller,
agx::RigidBody
* rb,
Coefficient
type,
agx::Real
coefficient );
87
94
void
setShapeTessellationLevel(
agxModel::WindAndWaterParameters::ShapeTessellation
tessellation );
95
99
agxModel::WindAndWaterParameters::ShapeTessellation
getShapeTessellationLevel()
const
;
100
104
const
agxCollide::Shape
* getShape()
const
;
105
109
virtual
void
store(
agxStream::OutputArchive
&
out
)
const
;
110
114
virtual
void
restore(
agxStream::InputArchive
&
in
);
115
116
protected
:
117
WindAndWaterParameters
(
const
agxCollide::Shape
* shape,
agxModel::AddedMassDbRef
addedMassDb );
118
virtual
~
WindAndWaterParameters
();
119
120
DOXYGEN_START_INTERNAL_BLOCK
()
121
virtual
agx
::
Bool
checkParameter(
Coefficient
type ) const = 0;
122
DOXYGEN_END_INTERNAL_BLOCK
()
123
124
protected:
125
agx
::
Real
m_pressureDragCoefficient;
126
agx
::
Real
m_liftCoefficient;
127
agx
::
Real
m_viscousDragCoefficient;
128
agx
::
Real
m_buoyancyScaling;
129
agxModel
::
AddedMassStorage
::Identifier m_addedMassIdentifier;
130
agxModel
::
AddedMassDbRef
m_addedMassDb;
131
agxCollide
::
ShapeConstObserver
m_shape;
132
ShapeTessellation
m_tessellation;
133
};
134
135
typedef
agx
::ref_ptr<
WindAndWaterParameters
>
WindAndWaterParametersRef
;
136
137
class
AGXMODEL_EXPORT
AerodynamicsParameters
: public
WindAndWaterParameters
138
{
139
protected
:
140
friend
class
WindAndWaterController
;
141
AerodynamicsParameters
(
const
agxCollide::Shape
* shape,
agxModel::AddedMassDbRef
addedMassDb );
142
virtual
~
AerodynamicsParameters
();
143
144
DOXYGEN_START_INTERNAL_BLOCK
()
145
virtual
agx
::
Bool
checkParameter(
Coefficient
type ) const override;
146
DOXYGEN_END_INTERNAL_BLOCK
()
147
};
148
149
typedef
agx
::ref_ptr<
AerodynamicsParameters
>
AerodynamicsParametersRef
;
150
151
class
AGXMODEL_EXPORT
HydrodynamicsParameters
: public WindAndWaterParameters
152
{
153
public
:
159
agx::Bool
initializeAddedMassStorage(
const
agx::String
& filename );
160
164
const
agxModel::AddedMassStorage
* getAddedMassStorage()
const
;
165
166
protected
:
167
friend
class
WindAndWaterController
;
168
HydrodynamicsParameters
(
const
agxCollide::Shape
* shape,
agxModel::AddedMassDbRef
addedMassDb );
169
virtual
~
HydrodynamicsParameters
();
170
171
DOXYGEN_START_INTERNAL_BLOCK
()
172
virtual
agx
::
Bool
checkParameter(
Coefficient
type ) const override;
173
DOXYGEN_END_INTERNAL_BLOCK
()
174
};
175
176
typedef
agx
::ref_ptr<
HydrodynamicsParameters
>
HydrodynamicsParametersRef
;
177
178
AGX_FORCE_INLINE
WindAndWaterParameters::
ShapeTessellation
WindAndWaterParameters::getShapeTessellationLevel()
const
179
{
180
return
m_tessellation;
181
}
182
}
183
184
#endif // AGXMODEL_WINDANDWATERPARAMETERS_H
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
agxModel::WindAndWaterParameters::Coefficient
Coefficient
Definition:
WindAndWaterParameters.h:44
agxModel::AerodynamicsParameters
Definition:
WindAndWaterParameters.h:137
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
agxModel::WindAndWaterParameters
Definition:
WindAndWaterParameters.h:28
agx::Bool
bool Bool
Definition:
Integer.h:48
agxCollide::Shape
Base class for a shape.
Definition:
Shape.h:53
agxCollide
This namespace consists of a set of classes for handling geometric intersection tests including boole...
Definition:
ContactForceFilterParticipant.h:22
agxCollide::ShapeConstObserver
agx::observer_ptr< const Shape > ShapeConstObserver
Definition:
Shape.h:46
agxModel::WindAndWaterParameters::PRESSURE_DRAG
Definition:
WindAndWaterParameters.h:45
agx::AgXString< std::string >
agxModel::WindAndWaterController
Controller that collects relevant data and executes algorithms (probably mostly aero- and hydrodynami...
Definition:
WindAndWaterController.h:45
AGX_FORCE_INLINE
#define AGX_FORCE_INLINE
Definition:
Object.h:59
agxModel::WindAndWaterParameters::HIGH
Definition:
WindAndWaterParameters.h:39
agxModel::AddedMassStorage
Storage that holds data needed for added mass calculations.
Definition:
AddedMassDb.h:38
agx::Referenced
Base class providing referencing counted objects.
Definition:
Referenced.h:119
agxModel
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
Definition:
FlowUnit.h:36
agx
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Definition:
AddedMassInteraction.h:22
agxModel::WindAndWaterParameters::MEDIUM
Definition:
WindAndWaterParameters.h:38
Referenced.h
agx::ref_ptr< AddedMassDb >
agxModel::WindAndWaterParameters::LIFT
Definition:
WindAndWaterParameters.h:47
agx::RigidBody
The rigid body class, combining a geometric model and a frame of reference.
Definition:
RigidBody.h:54
agxModel::WindAndWaterParameters::VISCOUS_DRAG
Definition:
WindAndWaterParameters.h:46
agxStream::InputArchive
Class for reading a binary stream of serialized data.
Definition:
InputArchive.h:51
agxStream::OutputArchive
Class for writing serialized data in binary format to a stream.
Definition:
OutputArchive.h:56
AddedMassDb.h
AGXMODEL_EXPORT
#define AGXMODEL_EXPORT
Definition:
agxModel/export.h:42
agx::Real
double Real
Definition:
Real.h:42
agxModel::HydrodynamicsParameters
Definition:
WindAndWaterParameters.h:151
agxModel::WindAndWaterParameters::ULTRA_HIGH
Definition:
WindAndWaterParameters.h:40
agxModel::WindAndWaterParameters::ShapeTessellation
ShapeTessellation
Tessellation levels of native, non-mesh shapes, e.g, sphere, capsule and cylinder.
Definition:
WindAndWaterParameters.h:35
DOXYGEN_END_INTERNAL_BLOCK
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition:
Object.h:98
agxModel::WindAndWaterParameters::LOW
Definition:
WindAndWaterParameters.h:37
DOXYGEN_START_INTERNAL_BLOCK
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition:
Object.h:97
include
agxModel
WindAndWaterParameters.h
Generated on Sun Jan 28 2024 11:19:37 for AGX Dynamics by
1.8.13