I'm trying to use py-pde to simulate the mean curvature flow for a 2d-graph z=u(x,y).
The equation for the Mean Curvature Flow has a term with the Hessian of the function u see the equations here (D_i denotes the derivatives with respect to x and y, for i = 1 and 2 , respectively)
I tried to write the Hessian as the gradient of the gradient, but without success. The following code shows an attempt:
from pde import PDE, ScalarField, UnitGrid, CartesianGrid
grid = CartesianGrid([[0, 100], [0, 100]], [100, 100], periodic=[True, True]) # generate grid
state = ScalarField.from_expression(grid, "x/4 + y/4") # generate initial condition
eq = PDE({"u": "laplace(u)-(1/(1+dot(gradient(u),gradient(u))))*dot(gradient(u),gradient(gradient(u))*gradient(u))"}) # define the pde
result = eq.solve(state, t_range=1, dt=0.1)
result.plot()
Is it possible to use py-pde to solve this equation? How could it be done?