**mesh_sphere_in_cube#

Description#

This command creates the mesh (1/8) of a cube with a spherical cavity.

Syntax#

**mesh_sphere_in_cube \(~\,\) *ncut_radius nc_r \(~\,\) *ncut_theta nc_t \(~\,\) *size_cube half_edge \(~\,\) *radius_sphere radius \(~\,\) *nb_reg nlayer \(~\,\) [ *quad ]

*ncut_radius

Number of subdivisions along the radius.

*ncut_theta

Number of subdivisions along \(\theta\).

*size_cube

Edge length/2 of the cube.

*radius_sphere

Radius of the sphere.

nb_reg

is the number (integer) of layers with the same hole roundness. It allows a smooth transtion of mesh roundness away from the cavity.

*quad

Quadratic interpolation (by default, it is linear).

Example#

****mesher
 ***mesh eight.geof
  **mesh_sphere_in_cube
   *ncut_radius 10
   *ncut_theta 10
   *size_cube 1.00000
   *radius_sphere 0.400000
   *nb_reg 3
   *quad

 ***mesh quarter.geof
  **open eight.geof
  **symmetry
   *type plane
   *normal (-1. 0. 0.)
  **union
   *add eight.geof

 ***mesh half.geof
  **open quarter.geof
  **symmetry
   *type plane
   *normal (0. 0. -1)
  **union
   *add quarter.geof

 ***mesh sphere_in_cube.geof
  **open half.geof
  **symmetry
   *type plane
   *normal (0. -1. 0.)
  **union
   *add half.geof
****return