ziemowitzima 
February 14, 2013 12:26 
terms with the second derivative
Dear Foamers,
I need to discretize/calculate terms which contain second derivative (not Laplacian), as follows:
1.
2.
3.
and nonlinear term with first derivative:
For now the only way which works for me is to calculate twice the gradient of the function:
HTML Code:
gradf = fvc::grad(f); \\ it gives (f_x, f_y)
gradgradf0 = fvc::grad(gradf.component(0)); \\it gives (f_xx, f_yx)
gradgradf1 = fvc::grad(gradf.component(1)); \\it gives (f_xy, f_yy)
then term 1. is:
HTML Code:
gradgradf1.component(1); \\ f_xy
term 2. is:
HTML Code:
gradgradf0.component(0)  gradgradf1.component(1); \\ (f_xx  f_yy)
term 3. is:
HTML Code:
gradf.component(0)*gradf.component(0)  gradf.component(1)*gradf.component(1); \\ (f_x)^2 (f_y)^2
but unfortunately second derivative calculated as above gives me nonsmooth results...
Is there any other/better way to compute terms like the one above ?
Thanks
ZZM
