I am new at Mathematica and trying to solve a nonlinear PDE with the help of NDSolve. H, the height of the current is a function of x and t. Based on the context I know the current has a parabolic shape.
I have 2 boundary conditions indicating the current's shape regarding the spatial variable x[0,1]: H(1,0)= 0, Hx (0,t)=0.
Also, considering the temporal variable I have information about the height of the current at t=0.1, which is H= 0.74
Note: In my problem at t=0 there is a singularity, to deal with that t must be a small number other than zero
I wrote a code but it gives this error:
NDSolve::ndode: The equations {(h^(1,0))[x,t][0,t]==0} are not differential equations or
initial conditions in the dependent variables {h}.
I don't know how to solve it.
Here is my code:
ClearAll[h, x, n, t]
hx = D[h[x, t], x];
ht = D[h[x, t], t];
n = 2;
sqrtTerm = Sqrt[1 + 4*n*Abs[hx]];
pde = Sign[-hx]*1/2*D[h[x, t]*(sqrtTerm - 1), x] == -ht
solution =
NDSolve[{Sign[-hx]1/2D[h[x, t]*(sqrtTerm - 1), x] == -ht,
h[x, 0.1] == 0.74, h[1, t] == 0, hx[0, t] == 0},
h, {x, 0, 1}, {t, 0.1, 10}]
Derivative[1, 0][h][0, t] == 0– Ulrich Neumann Feb 08 '24 at 19:54