pub struct Load {
pub origin: f64,
pub end: f64,
pub magnitude: Box<dyn Fn(f64) -> f64>,
}Expand description
Load represents a non-reactive force applied to a beam. This could be the weight of some object being supported, like another beam a working load or anything else which acts directly on the beam. Loads are defined by three things:
- origin: relative position beyond which the force acts on the beam
- end: relative position where the force stops acting on the beam
- magnitude: a function which accepts a relative position as an argument and returns some value in units of force. ie f(x) = x * 2
Fields§
§origin: f64§end: f64§magnitude: Box<dyn Fn(f64) -> f64>Implementations§
Source§impl Load
impl Load
Sourcepub fn new(origin: f64, end: f64, magnitude: fn(x: f64) -> f64) -> Load
pub fn new(origin: f64, end: f64, magnitude: fn(x: f64) -> f64) -> Load
Takes a start point, end point (relative to the beam) and a function the function can be any function which takes a location on the beam ie the x variable, and returns a number (the magnitude of the load)
Sourcepub fn point(location: f64, magnitude: f64) -> Load
pub fn point(location: f64, magnitude: f64) -> Load
convenience function to allow quick definition of point loads. Point loads are the same as concentrated loads, or a force acting on a beam which is located at a single point. If the beam is supporting another beam joined by a pin, the force caused by the weight of the supported beam would be an example of a point load. Arguments:
- location: relative position on the beam where weight is concentrated
- magnitude: weight or force applied.
Sourcepub fn distributed(origin: f64, end: f64, magnitude: f64) -> Load
pub fn distributed(origin: f64, end: f64, magnitude: f64) -> Load
Convenience function to allow quick definition of distributed loads. Distributed loads refer to weight which is uniformly distributed across all or part of the beam. Supported objects with a wide contact area with the supporting beam could be modeled as a distributed load. Arguments:
- origin: starting point relative to the beam in units of length
- end: end point of the load
- magnitude: the unit force per unit length (ie 1 pound per foot)