Shape functions for Triang10 element

Contents

Demo contents

This demo illustrates how to calculate value of shape functions for Triang10 element.

clear variables;

Type of finite elements

Finite elemet types are managed by enumeration class mp.FEM.FemTypes.

for fem = enumeration('mp.FEM.FemType')'
  fprintf('Fem type: %s\n', fem)
  xy = fem.dofsCoords();

  N = fem.sfh(xy);
Fem type: Line2
Fem type: Line3
Fem type: Triang3
Fem type: Triang6
Fem type: Triang10
Fem type: Quad4
Fem type: Quad8
Fem type: Quad9
Fem type: Hex8

Display matrix of shape functions at nodes coloriing the values.

  mp_disp_sf_matrix(N, 5, 2);

  fprintf('----------------------------------------\n');
   1.00   0.00
   0.00   1.00
----------------------------------------
   1.00   0.00   0.00
   0.00   1.00   0.00
   0.00   0.00   1.00
----------------------------------------
   1.00   0.00   0.00
   0.00   1.00   0.00
   0.00   0.00   1.00
----------------------------------------
   1.00  -0.00  -0.00   0.00   0.00   0.00
   0.00   1.00  -0.00  -0.00   0.00  -0.00
   0.00  -0.00   1.00  -0.00   0.00  -0.00
  -0.00   0.00  -0.00   1.00   0.00   0.00
   0.00   0.00   0.00  -0.00   1.00  -0.00
  -0.00  -0.00   0.00   0.00   0.00   1.00
----------------------------------------
   1.00   0.00   0.00   0.00  -0.00  -0.00  -0.00  -0.00   0.00   0.00
  -0.00   1.00   0.00   0.00  -0.00   0.00  -0.00   0.00   0.00  -0.00
  -0.00   0.00   1.00   0.00   0.00  -0.00   0.00  -0.00   0.00  -0.00
  -0.00  -0.00   0.00   1.00   0.00   0.00  -0.00  -0.00   0.00   0.00
   0.00   0.00   0.00  -0.00   1.00   0.00  -0.00  -0.00  -0.00   0.00
  -0.00   0.00  -0.00   0.00  -0.00   1.00   0.00  -0.00   0.00  -0.00
  -0.00  -0.00   0.00   0.00  -0.00   0.00   1.00  -0.00   0.00  -0.00
   0.00   0.00   0.00  -0.00  -0.00  -0.00   0.00   1.00  -0.00   0.00
  -0.00   0.00  -0.00   0.00  -0.00  -0.00   0.00   0.00   1.00   0.00
   0.00  -0.00  -0.00  -0.00   0.00   0.00   0.00   0.00  -0.00   1.00
----------------------------------------
   1.00   0.00   0.00   0.00
  -0.00   1.00   0.00  -0.00
   0.00  -0.00   1.00  -0.00
  -0.00  -0.00   0.00   1.00
----------------------------------------
   1.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0.00   1.00   0.00   0.00   0.00   0.00   0.00   0.00
   0.00   0.00   1.00   0.00   0.00   0.00   0.00   0.00
   0.00   0.00   0.00   1.00   0.00   0.00   0.00   0.00
   0.00   0.00   0.00   0.00   1.00   0.00   0.00   0.00
   0.00   0.00   0.00   0.00   0.00   1.00   0.00   0.00
   0.00   0.00   0.00   0.00   0.00   0.00   1.00   0.00
   0.00   0.00   0.00   0.00   0.00   0.00   0.00   1.00
----------------------------------------
   1.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0.00   1.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0.00   0.00   1.00   0.00   0.00   0.00   0.00   0.00   0.00
   0.00   0.00   0.00   1.00   0.00   0.00   0.00   0.00   0.00
   0.00   0.00   0.00   0.00   1.00   0.00   0.00   0.00   0.00
   0.00   0.00   0.00   0.00   0.00   1.00   0.00   0.00   0.00
   0.00   0.00   0.00   0.00   0.00   0.00   1.00   0.00   0.00
   0.00   0.00   0.00   0.00   0.00   0.00   0.00   1.00   0.00
   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   1.00
----------------------------------------
   1.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00
   0.00   1.00   0.00   0.00   0.00   0.00   0.00   0.00
   0.00   0.00   1.00   0.00   0.00   0.00   0.00   0.00
   0.00   0.00   0.00   1.00   0.00   0.00   0.00   0.00
   0.00   0.00   0.00   0.00   1.00   0.00   0.00   0.00
   0.00   0.00   0.00   0.00   0.00   1.00   0.00   0.00
   0.00   0.00   0.00   0.00   0.00   0.00   1.00   0.00
   0.00   0.00   0.00   0.00   0.00   0.00   0.00   1.00
----------------------------------------
end
mp_manage_demos('report', 'FEM_shapeFunctions', true);