


GETB_HORIZ - compute the B matrix for the horizontal velocity of Pattyn's model
Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size numgrids*NDOF
For grid i, Bi can be expressed in the basic coordinate system by:
Bi_basic=[ dh/dx 0 ]
[ 0 dh/dy ]
[ 1/2*dh/dy 1/2*dh/dx ]
[ 1/2*dh/dz 0 ]
[ 0 1/2*dh/dz ]
where h is the interpolation function for grid i.
Usage:
B=GetB_horiz(pentaelem,xyz_list,gauss_coord)
See also GETBPRIME_HORIZ, CREATEKMATRIX

0001 function B=GetB_horiz(pentaelem,xyz_list,gauss_coord) 0002 %GETB_HORIZ - compute the B matrix for the horizontal velocity of Pattyn's model 0003 % 0004 % Compute B matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size numgrids*NDOF 0005 % For grid i, Bi can be expressed in the basic coordinate system by: 0006 % Bi_basic=[ dh/dx 0 ] 0007 % [ 0 dh/dy ] 0008 % [ 1/2*dh/dy 1/2*dh/dx ] 0009 % [ 1/2*dh/dz 0 ] 0010 % [ 0 1/2*dh/dz ] 0011 % where h is the interpolation function for grid i. 0012 % 0013 % Usage: 0014 % B=GetB_horiz(pentaelem,xyz_list,gauss_coord) 0015 % 0016 % See also GETBPRIME_HORIZ, CREATEKMATRIX 0017 0018 num_grids=6; 0019 NDOF2=2; 0020 0021 dh1dh6_basic=GetNodalFunctionsDerivativesBasic(pentaelem,xyz_list,gauss_coord); 0022 %Build B: 0023 B=zeros(5,NDOF2*num_grids); 0024 for i=1:num_grids, 0025 B(1,NDOF2*(i-1)+1)=dh1dh6_basic(1,i); 0026 B(1,NDOF2*(i-1)+2)=0; 0027 B(2,NDOF2*(i-1)+1)=0; 0028 B(2,NDOF2*(i-1)+2)=dh1dh6_basic(2,i); 0029 B(3,NDOF2*(i-1)+1)=dh1dh6_basic(2,i)/2; 0030 B(3,NDOF2*(i-1)+2)=dh1dh6_basic(1,i)/2; 0031 B(4,NDOF2*(i-1)+1)=dh1dh6_basic(3,i)/2; 0032 B(4,NDOF2*(i-1)+2)=0; 0033 B(5,NDOF2*(i-1)+1)=0; 0034 B(5,NDOF2*(i-1)+2)=dh1dh6_basic(3,i)/2; 0035 end