


GETLPRIMESTOKES - compute Lprime matrix for stokes diagnostic
Compute Lprime matrix. Lprime=[Lp1 Lp2 Lp3] where Lpi is square and of size numdof.
For grid i, Lpi can be expressed in the basic coordinate system by:
Lpi_basic=[ h 0 0 0]
[ 0 h 0 0]
[ h 0 0 0]
[ 0 h 0 0]
[ 0 0 h 0]
[ 0 0 h 0]
[ 0 0 dh/dz 0]
[ 0 0 dh/dz 0]
[ 0 0 dh/dz 0]
[dh/dz 0 dh/dx 0]
[ 0 dh/dz dh/dy 0]
[ 0 0 0 h]
[ 0 0 0 h]
[ 0 0 0 h]
where h is the interpolation function for grid i.
Usage:
Lprime=GetLprimeStokes(triaelem,xyz_list,gauss_coord_tria,gauss_coord_penta)
See also GETLSTOKES, GETL, CREATEKMATRIX

0001 function Lprime=GetLprimeStokes(triaelem,xyz_list,gauss_coord_tria,gauss_coord_penta) 0002 %GETLPRIMESTOKES - compute Lprime matrix for stokes diagnostic 0003 % 0004 % Compute Lprime matrix. Lprime=[Lp1 Lp2 Lp3] where Lpi is square and of size numdof. 0005 % For grid i, Lpi can be expressed in the basic coordinate system by: 0006 % Lpi_basic=[ h 0 0 0] 0007 % [ 0 h 0 0] 0008 % [ h 0 0 0] 0009 % [ 0 h 0 0] 0010 % [ 0 0 h 0] 0011 % [ 0 0 h 0] 0012 % [ 0 0 dh/dz 0] 0013 % [ 0 0 dh/dz 0] 0014 % [ 0 0 dh/dz 0] 0015 % [dh/dz 0 dh/dx 0] 0016 % [ 0 dh/dz dh/dy 0] 0017 % [ 0 0 0 h] 0018 % [ 0 0 0 h] 0019 % [ 0 0 0 h] 0020 % where h is the interpolation function for grid i. 0021 % 0022 % Usage: 0023 % Lprime=GetLprimeStokes(triaelem,xyz_list,gauss_coord_tria,gauss_coord_penta) 0024 % 0025 % See also GETLSTOKES, GETL, CREATEKMATRIX 0026 0027 numdof=4; 0028 num_grids=3; 0029 0030 %Get l1l2l3 in basic coordinate system: 0031 l1l2l3=GetNodalFunctions(triaelem,gauss_coord_tria); 0032 dh1dh6=GetNodalFunctionsDerivativesBasic(pentaelem,xyz_list,gauss_coord_penta); 0033 0034 %Build Lprime: 0035 Lprime=zeros(12,numdof*num_grids); 0036 0037 for i=1:num_grids, 0038 Lprime(1,numdof*(i-1)+1)=l1l2l3(i); 0039 Lprime(2,numdof*(i-1)+2)=l1l2l3(i); 0040 Lprime(3,numdof*(i-1)+1)=l1l2l3(i); 0041 Lprime(4,numdof*(i-1)+2)=l1l2l3(i); 0042 Lprime(5,numdof*(i-1)+3)=l1l2l3(i); 0043 Lprime(6,numdof*(i-1)+3)=l1l2l3(i); 0044 Lprime(7,numdof*(i-1)+3)=dh1dh6(3,i); 0045 Lprime(8,numdof*(i-1)+3)=dh1dh6(3,i); 0046 Lprime(9,numdof*(i-1)+3)=dh1dh6(3,i); 0047 Lprime(10,numdof*(i-1)+3)=dh1dh6(1,i); 0048 Lprime(10,numdof*(i-1)+1)=dh1dh6(3,i); 0049 Lprime(11,numdof*(i-1)+3)=dh1dh6(2,i); 0050 Lprime(11,numdof*(i-1)+2)=dh1dh6(3,i); 0051 Lprime(12,numdof*(i-1)+4)=l1l2l3(i); 0052 Lprime(13,numdof*(i-1)+4)=l1l2l3(i); 0053 Lprime(14,numdof*(i-1)+4)=l1l2l3(i); 0054 0055 %other terms are 0 0056 end