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

◆ Mesh23()

Sub Mesh23 ( Nx As  Long,
Ny As  Long,
X() As  Double,
Y() 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 
)

Generates simple rectangular mesh for FEM (2D) (Triangular element) [Experimental version]

Purpose
This routine generates the simple rectangular mesh for FEM. (2D) (triangular element)
Parameters
[in]NxNumber of grids in the X-direction. (Nx > 0)
[in]NyNumber of grids in the Y-direction. (Ny > 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]Knc()Array Knc(LKnc1 - 1, LKnc2 - 1) (LKnc1 >= 4, LKnc2 >= Ne)
Connection matrix: Knc(0, K-1) is the type of element K (= 2: 3-node triangle), Knc(1, K-1), ..., Knc(3, K-1) point to the nodes of element K.
[out]Ks()Array Ks(LKs1 - 1, LKs2 - 1) (LKs1 >= 3, LKs2 >= Nb2)
Connection matrix of boundary sides: Ks(0, K-1) is the type of boundary element K (= 1: 2-node line element), Ks(1, K-1) and Ks(2, K-1) point to the nodes of boundary element K.
[out]Lb()Array Lb(LLb - 1) (LLb >= Nb)
Boundary side label.
= 1: front. (y = 0)
= 2: right. (x = 1)
= 3: back. (y = 1)
= 4: left. (x = 0)
[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))
[out]Ne(Optional)
Number of elements. (= 2*Nx*Ny)
[out]Nb(Optional)
Number of boundary sides. (= 2*(Nx + Ny))
[in]Sclx(Optional)
Scale factor of x-coordinates. (default = 1)
[in]Scly(Optional)
Scale factor of y-coordinates. (default = 1)