Initialization of Operators (Curvilinear)

The operators defined below are for gradient, divergence, and curve in orthogonal curvilinear coordinates. I have used the scale factors a, b, and c instead of h1, h2, and h3 that are seen in some texts.
These operators are defined in terms of the scale factors a, b, and c. In the definition of the operator a, b, and c are undefined. For your coordinates, you must define a, b, and c using Mathematica commands:
a=***;
b=***;
c=***;
You do not need to reevaluate the operators each time you define new scale factors.
You may also use the function scalefactors[ ], which returns the vector {a, b, c}, in which case you may use a=scalefactors[[1]], b=scalefactors[[2]], c=scalefactors[[3]] OR
{a,b,c}=scalefactors[ ].
When evaluating at these functions, you only need to call the function name and the variables, you do not need to call f[u,v,w].

Correct Example:
f[u_,v_,w_]:=u^2 v^3 w^4
newgrad[f][u,v,w]

Incorrect Example
newgrad[f[u,v,w]]

In[9]:=

  newgrad[f_]:={1/a D[f[#1,#2,#3],#1],
  1/b D[f[#1,#2,#3],#2], 1/c D[f[#1,#2,#3],#3]}&

In[10]:=

  newdiv[F_]:=1/(a b c) (D[b c F[#1,#2,#3][[1]],#1]+
      D[a c F[#1,#2,#3][[2]],#2]+D[a b F[#1,#2,#3][[3]],#3])&
     

In[11]:=

  newcurl[F_]:=
  {1/(b c) (D[c F[#1,#2,#3][[3]],#2]-D[b F[#1,#2,#3][[2]],#3]),
   1/(a c) (D[a F[#1,#2,#3][[1]],#3]-D[c F[#1,#2,#3][[3]],#1]),
   1/(a b) (D[b F[#1,#2,#3][[2]],#1]-D[a F[#1,#2,#3][[1]],#2])}&

In[12]:=

  newLaplacian[f_]:=
  1/(a b c) (D[(b c)/a D[f[#1,#2,#3],#1],#1]
  +D[(a c)/b D[f[#1,#2,#3],#2],#2]
  +D[(a b)/c D[f[#1,#2,#3],#3],#3])&

In[13]:=

  scalefactors[x_,y_,z_]:=Sqrt[
  {(D[x[#1,#2,#3],#1])^2+(D[y[#1,#2,#3],#1])^2+(D[z[#1,#2,#3],#1])^2,
   (D[x[#1,#2,#3],#2])^2+(D[y[#1,#2,#3],#2])^2+(D[z[#1,#2,#3],#2])^2,
   (D[x[#1,#2,#3],#3])^2+(D[y[#1,#2,#3],#3])^2+(D[z[#1,#2,#3],#3])^2}]&

Up to Orthogonal Curvilinear Coordinates