BoundedFrictionSimulation class
A FrictionSimulation that clamps the modeled particle to a specific range of values.
Only the position is clamped. The velocity dx will continue to report unbounded simulated velocities once the particle has reached the bounds.
- Inheritance
-
- Object
- Simulation
- FrictionSimulation
- BoundedFrictionSimulation
Constructors
- BoundedFrictionSimulation(double drag, double position, double velocity, double _minX, double _maxX)
- Creates a BoundedFrictionSimulation with the given arguments, namely: the fluid drag coefficient cₓ, a unitless value; the initial position x₀, in the same length units as used for x; the initial velocity dx₀, in the same velocity units as used for dx, the minimum value for the position, and the maximum value for the position. The minimum and maximum values must be in the same units as the initial position, and the initial position must be within the given range.
Properties
- finalX → double
-
The value of x at
double.infinity
.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tolerance ↔ Tolerance
-
How close to the actual end of the simulation a value at a particular time
must be before isDone considers the simulation to be "done".
getter/setter pairinherited
Methods
-
dx(
double time) → double -
The velocity of the object in the simulation at the given time.
inherited
-
isDone(
double time) → bool -
Whether the simulation is "done" at the given time.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
timeAtX(
double x) → double -
The time at which the value of
x(time)
will equalx
.inherited -
toString(
) → String -
A string representation of this object.
override
-
x(
double time) → double -
The position of the object in the simulation at the given time.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited