public abstract class EquilibriumAxialMuscle extends AxialMuscleMaterialBase implements HasNumericState
Modifier and Type | Field and Description |
---|---|
boolean |
debug |
static boolean |
DEFAULT_COMPUTE_LMDOT_FROM_LDOT |
static double |
DEFAULT_FIBRE_DAMPING |
static boolean |
DEFAULT_IGNORE_FORCE_VELOCITY |
static double |
DEFAULT_MAX_CONTRACTION_VELOCITY |
static double |
DEFAULT_MAX_ISO_FORCE |
static double |
DEFAULT_MUSCLE_LENGTH |
static double |
DEFAULT_OPT_FIBRE_LENGTH |
static double |
DEFAULT_OPT_PENNATION_ANGLE |
static boolean |
DEFAULT_RIGID_TENDON |
static double |
DEFAULT_TENDON_SLACK_LENGTH |
static PropertyList |
myProps |
static boolean |
useFindLm |
static boolean |
useNewtonSolver |
boolean |
vmFromTendon |
Modifier and Type | Method and Description |
---|---|
void |
advanceState(double t0,
double t1)
If
HasNumericState.requiresAdvance() and HasNumericState.hasState() both return true , then this method is called each time step by the system integrator
to update this component's state. |
double |
computeDFdl(double l,
double ldot,
double l0,
double excitation)
Computes and returns the derivative of the axial spring tension
with respect to the length.
|
double |
computeDFdldot(double l,
double ldot,
double l0,
double excitation)
Computes and returns the derivative of the axial spring tension
with respect to the length time derivative.
|
double |
computeF(double l,
double ldot,
double l0,
double excitation)
Computes and returns the axial spring tension, as a function of
length, length time derivative, rest length, and excitation.
|
double |
computeG(DoubleHolder dG,
double l,
double lm,
double vm,
double a,
double h) |
double |
computeLmWithConstantVm(double l,
double vm,
double a) |
double |
computeLmWithVmFromLm(double l,
double ldot,
double a,
double h) |
double |
computePassiveF(double l,
double ldot,
double l0,
double excitation) |
double |
computeVmFromLdot(double ldot) |
double |
fibreToMuscleLength(double lf)
Computes the muscle length corresponding to a given fibre length.
|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
boolean |
getComputeLmDotFromLDot() |
double |
getFibreDamping() |
boolean |
getIgnoreForceVelocity() |
boolean |
getIgnoreTendonCompliance()
Deprecated.
Use
hasRigidTendon() instead. |
double |
getLength() |
double |
getMaxContractionVelocity() |
double |
getMaxIsoForce() |
double |
getMuscleLength() |
double |
getOptFibreLength() |
double |
getOptPennationAngle() |
void |
getState(DataBuffer data)
Saves state information for this component by adding data to the
supplied DataBuffer.
|
int |
getStateVersion()
Returns a version number for this component's state.
|
double |
getTendonLength() |
double |
getTendonSlackLength() |
boolean |
hasRigidTendon()
Queries whether the tendon for this muscle material is rigid.
|
boolean |
hasState()
Returns
true if this component currently holds state. |
double |
initializeLmPrevFromLdot(double l,
double ldot,
double a) |
boolean |
isDFdldotZero()
Returns true if computeDFdldot() always returns zero.
|
boolean |
requiresAdvance()
Returns
true if the state of this component must be
updated each time step using HasNumericState.advanceState(double, double) . |
void |
scaleDistance(double s)
Scales all distance coordinates.
|
void |
scaleMass(double s)
Scales all mass units.
|
void |
setComputeLmDotFromLDot(boolean enable) |
void |
setFibreDamping(double d) |
void |
setIgnoreForceVelocity(boolean enable) |
void |
setIgnoreTendonCompliance(boolean enable)
Deprecated.
Use
setRigidTendon(boolean) instead. |
void |
setLength(double l) |
void |
setMaxContractionVelocity(double maxv) |
void |
setMaxIsoForce(double fmax) |
void |
setMuscleLength(double l) |
void |
setOptFibreLength(double l) |
void |
setOptPennationAngle(double ang) |
void |
setRigidTendon(boolean enable)
Set whether the tendon for this muscle material is rigid.
|
void |
setState(DataBuffer data)
Restores the state for this component by reading from the supplied
data buffer, starting at the current buffer offsets.
|
void |
setTendonSlackLength(double l) |
void |
writeActiveForceLengthCurve(java.lang.String fileName,
double x0,
double x1,
int npnts,
java.lang.String fmtStr) |
void |
writeForceVelocityCurve(java.lang.String fileName,
double a,
double x0,
double x1,
int npnts,
java.lang.String fmtStr) |
void |
writePassiveForceLengthCurve(java.lang.String fileName,
double x0,
double x1,
int npnts,
java.lang.String fmtStr) |
void |
writeTendonForceLengthCurve(java.lang.String fileName,
double x0,
double x1,
int npnts,
java.lang.String fmtStr) |
clone, equals, equals, getSubClasses
advanceState, createStateObject, getProperty, getPropertyHost, getPropertyInfo, hasProperty, hasSymmetricTangent, isWritable, postscan, scan, setPropertyHost, setPropertyInfo, symmetryOrStateChanged, updateMaterial, write, writeItems
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAuxVarDerivative, getAuxVarState, numAuxVars, setAuxVarState
public static boolean useNewtonSolver
public static boolean useFindLm
public boolean vmFromTendon
public static double DEFAULT_MAX_ISO_FORCE
public static double DEFAULT_OPT_FIBRE_LENGTH
public static double DEFAULT_TENDON_SLACK_LENGTH
public static double DEFAULT_OPT_PENNATION_ANGLE
public static double DEFAULT_MAX_CONTRACTION_VELOCITY
public static double DEFAULT_FIBRE_DAMPING
public static boolean DEFAULT_RIGID_TENDON
public static boolean DEFAULT_IGNORE_FORCE_VELOCITY
public static boolean DEFAULT_COMPUTE_LMDOT_FROM_LDOT
public static double DEFAULT_MUSCLE_LENGTH
public static PropertyList myProps
public boolean debug
public int getStateVersion()
HasNumericState
getStateVersion
in interface HasNumericState
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class MaterialBase
public double getMaxIsoForce()
public void setMaxIsoForce(double fmax)
public double getOptFibreLength()
public void setOptFibreLength(double l)
public double getTendonSlackLength()
public void setTendonSlackLength(double l)
public double getOptPennationAngle()
public void setOptPennationAngle(double ang)
public double getMaxContractionVelocity()
public void setMaxContractionVelocity(double maxv)
public double getFibreDamping()
public void setFibreDamping(double d)
public boolean getIgnoreTendonCompliance()
hasRigidTendon()
instead.public void setIgnoreTendonCompliance(boolean enable)
setRigidTendon(boolean)
instead.public boolean hasRigidTendon()
true
if the tendon is rigidpublic void setRigidTendon(boolean enable)
enable
- if true
, sets the tendon rigidpublic boolean getIgnoreForceVelocity()
public void setIgnoreForceVelocity(boolean enable)
public boolean getComputeLmDotFromLDot()
public void setComputeLmDotFromLDot(boolean enable)
public double getTendonLength()
public double getLength()
public void setLength(double l)
public double getMuscleLength()
public void setMuscleLength(double l)
public double fibreToMuscleLength(double lf)
lf
- fibre lengthpublic double computeF(double l, double ldot, double l0, double excitation)
computeF
in class AxialMaterial
l
- spring lengthldot
- spring length time derivativel0
- spring rest lengthexcitation
- excitation value (varying from 0 to 1)public double computePassiveF(double l, double ldot, double l0, double excitation)
public double computeVmFromLdot(double ldot)
public double initializeLmPrevFromLdot(double l, double ldot, double a)
public double computeLmWithConstantVm(double l, double vm, double a)
public double computeLmWithVmFromLm(double l, double ldot, double a, double h)
public double computeG(DoubleHolder dG, double l, double lm, double vm, double a, double h)
public double computeDFdl(double l, double ldot, double l0, double excitation)
computeDFdl
in class AxialMaterial
l
- spring lengthldot
- spring length time derivativel0
- spring rest lengthexcitation
- excitation value (varying from 0 to 1)public double computeDFdldot(double l, double ldot, double l0, double excitation)
computeDFdldot
in class AxialMaterial
l
- spring lengthldot
- spring length time derivativel0
- spring rest lengthexcitation
- excitation value (varying from 0 to 1)public boolean isDFdldotZero()
isDFdldotZero
in class AxialMaterial
public boolean hasState()
HasNumericState
true
if this component currently holds state. This
allows the presence of state to depend on the component's configuration.hasState
in interface HasMaterialState
hasState
in interface HasNumericState
hasState
in class MaterialBase
true
if this component holds statepublic void setState(DataBuffer data)
HasNumericState
setState
in interface HasNumericState
data
- buffer containing the state informationpublic void getState(DataBuffer data)
HasNumericState
getState
in interface HasNumericState
data
- buffer for storing the state values.public void advanceState(double t0, double t1)
HasNumericState
HasNumericState.requiresAdvance()
and HasNumericState.hasState()
both return true
, then this method is called each time step by the system integrator
to update this component's state. For single step integrators, the method
is called once at the start of the integration, with t0
and
t1
set to the step's start and end times. For multi-step
integrators (such as Runge Kutta), the method is called for each
sub-step, with t0
and t1
set to the sub-step's time
bounds. Multi-step integrators will also use HasNumericState.getState(maspack.util.DataBuffer)
and
HasNumericState.setState(maspack.util.DataBuffer)
to save and restore state as required.advanceState
in interface HasNumericState
t0
- beginning time associated with the time step or sub-stept1
- end time associated with the time step or sub-steppublic boolean requiresAdvance()
true
if the state of this component must be
updated each time step using HasNumericState.advanceState(double, double)
.requiresAdvance
in interface HasNumericState
true
if advanceState
must be calledpublic void writeActiveForceLengthCurve(java.lang.String fileName, double x0, double x1, int npnts, java.lang.String fmtStr) throws java.io.IOException
java.io.IOException
public void writePassiveForceLengthCurve(java.lang.String fileName, double x0, double x1, int npnts, java.lang.String fmtStr) throws java.io.IOException
java.io.IOException
public void writeTendonForceLengthCurve(java.lang.String fileName, double x0, double x1, int npnts, java.lang.String fmtStr) throws java.io.IOException
java.io.IOException
public void writeForceVelocityCurve(java.lang.String fileName, double a, double x0, double x1, int npnts, java.lang.String fmtStr) throws java.io.IOException
java.io.IOException
public void scaleDistance(double s)
ScalableUnits
scaleDistance
in interface ScalableUnits
scaleDistance
in class MaterialBase
s
- scaling factorpublic void scaleMass(double s)
ScalableUnits
scaleMass
in interface ScalableUnits
scaleMass
in class MaterialBase
s
- scaling factor