AGXDynamics
2.35.0.3
ElectricMotor.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
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);
52
agx::Real
getVoltage()
const
;
53
57
void
setResistance(
agx::Real
resistance);
61
agx::Real
getResistance()
const
;
62
67
void
setTorqueConstant(
agx::Real
torqueConstant);
71
agx::Real
getTorqueConstant()
const
;
72
77
void
setEmfConstant(
agx::Real
emfConstant);
78
agx::Real
getEmfConstant()
const
;
79
84
void
setInductance(
agx::Real
inductance);
88
agx::Real
getInductance()
const
;
89
93
agx::Real
getCurrent()
const
;
97
agx::Real
getEmfVoltage()
const
;
98
102
const
agxDriveTrain::ElectricMotorConstraint
* getConstraint()
const
;
103
104
public
:
106
virtual
bool
addNotification(
agxSDK::Simulation
* simulation)
override
;
108
virtual
bool
removeNotification(
agxUtil::ConstraintHolder
* constraintHolder,
agxSDK::Simulation
* simulation)
override
;
109
111
virtual
bool
preUpdate(
agx::Real
timeStep)
override
;
112
114
virtual
bool
store(
agxStream::StorageStream
& str)
const override
;
116
virtual
bool
postStore(
agxStream::StorageStream
& str)
const override
;
117
119
virtual
bool
restore(
agxStream::StorageStream
& str)
override
;
121
virtual
bool
postRestore(
agxStream::StorageStream
& str)
override
;
122
123
AGXSTREAM_DECLARE_SERIALIZABLE
(
agxDriveTrain::ElectricMotor
);
124
125
protected
:
126
ElectricMotor
() =
default
;
127
128
using
base
=
agxPowerLine::RotationalUnit
;
129
virtual
~
ElectricMotor
();
130
131
private
:
132
agx::Real
m_resistance;
133
agx::Real
m_torqueConstant;
134
agx::Real
m_emfConstant;
135
agx::Real
m_inductance;
136
agx::Real
m_voltage;
137
138
ElectricMotorConstraintRef
m_motor;
139
};
140
141
AGX_DECLARE_POINTER_TYPES
(
ElectricMotor
);
142
}
143
144
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:126
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition:
Referenced.h:248
AGXMODEL_EXPORT
#define AGXMODEL_EXPORT
Definition:
agxModel/export.h:42
agxPowerLine::RotationalUnit
A rotational unit has one degree of freedom.
Definition:
RotationalUnit.h:29
include
agxDriveTrain
ElectricMotor.h
Generated on Fri Feb 10 2023 14:06:09 for AGXDynamics by
1.8.17