How to describe curvilinear grid using coordinate functions?

A curvilinear grid around a cylinder has the following properties:

1. The grid has $n_\varphi =20$ grid points in angular direction (along a circle in the xy-plane).
2. The grid has $n_r =5$ grid points in radial direction (from the cylinder outwards)
3. The grid has $n_z =8$ grid points in z-direction.
4. The grid has a thickness of $b =5$ around the cylinder

How do we describe the curvilinear grid using coordinate functions for the grid vertices such as $x(i,j,k), y(i,j,k), z(i,j,k)$, where $i,j,k$ are the indices of the vertices?

Hint: you can treat $\varphi$ and $r$ as normal polar coordinates in $x-y$ plane. You need to set up the spacing (scale) so integers $i,j$ will point correctly, make a whole revolution and fill out the thickness correctly. What is left afterwards is $z$ coordinate, but it can be treated separately since it is independent of x-y plane.
• @Raxak Yes that sounds about right. Also think about the end points. Which coordinates should give lowest and highest value for $r,\&\varphi$ – mathreadler Sep 4 '18 at 20:30