FEATool  v1.6
Finite Element Analysis Toolbox
 All Files Functions Pages
gridrevolve.m File Reference


GRIDREVOLVE Revolve and extrude a 2D grid.

[ GRID ] = GRIDREVOLVE( GRID, N_CZ, LEN, N_REV, R_OFF, TH_XZ, I_JOIN ) Revolves and extrudes a 2D GRID to generate a 3D grid. N_CZ is the number of cells and LZ the length/height in the z-direction. N_REV specify the number of revolutions and R_OFF the radial offset of the original input grid. TH_XZ optionally prescribes an initial angle of the input grid plane. I_JOIN is a flag to join the two ends.

1) Create a torus grid
  grid = gridrevolve( circgrid(), 20, 0, 1, 2, pi/2, 1 );
2) Create a spiral grid
  grid = gridrevolve( rectgrid(3), 100, 10, 3, 2 );
2) Create a "cored apple"
  grid = circgrid();
  grid = delcells( grid, <tt>x>=0</tt> );
  grid = gridrevolve( grid, 20, 0, 1, 1, pi/2, 1 );
See also
Required fields of grid:
Generated fields of grid: