# NeumannValue nonlinear pde?

Inspired by the highly interesting question Solving Burger's equation with NDSolve at large time I'll try to understand Finite-Element-solution for nonlinear pde in more detail:

Burger pde

$$u_t(x,t)+u(x,t) u_x(x,t)=0$$

with initial condition $$u(x,0)=x+1$$ is solved by

$$u(x,t)=\frac{x+1}{t+1}$$

0==Derivative[0, 1][u][x, t]  + u[x, t] Derivative[1, 0][u][x, t]
/. u ->Function[{x, t}, (x + 1)/(t + 1) ] (*True*)


Method-FiniteElements is able to approximate this solution quite well

U = NDSolveValue[{Derivative[0, 1][u][x,t]  +
u[x, t] Derivative[1, 0][u][x, t]  ==
NeumannValue[0, True],
u[x, 0] == 1 + x}, u, {x, 0, 1}, {t, 0,5}];

Plot[{U[x, #] , (1 + x)/(1 + #)} // Evaluate, {x, 0, 1},AxesLabel -> {"x", "U[x,t]"},PlotStyle -> {Blue, {Dashed, Red}} ] &[1]


To enforce MethodOfLinesand FiniteElement I used NeumannValue on the right hand side of the pde in NDSolveValue

My question

How is NeumannValue defined in this nonlinear case?

I expected something like u[x,t]^2/2 or D[u[x,t]^2/2,x] , but expressions don't vanish at x==0,x==1. Same with D[u[x,t] ,x].

Thanks!

• Happy to see someone asking this. (I noticed there seems to be an issue when answering the linked question but is too lazy to post a question. ) In principle we can use NDSolveFEMGetInactivePDE to determine the NeumannValue, but obviously NDSolveFEMGetInactivePDE isn't working properly in this case. (The output is u[x] u'[x] + Derivative[1, 0][u][t, x]! ) user21 should be able to answer this. Let's wait for a moment :) . May 8, 2022 at 12:00
• @xzczd Thanks, nice to meet you again today. I'm looking forward to the answer of user21 May 8, 2022 at 12:02
• NeumannValue is defined in relation to anything that is in the Div part of a PDE. There is no such part in this PDE and as such the NeumannValue is not defined. As a side note, note that the coefficient could be parsed as convection coefficient (factor * u') or as a reaction coefficient (factor * u) or possibly also a once size fits all nonlinear right hands side f) but none of those have a relation to a divergence, which is needed for a NeumannValue. May 8, 2022 at 16:24
• @user21 Thank you for your detailled answer! That means in this case FiniteElement is some kind of galerkin method? May 8, 2022 at 17:42
• @user21 Thanks. I transformed the second part in the pde u[x, t]Derivative[1, 0][u][x, t] to D[u[x,t]^2,x]/2 May 9, 2022 at 12:10