GetBprimeStokes

PURPOSE ^

GETBPRIMESTOKES - computes the Bprime matrix for Stokes' diagnostic

SYNOPSIS ^

function Bprime=GetBprimeStokes(pentaelem,xyz_list,gauss_coord)

DESCRIPTION ^

GETBPRIMESTOKES - computes the Bprime matrix for Stokes' diagnostic

   Compute B'  matrix. B'=[B1' B2' B3' B4' B5' B6' Bb'] where Bi' is of size 3*NDOF2. 
   For grid i, Bi' can be expressed in the basic coordinate system by:
   Bi_basic'=[ dh/dx   0          0       0]
             [   0      dh/dy      0       0]
             [   0      0         dh/dz    0]
             [  dh/dy   dh/dx      0       0]
             [  dh/dz   0        dh/dx     0]
             [   0      dh/dz    dh/dy     0]
             [  dh/dx   dh/dy    dh/dz     0]
             [   0      0          0       h]
   where h is the interpolation function for grid i.

   Same thing for the bubble fonction except that there is no fourth column

   Usage:
      Bprime=GetBprimeStokes(pentaelem,xyz_list,gauss_coord)

   See also GETBSTOKES, CREATEKMATRIX

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function Bprime=GetBprimeStokes(pentaelem,xyz_list,gauss_coord)
0002 %GETBPRIMESTOKES - computes the Bprime matrix for Stokes' diagnostic
0003 %
0004 %   Compute B'  matrix. B'=[B1' B2' B3' B4' B5' B6' Bb'] where Bi' is of size 3*NDOF2.
0005 %   For grid i, Bi' can be expressed in the basic coordinate system by:
0006 %   Bi_basic'=[ dh/dx   0          0       0]
0007 %             [   0      dh/dy      0       0]
0008 %             [   0      0         dh/dz    0]
0009 %             [  dh/dy   dh/dx      0       0]
0010 %             [  dh/dz   0        dh/dx     0]
0011 %             [   0      dh/dz    dh/dy     0]
0012 %             [  dh/dx   dh/dy    dh/dz     0]
0013 %             [   0      0          0       h]
0014 %   where h is the interpolation function for grid i.
0015 %
0016 %   Same thing for the bubble fonction except that there is no fourth column
0017 %
0018 %   Usage:
0019 %      Bprime=GetBprimeStokes(pentaelem,xyz_list,gauss_coord)
0020 %
0021 %   See also GETBSTOKES, CREATEKMATRIX
0022 
0023     num_grids=6;%bubble function not included
0024     NDOF4=4;
0025 
0026     l1l6=GetNodalFunctions(pentaelem,gauss_coord);
0027     dh1dh7_basic=GetNodalFunctionsDerivativesBasicStokes(pentaelem,xyz_list,gauss_coord);
0028 
0029     %Build Bprime:
0030     Bprime=zeros(8,NDOF4*num_grids+3);
0031     for i=1:num_grids+1,
0032         Bprime(1,NDOF4*(i-1)+1)=dh1dh7_basic(1,i);
0033         Bprime(1,NDOF4*(i-1)+2)=0;
0034         Bprime(1,NDOF4*(i-1)+3)=0;
0035 
0036         Bprime(2,NDOF4*(i-1)+1)=0;
0037         Bprime(2,NDOF4*(i-1)+2)=dh1dh7_basic(2,i);
0038         Bprime(2,NDOF4*(i-1)+3)=0;
0039 
0040         Bprime(3,NDOF4*(i-1)+1)=0;
0041         Bprime(3,NDOF4*(i-1)+2)=0;
0042         Bprime(3,NDOF4*(i-1)+3)=dh1dh7_basic(3,i);
0043 
0044         Bprime(4,NDOF4*(i-1)+1)=dh1dh7_basic(2,i);
0045         Bprime(4,NDOF4*(i-1)+2)=dh1dh7_basic(1,i);        
0046         Bprime(4,NDOF4*(i-1)+3)=0;
0047 
0048         Bprime(5,NDOF4*(i-1)+1)=dh1dh7_basic(3,i);
0049         Bprime(5,NDOF4*(i-1)+2)=0;
0050         Bprime(5,NDOF4*(i-1)+3)=dh1dh7_basic(1,i);
0051 
0052         Bprime(6,NDOF4*(i-1)+1)=0;
0053         Bprime(6,NDOF4*(i-1)+2)=dh1dh7_basic(3,i);
0054         Bprime(6,NDOF4*(i-1)+3)=dh1dh7_basic(2,i);
0055 
0056         Bprime(7,NDOF4*(i-1)+1)=dh1dh7_basic(1,i);
0057         Bprime(7,NDOF4*(i-1)+2)=dh1dh7_basic(2,i);
0058         Bprime(7,NDOF4*(i-1)+3)=dh1dh7_basic(3,i);
0059 
0060         Bprime(8,NDOF4*(i-1)+1)=0;
0061         Bprime(8,NDOF4*(i-1)+2)=0;
0062         Bprime(8,NDOF4*(i-1)+3)=0;
0063     end
0064 
0065     %Added the column for pressure
0066     for i=1:num_grids,
0067         Bprime(8,NDOF4*(i-1)+4)=l1l6(i);
0068 
0069     end

Generated on Sun 29-Mar-2009 20:22:55 by m2html © 2003