Creating multiple matricies for finite element approach
1 次查看(过去 30 天)
显示 更早的评论
I am trying to find displacements for a 4 node quad element. For example I am trying with a specimen with 2 vertical divisions and 2 horizontal divisions.
I need to assemble the displacements for each element so that they form in an anti clockwise order.
As I have vertical and horizontal components at each node there will be 2 points at each node totalling 18 points. as such:
13/14 15/16 17/18
7/8 9/10 11/12
1/2 3/4 5/6
where I have placed the numbers is essentialy a corner of an element
So element 1 will be a vector with 8 nodes - (1,2,3,4,9,10,7,8)
So element 2 will be a vector with 8 nodes - (3,4,5,6,11,12,9,10)
So element 3 will be a vector with 8 nodes - (7,8,9,10,15,16,13,14)
So element 4 will be a vector with 8 nodes - (9,10,11,12,17,18,15,16)
I need a way to automatically create multiple matricies(in this case 4 to represent the displacements in an anti clockwise order)
I was thinking some kind of loop where for example nx =number of elements along x-axis and ny = number of elements along y-axis (ie this case the both = 2) Then I can use:
for i=1:nx*ny
x(1:4)=z(i:i+3)
x(5:6)=z(i+(nx*3)+2:i+(nx*3)+5)
x(7:8)=z(i+(nx*2)+2:i+(nx*2)+5)
end
I have 2 problems this code:
It only works for element one, I need a code that will automatically number the displacements so that they appear in order as shown below, also adapatable for different values of nx/ny
If I enter x Out side of the loop I need multiple outputs.
For this example I need 4 vectors with 8 values in the orders shown below.
It is essentialy so I can multiply these values by my B matrix to get the strains but they have to be in anticlockwise order for this to be correct.
Thankyou in advance
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Numerical Integration and Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!