Examples overview
These pages are runnable: every code block is executed when the documentation is built, so the printed results are what MuesliMaterials.jl actually returns.
- Tensors and vectors — the
Ivector,Itensor,IstensorandItensor4types, how they map onto Julia arrays, and how to convert between them. - Small strain materials — building a material, driving a material point, and reading stresses, tangents and energies.
- Finite strain materials — hyperelasticity, the different stress measures, and how they relate to one another.
Conventions used throughout
Most names need qualifying. Only the tensor types and a few materials are exported, so the examples either write MuesliMaterials.stress! or import what they need:
using MuesliMaterialsusing MuesliMaterials: stress!, tangentTensor!, updateCurrentState, storedEnergyMaterials and material points are separate. A material carries the parameters; a material point carries the state. Build one material and as many points from it as you have quadrature points.
material = ElasticIsotropicMaterial(210000.0, 0.3)mp = ElasticIsotropicMP(material)Output tensors are preallocated. Bang methods write into a tensor you supply, which is what MUESLI's out-parameter interface expects:
updateCurrentState(mp, 1.0, Istensor([0.001 0.0 0.0; 0.0 0.0 0.0; 0.0 0.0 0.0]))σ = Istensor()stress!(mp, σ)σMuesliMaterials.IstensorAllocated with 3x3 entries
282.69230769230774 0.0 0.0
0.0 121.15384615384616 0.0
0.0 0.0 121.15384615384616
Tensors behave like arrays. Indexing, iteration and convert all work, so a result can be handed straight to ordinary Julia code:
σ[1, 1], sum(σ[i, i] for i in 1:3)(282.69230769230774, 525.0000000000001)