LMesh.jl
*Basic building block for other codes *
Basic types
LMesh.Mesh
— TypeSupertype for Mesh2D and Mesh3D
LMesh.Mesh2D
— TypeBasic structure for 2D Meshes
Mesh2D(bmesh::Bmesh2D,materials::Vector{Material}, geometries::Vector{Geometry},hebc::Matrix{Int64}, nbc::Matrix{Float64} ; matele = Int64[], geoele = Int64[], options=Dict{Symbol,Matrix{Float64}}())
where <br/>
bmesh = Background mesh (2D) <br/>
materials = Vector with Materials definitions
geometries = Vector with Geometries definitions
hebc = Matrix with homogeneous essential boundary conditions
nbc = Matrix with natural boundary conditions
mat_ele = Vector linking each element to a given material
geo_ele = Vector linking each element to a given geometry
options = Dictionary with optional data
LMesh.Mesh3D
— TypeBasic structure for 3D Meshes
Mesh3D(bmesh::Bmesh3D,materials::Vector{Material}, geometries::Vector{Geometry},hebc::Matrix{Int64}, nbc::Matrix{Float64} ; matele = Int64[], geoele = Int64[], options=Dict{Symbol,Matrix{Float64}}())
where
bmesh = Background mesh (3D)
materials = Vector with Materials definitions
geometries = Vector with Geometries definitions
hebc = Matrix with homogeneous essential boundary conditions
nbc = Matrix with natural boundary conditions
mat_ele = Vector linking each element to a given material
geo_ele = Vector linking each element to a given geometry
options = Dictionary with optional data
Iterator
Base.iterate
— FunctionIterator for Mesh. Iterates from 1 to the number of elements in the mesh. To be used in loops like for ele in m ... end
Material
LMesh.Material
— TypeBasic structure to store material data
Material(;Ex=1.0,νxy=0.0, α_T=0.0, density=1.0, model=:EPT,
limit_stress=1.0,
custom=[1.0 1.0 ; 1.0 1.0])
where all inputs are named.
Ex = Young's mudule (in X) [Pa] νxy = Poisson's ratio αT = Thermal expansion 1/Temperature density = material density [Kg/m³] model = 2D elasticity (:EPT or :EPD) or :Custom limitstress = limit stress (von-Mises criteria) [Pa]
Custom is a custom constitutive Matrix given by the user.
Geometry
LMesh.Geometry
— TypeBasic structure to store geometrical data
Geometry(;A=1.0,thickness=1.0)
where all inputs are named.
Base
LMesh.Free_DOFs
— FunctionReturn a vector with all the free (not constrained) DOFs in the mesh. This function is used to build Mesh.free_dofs
Free_DOFs(bmesh::Bmesh2D,nhebc::Int64,hebc::Matrix{Int64},loadcase::Int64)
where
bmesh = background mesh nhebc = number of essential boundary conditions hebc = matrix with essential boundary condition data loadcase = the load case to consider
Return a vector with all the free (not constrained) DOFs in the mesh. This function is used to build Mesh.free_dofs
Free_DOFs(bmesh::Bmesh3D,nhebc::Int64,hebc::Matrix{Int64},loadcase::Int64)
where
bmesh = background mesh nhebc = number of homogeneous essential boundary conditions hebc = matrix with homogeneous essential boundary condition data loadcase = the load case to consider
BMesh.Nodal_coordinates
— Function(Overloaded from BMesh) Return vectors x and y with the nodal coordinates of element ele
Nodal_coordinates(mesh::Mesh2D,ele::Int64)
where mesh is a 2D Mesh and ele a valid element.
(Overloaded from BMesh) Return vectors x, y and z with the nodal coordinates of element ele
Nodal_coordinates(mesh::Mesh3D,ele::Int64)
where mesh is a 3D Mesh and ele a valid element.
BMesh.Centroid
— Function(Overloaded from BMesh) Return a vector with the centroidal coordinates of element ele
Centroid(mesh::Mesh2D,ele::Int64)
Return a vector with the centroidal coordinates of element ele
Centroid(mesh::Mesh3D,ele::Int64)
LMesh.Get_dim
— FunctionReturn 2 for 2D problems and 3 for 3D problems
Get_dim(mesh::Mesh)
LMesh.Get_etype
— FunctionReturn element type
Get_etype(mesh::Mesh)
LMesh.Get_eclass
— FunctionReturn truss or solid
Get_eclass(mesh::Mesh)
LMesh.Get_material_number
— FunctionMaterial number for element ele
Get_material(mesh::Mesh,ele::Int64)
LMesh.Get_material
— FunctionMaterial data for element ele
Get_material(mesh::Mesh,ele::Int64)
LMesh.Get_geometry_number
— FunctionGeometry number for element ele
Getgeometrynumber(mesh::Mesh,ele::Int64)
LMesh.Get_geometry
— FunctionGeometry data for element ele
Get_geometry(mesh::Mesh,ele::Int64)
LMesh.Get_ne
— FunctionNumber of elements in this mesh
Get_ne(mesh::Mesh)
LMesh.Get_nn
— FunctionNumber of nodes in this mesh
Get_nn(mesh::Mesh)
Overloaded from BMesh
BMesh.Connect
— Function(Overloaded from BMesh) Return the connectivities of element ele
Connect(mesh::Mesh,ele::Int64)
as an Int64 vector.
BMesh.Coord
— Function(Overloaded from BMesh) Return the coordinates of node
Coord(mesh::Mesh,node::Int64)
as a vector [x;y;(z)]
BMesh.Length
— Function(Overloaded from BMesh) Return the distance between two nodes of the element
Length(mesh::Mesh,ele::Int64;nodes=(1,2))
where the default is the distance between (local) nodes 1 and 2
BMesh.DOFs
— Function(Overloaded from BMesh) Return a dim*n vector with the global DOFs of element ele
DOFs(mesh::Mesh,ele::Int64)
where n is the number of nodes of ele and dim=2 or 3.
BMesh.T_matrix
— Function(Overloaded from BMesh) Evaluate the rotation matrix T that maps from global to local reference systems. This version evaluates Rotation internally.
T_matrix(mesh::Mesh, ele::Int64, α=0.0)
Plot
RecipesBase.plot
— FunctionOverload plot to show the mesh and boundary conditions. Just for truss elements.
plot(mesh::Mesh2D; name="", factor=6.0)
factor is used to scale arrows to a fraction of the total dimension.