Setting up and accessing your problem with a StaticSetup.
SimpleStatics.StaticSetup
— TypeStaticSetup(T::Type=Float64)
Create a blank StaticSetup where data is stored in type T. Measurement types are supported and tested for. Unitful types should be supported, but tests haven't been written for them yet. (todo)
SimpleStatics.add_force!
— MethodAdd a force to the joint, in Newtons.
SimpleStatics.add_joint!
— MethodAdd a joint to the setup and return the index referring to that joint. The position should be set in meters.
SimpleStatics.add_member!
— MethodAdd a member to the setup and return the index referring to that member.
SimpleStatics.add_member_weights!
— Methodadd_member_weights!(setup::StaticSetup)
Add the weights that each ALL members exert on the setup as forces to their corresponding nodes.
- Note that nothing is checking if this function is being called multiple times, if you accidentally call this function twice, members will just act like they're twice as heavy.
SimpleStatics.constrained_array
— MethodConstruct a view of an array where constrained indices, indicated by a mapping, are removed. This is useful for solving matrices as zero rows will cause det(M)==0.
SimpleStatics.constrained_dof_array_mapping
— MethodFind a mapping m[i] -> j where i is the index of a constrained dof array and j is the corresponding index of the unconstrained array.
SimpleStatics.dof_indices
— MethodGet the indices of the x and y rows, respectively, in a square DOF-like matrix (e.g., global stiffness matrix) for a vertex (joint) index.
SimpleStatics.force_vector
— MethodGet a vector of the unconstrained forces in the setup.
SimpleStatics.global_stiffness_matrix
— MethodGet the stiffness matrix of the entire setup
with respect to the global coordinate system.
SimpleStatics.joint_ids
— MethodGet an iterator which traverses through all joint ids.
SimpleStatics.mass
— MethodGet the mass, in kg, of a member by its member id.
SimpleStatics.member_angle
— MethodGet the angle, in radians, the member makes with the global coordinate system's positive X axis.
SimpleStatics.member_ids
— MethodGet an iterator which traverses through all member ids.
SimpleStatics.member_stiffness_matrix
— MethodGet the global stiffness matrix for a StaticSetup in Newtons / Meter.
SimpleStatics.n_dofs
— MethodNaive number of dergees of freedom in the system (i.e., before constraints).
SimpleStatics.n_joints
— MethodGet the total number of joints.
SimpleStatics.n_members
— MethodGet the total number of members.
SimpleStatics.original_array
— MethodRecover the original array where DOF indices will match with the StaticSetup.
SimpleStatics.set_force!
— MethodSet the force at a joint, in Newtons.
SimpleStatics.terminal_joints
— MethodGet the joints IDs that a member connects, found by its member ID.
SimpleStatics.weight
— MethodGet the weight, in Newtons, of a member by its member id.
Available Constraint
SimpleStatics.AnchorConstraint
— TypeCompletely restrictive constraint that restricts all movement.
SimpleStatics.NoConstraint
— TypeDefault constraint that restricts no movement.
SimpleStatics.XRollerConstraint
— TypeRestricts movement along the vertical axis only, permitting horizontal movement.
SimpleStatics.YRollerConstraint
— TypeRestricts movement along the vertical axis only, permitting horizontal movement.
Available Solvers
SimpleStatics.equilibrium_positions
— Methodequilibrium_positions(setup, displacements)
Given a setup and its displacements, calculate the equilibrium positions of all of the joints. Returned indices match joint indices.
SimpleStatics.solve_displacements
— Methodsolve_displacements(setup)
Solve the distances that each joint moves to keep the system stationary. The results of this function are necessary for most other properties that can be calculated.
SimpleStatics.solve_member_forces
— Methodsolve_member_forces(setup, displacements)
Using already calculated displacements
, determine the forces in Newtons that each member undergoes when at equilibrium. Compressive forces are negative and tensile forces are *positive, indexes match member ids.
SimpleStatics.solve_member_stresses
— MethodGet the stresses exerted on each member, in Pa. Sign conventions are the same as in solve_member_forces
.
SimpleStatics.solve_reaction_forces
— Methodsolve_reaction_forces(setup, displacements)
Using already calculated displacements
, find the forces that each constrained node needs to keep the system stationary.
SimpleStatics.solve_stress_utilization
— Methodsolve_stress_utilization(setup, stresses)
Calculate how close each member is to its yield strength, where 0 is no stress and 1 is right at the yield point of the member.
- Stresses can be calculated via
solve_member_stresses
.
Material Properties
SimpleStatics.StaticMaterial
— MethodStaticMaterial(area, modulus, [yield=Inf], [density=0.0])
Create a new material for use in a statics problem with a... - area: Cross sectional area in square meters. - modulus: Elastic (Youngs) modulus in pa i.e., N/m^2. - yield: Yield strength (same units as modulus), used primarily when approximating structure failure and safety ratings. - density: Material density in g/cm3, used primarily to calculate self-loading and structure mass.
SimpleStatics.mass
— MethodCalculate the mass of a material in kg given its length in meters.
SimpleStatics.weight
— MethodCalculate how much a given length of the material weighs, in Newtons. Optionally, gravity can be specified in m/s2.
Materials
SimpleStatics.Materials.CircularTubing
— MethodCircularTubing(material::Function, outerdiameterm, thickness_m)
Create a pipe-like material from another raw material, i.e., a material function that accepts only an area.
E.g.,
```
large_steel_pipe = Materials.CircularTubing(Materials.MildSteel, 1.5 * 0.0381, 1.897 / 1000) # 1.5" diameter steel pipe with 14 gauge thickness
small_steel_pipe = Materials.CircularTubing(Materials.MildSteel, 1.0 * 0.0381, 1.518 / 1000) # 1.0" diameter steel pipe with 16 gauge thickness
```
SimpleStatics.Materials.MildSteel
— MethodCreate a mild steel member with a given cross section (in m^2).
SimpleStatics.Materials.PVC
— MethodCreate a PVC member with a given cross section (in m^2).
SimpleStatics.Materials.PerfectMaterial
— MethodIdeal material with no mass, a massive cross section, and unrealistically high strength.
SimpleStatics.Materials.Pine
— MethodCreate a pine member with a given cross section (in m^2).
SimpleStatics.Materials.Pine2x4
— MethodCreate a standard pine 2x4 member.
SimpleStatics.Materials.SquareTubing
— MethodSquareTubing(material::Function, outer_length_m, thickness_m)
Create a square tubing material from another raw material, i.e., a material function that accepts only an area. E.g., large_steel_beam = Materials.SquareTubing(Materials.MildSteel, 1.5 * 0.0381, 1.897 / 1000) # 1.5" steel tubing with 14 gauge thickness small_steel_beam = Materials.SquareTubing(Materials.MildSteel, 1.0 * 0.0381, 1.518 / 1000) # 1.0" steel tubing with 16 gauge thickness
SimpleStatics.Materials.StainlessSteel
— MethodCreate a stainless steel member with a given cross section (in m^2).
SimpleStatics.Materials.Tungsten
— MethodCreate a tungsten member with a given cross section (in m^2).
Visualization
SimpleStatics.plot_setup
— Functionplot_setup(setup, [name]; [dsize=800, padding, displacements, stresses, reactions])
Arguments
setup::StaticSetup
: The setup to plot.name::String
: The filename or path (without extension) of the image to be created. If unspecified, image will be returned but not saved.dsize::Integer
: The diagonal pixel size of the image. The actual width and height will depend on the setup being plotted.padding::Float64
: The amount of extra distance to include on the border of the setup boundaries. 0 padding will make the image as small as possible, and you will likely lose details as they go off of the screen. Default is 0.4.
Additional details that can be included.
displacements
: Previously calculated displacements usingsolve_displacements
.member_forces
: Previously calculated member forces usingsolve_member_forces
.reactions
: Previously calculated reaction forces usingsolve_reaction_forces
.
Helper Functions
SimpleStatics.UnorderedPair
— TypeCreate a pair of items whose order is independent in hashes, equality, and comparisons.
Index
SimpleStatics.AnchorConstraint
SimpleStatics.NoConstraint
SimpleStatics.StaticMaterial
SimpleStatics.StaticSetup
SimpleStatics.UnorderedPair
SimpleStatics.XRollerConstraint
SimpleStatics.YRollerConstraint
SimpleStatics.Materials.CircularTubing
SimpleStatics.Materials.MildSteel
SimpleStatics.Materials.PVC
SimpleStatics.Materials.PerfectMaterial
SimpleStatics.Materials.Pine
SimpleStatics.Materials.Pine2x4
SimpleStatics.Materials.SquareTubing
SimpleStatics.Materials.StainlessSteel
SimpleStatics.Materials.Tungsten
SimpleStatics.add_force!
SimpleStatics.add_joint!
SimpleStatics.add_member!
SimpleStatics.add_member_weights!
SimpleStatics.constrained_array
SimpleStatics.constrained_dof_array_mapping
SimpleStatics.dof_indices
SimpleStatics.equilibrium_positions
SimpleStatics.force_vector
SimpleStatics.global_stiffness_matrix
SimpleStatics.joint_ids
SimpleStatics.mass
SimpleStatics.mass
SimpleStatics.member_angle
SimpleStatics.member_ids
SimpleStatics.member_stiffness_matrix
SimpleStatics.n_dofs
SimpleStatics.n_joints
SimpleStatics.n_members
SimpleStatics.original_array
SimpleStatics.plot_setup
SimpleStatics.set_force!
SimpleStatics.solve_displacements
SimpleStatics.solve_member_forces
SimpleStatics.solve_member_stresses
SimpleStatics.solve_reaction_forces
SimpleStatics.solve_stress_utilization
SimpleStatics.terminal_joints
SimpleStatics.weight
SimpleStatics.weight