I am attempting to calculate the mean curvature [1, 2] of a surface defined by a function of x and y.
My function is rather simple:
f = 1 - 0.05(Cos[2 π x/L] + Sin[2 π x/L])Cos[2 π y/L];
So to calculate the mean curvature, this is what I do (κ is the mean curvature below):
L=79.1829;
f = 1 - 0.05(Cos[2 π x/L] + Sin[2 π x/L])Cos[2 π y/L];
κ=((1 + D[f,x]^2) D[f,y,y]-2 D[f,x]D[f,y]D[D[f,x],y]+
(1+D[f,y]^2)D[f,x,x])/((1 + D[f,x]^2 + D[f,y]^2)^1.5)
And then I plot it as :
(*Surface defined by f*)
Plot3D[
f,
{x, 0, L},
{y, 0, L}
]

(*Plot of kappa*)
Plot3D[
κ,
{x, 0, L},
{y, 0, L}
]

I wasn't entirely sure of whether to post this question in math.se or mathematica.se but I did so on mathematica.se since it does have a Mathematica component to it.
Is what I am doing correct? I ask because this seems rather trivial.
- Does anyone have any suggestion as to do this in a better way, perhaps plot it in a better way?
A little background:
I am trying to prove quantitatively that different initial conditions created by the surface like f would engender different amounts of curvature for a fluid dynamics problem.