BMesh.Bmesh
— TypeSupertype for BMesh2D and BMesh3D
BMesh.Bmesh2D
— TypeBasic structure for 2D meshes
Bmesh2D(etype::Symbol,nn::Int64,ne::Int64,coord::Matrix{Float64},connect::Matrix{Int64},
Lx::Float64, Ly::Float64, nx::Int64, ny::Int64)
where:
etype = :truss2D or :solid2D
nn = number of nodes
ne = number of elements
coord = nn x 2 matrix with nodal coordinates (x y)
connect = ne x {2,4} matrix with element connectivities. 2 for :truss2D and 4 for :solid2D
Lx = horizontal (X) length (if using a rectangular domain)
nx = number of divisions (elements) in the horizontal direction
Ly = vectival (Y) length (if using a rectangular domain)
ny = number of divisions (elements) in the vertical direction
BMesh.Bmesh3D
— TypeBasic structure for 3D meshes
Bmesh3D(etype::Symbol,nn::Int64,ne::Int64,coord::Matrix{Float64},connect::Matrix{Int64},
Lx::Float64, Ly::Float64, Lz::Float64,nx::Int64, ny::Int64, nz::Int64)
where:
etype = :truss2D or :solid2D
nn = number of nodes
ne = number of elements
coord = nn x 3 matrix with nodal coordinates (x y z)
connect = ne x {2,8} matrix with element connectivities. 2 for :truss3D and 8 for :solid3D
Lx = horizontal (X) length (if using a cubic domain)
nx = number of divisions (elements) in the horizontal X direction
Ly = horizontal (Y) length (if using a cubic domain)
ny = number of divisions (elements) in the horizontal Y direction
Lz = vertical (Z) length (if using a cubic domain)
nz = number of divisions (elements) in the vertical direction
BMesh.Rotation
— TypeRotation
Supertype for Rotation2D and Rotation3D
BMesh.Rotation2D
— TypeRotation2D
Rotation2D(bmesh::Bmesh3D, ele::Int64, α=0.0)
Evaluate the director cossines for element ele.
BMesh.Rotation3D
— TypeStructure containing the director cossines and length for each element
Rotation3D
Rotation3D(bmesh::Bmesh3D, ele::Int64, α=0.0)
Evaluate the director cossines for element ele. α is the additional rotation for the local reference system.
BMesh.Bmesh_solid_2D
— MethodGenerate a 2D background mesh for 4-node solid (planar) elements (:solid2D)
Bmesh_solid_2D(Lx::Float64, nx::Int64, Ly::Float64, ny::Int64)
where
Lx = length in X (horizonal direction)
nx = number of divisions (elements) in X
Ly = lenght in Y (vertical direction)
ny = number of divisions (elements) in Y
returns
Bmesh2D(:solid2D,nn,ne,coord,connect,Lx,Ly, nx,ny)
where
nn = number of nodes
ne = number of elements
coord = matrix nn x 2 with nodal coordinates (x y)
connect = matrix ne x 4 with connectivities
BMesh.Bmesh_solid_3D
— MethodGenerate a 3D background mesh for 8-node solid elements (:solid3D)
Bmesh_solid_3D(Lx::Float64,nx::Int64,Ly::Float64,ny::Int64,Lz::Float64,nz::Int64)
where
Lx = length in X (horizonal direction)
nx = number of divisions (elements) in X
Ly = length in Y (horizonal direction)
ny = number of divisions (elements) in Y
Lz = lenght in Z (vertical direction)
nz = number of divisions (elements) in Z
returns
Bmesh3D(:solid3D,nn,ne,coord,connect,Lx,Ly,Lz,nx,ny,nz)
where
nn = number of nodes
ne = number of elements
coord = matrix nn x 3 with nodal coordinates (x y z)
connect = matrix ne x 8 with connectivities.
Nodes are generated plane by plane, from z=0 to z=Lz. Connectivities follow the same pattern.
BMesh.Bmesh_truss_2D
— MethodGenerate a 2D background mesh for :truss2D elements
Bmesh_truss_2D(Lx::Float64, nx::Int64, Ly::Float64, ny::Int64)
where
Lx = length in X (horizonal direction)
nx = number of divisions (elements) in X
Ly = lenght in Y (vertical direction)
ny = number of divisions (elements) in Y
returns
Bmesh2D(:truss2D,nn,ne,coord,connect,Lx,Ly, nx,ny)
where
nn = number of nodes
ne = number of elements
coord = matrix nn x 2 with nodal coordinates (x y)
connect = matrix ne x 2 with connectivities
Nodes are created from bottom left (0,0) to bottom right (0,Lx),row by row. Horizontal elements are generated first, followed by vertical, diagonal / and then the other diagonals.
BMesh.Bmesh_truss_3D
— FunctionGenerate a 3D background mesh for truss:3D elements
Bmesh_truss_3D(Lx::Float64,nx::Int64,Ly::Float64,ny::Int64,Lz::Float64,nz::Int64)
where
Lx = length in X (horizonal direction)
nx = number of divisions (elements) in X
Ly = length in Y (horizonal direction)
ny = number of divisions (elements) in Y
Lz = lenght in Z (vertical direction)
nz = number of divisions (elements) in Z
returns
Bmesh3D(:truss3D,nn,ne,coord,connect,Lx,Ly,Lz,nx,ny,nz)
where
nn = number of nodes
ne = number of elements
coord = matrix nn x 3 with nodal coordinates (x y z)
connect = matrix ne x 2 with connectivities.
Nodes are generated plane by plane, from z=0 to z=Lz. Connectivities follow the same pattern.
BMesh.Connect
— MethodReturn the connectivities of element ele
Connect(bmesh::Bmesh,ele::Int64)
as an Int64 vector.
BMesh.Coord
— MethodReturn the coordinates of node
Coord(bmesh::Bmesh2D,node::Int64)
as a vector [x;y]
BMesh.Coord
— MethodReturn the coordinates of node
Coord(bmesh::Bmesh3D,node::Int64)
as a vector [x;y;z]
BMesh.DOFs
— MethodReturn a 2*n vector with the global DOFs of element ele
DOFs(bmesh::Bmesh2D,ele::Int64)
where n is the number of nodes of ele.
BMesh.DOFs
— MethodReturn a 3*n vector with the global DOFs of element ele
DOFs(bmesh::Bmesh3D,ele::Int64)
where n is the number of nodes of ele.
BMesh.Length
— MethodReturn the distance between two nodes of the element
Length(bmesh::Bmesh,ele::Int64;nodes=(1,2))
where the default is the distance between (local) nodes 1 and 2
BMesh.Rotations
— FunctionRotation
Rotations(bmesh::Bmesh, ele::Int64, α=0.0)
General driver for Rotation. It deploys the correct method for either 2D or 3D problems.
BMesh.T_matrix
— FunctionEvaluate the rotation matrix T that maps from global to local reference systems. This version evaluates Rotaion internally.
T_matrix(bmesh::Bmesh, ele::Int64, α=0.0)
BMesh.T_matrix
— MethodEvaluate the rotation matrix T that maps from global to local reference systems
T_matrix(r::Rotation2D)
BMesh.T_matrix
— MethodEvaluate the rotation matrix T that maps from global to local reference systems
T_matrix(r::Rotation3D)
RecipesBase.plot
— MethodPlot the background mesh (2D)
plot(bmesh::Bmesh2D; name="" )
A png file "name.png" is generated if name is not empty.
RecipesBase.plot
— MethodPlot the background mesh (3D)
plot(bmesh::Bmesh3D; name="" )
A png file "name.png" is generated if name is not empty.