FEATool Multiphysics
v1.17.1
Finite Element Analysis Toolbox
|
SPHEREGRID Generate 3d hexahedral grid for a sphere.
[ GRID ] = SPHEREGRID( NS, NR, R, XP ) Generates a hexahedral grid for a spherical domain with NS+NR cells in the radial direction. NS specifies the cell resolution of the inner cube (default 4), and NR the number of cells in the radial direction of the outer layer (default 3). The optional arguments R and XP = [x0;y0;z0] specify the radius and center coordinates of the sphere (default R = 1 and XP = [0;0;0]).
grid = spheregrid();
grid = spheregrid( 16, 12, 0.5, [1;1;1] );