XLPack 7.0
XLPack Numerical Library (Excel VBA) Reference Manual
Loading...
Searching...
No Matches

◆ Mesh34()

Sub Mesh34 ( Nx As  Long,
Ny As  Long,
Nz As  Long,
X() As  Double,
Y() As  Double,
Z() As  Double,
Knc() As  Long,
Ks() As  Long,
Lb() As  Long,
Optional Info As  Long,
Optional N As  Long,
Optional Ne As  Long,
Optional Nb As  Long,
Optional Sclx As  Double = 1,
Optional Scly As  Double = 1,
Optional Sclz As  Double = 1 
)

Generates simple rectangular mesh for FEM (3D) (4-node tetrahedral element) [Experimental version]

Purpose
This routine generates the simple rectangular mesh for FEM. (3D) (4-node tetrahedral element)
Parameters
[in]NxNumber of grids in the X-direction. (Nx > 0)
[in]NyNumber of grids in the Y-direction. (Ny > 0)
[in]NzNumber of grids in the Z-direction. (Nz > 0)
[out]X()Array X(LX - 1) (LX >= N)
X-coordinates of nodes.
[out]Y()Array Y(LY - 1) (LY >= N)
Y-coordinates of nodes.
[out]Z()Z(LZ - 1) As Double (LZ >= N) Z-coordinates of nodes
[out]Knc()Array Knc(LKnc1 - 1, LKnc2 - 1) (LKnc1 >= 5, LKnc2 >= Ne)
Connection matrix: Knc(0, K-1) is the type of element K (= 4: 4-node tetrahedron), Knc(1, K-1), ..., Knc(4, K-1) point to the nodes of element K.
[out]Ks()Array Ks(LKs1 - 1, LKs2 - 1) (LKs1 >= 4, LKs2 >= Nb)
Connection matrix of boundary sides: Ks(0, K-1) is the type of boundary element K (=2: 3-node triangle), Ks(1, K-1), ..., Ks(3, K-1) point to the nodes of boundary element K.
[out]Lb()Array Ks(LLb - 1) (LLb >= Nb)
Boundary side label.
= 1: front. (y = 0)
= 2: right. (x = 1)
= 3: back. (y = 1)
= 4: left. (x = 0)
= 5: bottom. (z = 0)
= 6: top. (z = 1)
[out]Info(Optional)
= 0: Successful exit
= i < 0: The (-i)-th argument is invalid.
[out]N(Optional)
Total number of nodes. (= (Nx + 1)*(Ny + 1)*(Nz + 1))
[out]Ne(Optional)
Number of elements. (= 5*Nx*Ny*Nz)
[out]Nb(Optional)
Number of boundary sides. (= 4*(Nx*Ny + Ny*Nz + Nz*Nx))
[in]Sclx(Optional)
Scale factor of x-coordinates. (default = 1)
[in]Scly(Optional)
Scale factor of y-coordinates. (default = 1)
[in]Sclz(Optional)
Scale factor of z-coordinates. (default = 1)