|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jimmc.spelsim.Cable
public class Cable
The cable and attached masses.
Field Summary | |
---|---|
protected static double |
FWD_CIRCLE_FRACTION
|
Constructor Summary | |
---|---|
Cable()
Create a cable. |
Method Summary | |
---|---|
protected void |
calculateAccelerations(int whichDyn,
double simOffset,
double cwDerating,
double groundDrag)
Calculate the acceleration on each element. |
protected void |
calculatePositions(double simInterval,
int fromDyn,
int toDyn,
int whichAccel,
double dampingFactor)
Caculate the new position of each element. |
protected void |
calculateStresses(int whichDyn,
double simOffset)
Calcuate the stress on each element. |
void |
draw(java.awt.Graphics2D g,
double scale)
Draw the cable. |
void |
dumpSelectedElements(double time,
int algorithm)
For debugging, dump the first and last cable elements. |
DVector[] |
getAccelerationDrifts()
Get the acceleration drift vectors for all elements. |
DVector[] |
getAccelerations()
Get the acceleration vectors for all elements. |
double |
getBaseArea()
Get the base area of the cable. |
java.awt.geom.Rectangle2D |
getBoundingBox()
Get the bounding box containing all of the cable elements. |
double |
getBoundingRadius()
Get the maximum radius value for all cable elements. |
boolean[] |
getBroken()
Get the broken flag for all elements. |
static Cable |
getCable(java.lang.String name)
Get a cable with preset values. |
static java.lang.String[] |
getCableNames()
Get the list of known cable names. |
double |
getCapacity()
Get the capacity of the cable. |
double |
getCenterOfCentrifugalAltitude()
Get the altitude of the center of centrifugal of the cable. |
double |
getCenterOfGravityAltitude()
Get the altitude of the center of gravity of the cable. |
double |
getCenterOfMassAltitude()
Get the altitude of the center of mass of the cable. |
double |
getCounterweightMass()
Get the mass of the counterweight. |
net.jimmc.spelsim.CableElement[] |
getElements()
Get the current list of elements. |
DVector[] |
getIdealAccelerations()
Get the ideal acceleration vectors for all elements. |
DVector[] |
getIdealPositions()
Get the ideal position vectors for all elements. |
DVector[] |
getIdealVelocities()
Get the ideal velocity vectors for all elements. |
double |
getLength()
Get the length of the cable. |
double |
getMass()
Get the total mass of the cable. |
Material |
getMaterial()
Get the material of the cable. |
net.jimmc.spelsim.CableElement[] |
getMaxPositionDrifts(int count)
Get the elements with the largest amount of position drift. |
int |
getNumBrokenElements()
|
int |
getNumElements()
Get the number of elements used for the cable calculations and simulation. |
int |
getNumGroundedElements()
|
Planet |
getPlanet()
Get the planet aound which the cable orbits. |
DVector[] |
getPositionDrifts()
Get the position drift vectors for all elements. |
DVector[] |
getPositions()
Get the position vectors for all elements. |
double |
getSafetyFactor()
Get the safety factor of the cable. |
double[] |
getStresses()
Get the stresses for all elements. |
double |
getTaper()
Get the cable taper factor. |
DVector[] |
getVelocities()
Get the velocity vectors for all elements. |
DVector[] |
getVelocityDrifts()
Get the velocity drift vectors for all elements. |
boolean |
isDebugOutputEnabled()
|
void |
printMaxPositionDrifts(int count)
Print the maximum drift values. |
void |
recalculateElements()
Recalculate the elements. |
protected void |
resetSimulation()
Reset the simulation of our cable. |
void |
setCapacity(double capacity)
Set the capacity of the cable. |
void |
setDebugOutputEnabled(boolean enabled)
|
void |
setElementBroken(int elementNumber)
|
void |
setLength(double length)
Set the length of the cable. |
void |
setMaterial(Material material)
Set the material of the cable. |
void |
setNumElements(int numElements)
Set the number of elements in the cable calculations. |
void |
setPlanet(Planet planet)
Set the planet around which the cable orbits. |
void |
setSafetyFactor(double safetyFactor)
Set the safety factor of the cable. |
protected void |
simulateOneStep(double simInterval,
int algorithm,
double dampingFactor,
double cwDerating,
double groundDrag)
Simulate the motion of our cable in the indicated amount of time. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final double FWD_CIRCLE_FRACTION
Constructor Detail |
---|
public Cable()
Method Detail |
---|
public static Cable getCable(java.lang.String name)
public static java.lang.String[] getCableNames()
public void setDebugOutputEnabled(boolean enabled)
public boolean isDebugOutputEnabled()
public void setLength(double length)
length
- The length of the cable in meters.public double getLength()
public void setCapacity(double capacity)
capacity
- The capacity of the cable in Newtons.public double getCapacity()
public void setSafetyFactor(double safetyFactor)
safetyFactor
- The safety factor of the cable.public double getSafetyFactor()
public void setMaterial(Material material)
material
- The material from which the cable is made.public Material getMaterial()
public void setNumElements(int numElements)
numElements
- The number of elements to use in
calculations and simulation of the cable.public int getNumElements()
public int getNumBrokenElements()
public int getNumGroundedElements()
public void setElementBroken(int elementNumber)
public net.jimmc.spelsim.CableElement[] getElements()
public java.awt.geom.Rectangle2D getBoundingBox()
public double getBoundingRadius()
public void setPlanet(Planet planet)
planet
- The planet around which the cable orbits.public Planet getPlanet()
public double getBaseArea()
public double getMass()
public double getCounterweightMass()
public double getTaper()
public double getCenterOfMassAltitude()
public double getCenterOfGravityAltitude()
public double getCenterOfCentrifugalAltitude()
public void recalculateElements()
protected void resetSimulation()
protected void simulateOneStep(double simInterval, int algorithm, double dampingFactor, double cwDerating, double groundDrag)
simInterval
- The step size to simulate.algorithm
- The algorithm to use, one of SpelCanvas.ALG_*.protected void calculateStresses(int whichDyn, double simOffset)
protected void calculateAccelerations(int whichDyn, double simOffset, double cwDerating, double groundDrag)
protected void calculatePositions(double simInterval, int fromDyn, int toDyn, int whichAccel, double dampingFactor)
public void draw(java.awt.Graphics2D g, double scale)
public DVector[] getPositions()
public DVector[] getVelocities()
public DVector[] getAccelerations()
public DVector[] getIdealPositions()
public DVector[] getIdealVelocities()
public DVector[] getIdealAccelerations()
public DVector[] getPositionDrifts()
public DVector[] getVelocityDrifts()
public DVector[] getAccelerationDrifts()
public double[] getStresses()
public boolean[] getBroken()
public net.jimmc.spelsim.CableElement[] getMaxPositionDrifts(int count)
count
- The number of elements to return.public void printMaxPositionDrifts(int count)
public void dumpSelectedElements(double time, int algorithm)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |