AGX Dynamics
2.38.0.2
ElectricMotor.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
9
having been advised so by Algoryx Simulation AB for a time limited evaluation,
10
or having purchased a 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
#pragma once
18
19
#include <
agxModel/export.h
>
20
21
#include <
agxPowerLine/RotationalUnit.h
>
22
#include <
agxDriveTrain/ElectricMotorConstraint.h
>
23
24
namespace
agxDriveTrain
25
{
32
class
AGXMODEL_EXPORT
ElectricMotor
:
public
agxPowerLine::RotationalUnit
33
{
34
public
:
42
ElectricMotor
(
agx::Real
resistance,
agx::Real
torqueConstant,
agx::Real
emfConstant,
agx::Real
inductance);
43
48
void
setVoltage(
agx::Real
voltage);
49
53
agx::Real
getVoltage()
const
;
54
58
void
setResistance(
agx::Real
resistance);
62
agx::Real
getResistance()
const
;
63
68
void
setTorqueConstant(
agx::Real
torqueConstant);
72
agx::Real
getTorqueConstant()
const
;
73
78
void
setEmfConstant(
agx::Real
emfConstant);
79
agx::Real
getEmfConstant()
const
;
80
85
void
setInductance(
agx::Real
inductance);
89
agx::Real
getInductance()
const
;
90
94
agx::Real
getCurrent()
const
;
98
agx::Real
getEmfVoltage()
const
;
99
103
const
agxDriveTrain::ElectricMotorConstraint
* getConstraint()
const
;
104
105
public
:
107
virtual
bool
addNotification(
agxSDK::Simulation
* simulation)
override
;
109
virtual
bool
removeNotification(
agxUtil::ConstraintHolder
* constraintHolder,
agxSDK::Simulation
* simulation)
override
;
110
112
virtual
bool
preUpdate(
agx::Real
timeStep)
override
;
113
115
virtual
bool
store(
agxStream::StorageStream
& str)
const override
;
117
virtual
bool
postStore(
agxStream::StorageStream
& str)
const override
;
118
120
virtual
bool
restore(
agxStream::StorageStream
& str)
override
;
122
virtual
bool
postRestore(
agxStream::StorageStream
& str)
override
;
123
124
AGXSTREAM_DECLARE_SERIALIZABLE
(
agxDriveTrain::ElectricMotor
);
125
126
protected
:
127
ElectricMotor
() =
default
;
128
129
using
base
=
agxPowerLine::RotationalUnit
;
130
virtual
~
ElectricMotor
();
131
132
private
:
133
agx::Real
m_resistance;
134
agx::Real
m_torqueConstant;
135
agx::Real
m_emfConstant;
136
agx::Real
m_inductance;
137
agx::Real
m_voltage;
138
139
ElectricMotorConstraintRef
m_motor;
140
};
141
142
AGX_DECLARE_POINTER_TYPES
(
ElectricMotor
);
143
}
144
145
RotationalUnit.h
agx::Real
double Real
Definition:
Real.h:42
agxDriveTrain::ElectricMotorConstraint
Definition:
ElectricMotorConstraint.h:61
export.h
agxDriveTrain
A library of agxPowerLine components designed to model the various parts of a vehicle drive train.
agxUtil::ConstraintHolder
Utility class to hold custom implementations of constraints.
Definition:
agxUtil.h:463
agxStream::StorageStream
Abstract base class for storing/restoring a line/drums with version control.
Definition:
StorageStream.h:48
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
ElectricMotorConstraint.h
agxDriveTrain::ElectricMotor
An electric motor is a roational unit that is a source of power in a drive train.
Definition:
ElectricMotor.h:32
agx::ref_ptr< ElectricMotorConstraint >
agxSDK::Simulation
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition:
Simulation.h:125
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition:
Referenced.h:254
AGXMODEL_EXPORT
#define AGXMODEL_EXPORT
Definition:
agxModel/export.h:42
agxPowerLine::RotationalUnit
A rotational unit has one degree of freedom.
Definition:
RotationalUnit.h:28
include
agxDriveTrain
ElectricMotor.h
Generated on Sun Sep 1 2024 11:18:37 for AGX Dynamics by
1.8.17