u

Burger's Equation 1D Travelling wave

The plan is to implemen a solver for the PDE
	(Subscript[u, t])+(1/2)(Subscript[((u^2)), x])=ν (Subscript[u, xx])
as our first implementation example for a nonlinear problem.

Substitute u[x,t]=y[x-v t] into the equation and simplifyt to get an ODE for the shape y which contains the constant speed v.  Mathematica can solve it for us. Note that the parameters C[1] and C[2] might possibly be complex in which case the form might not behave the way you think.
Note also that the constant C[1] always occurs as c1=(Sqrt[-(v^2)+2 ν C[1]]), that C[2]  only turns up as a horizontal shift, and that v truns up only as a vertical shift and ν as a horizontal scaling.  To work out what the solutions look like I can put C[2]=v=0  and ν=1/2.

Clear[y]
ySol[z_]=Simplify[y[z]/.DSolve[{
-v y'[z]+ y[z] y'[z]== ν y''[z]
},
y[z],
z][[1]]]

SolForm[z_,c1_]=c1 Tan[c1 z]
Plot[ SolForm[z,1],{z,-10,10}]

Remeber there is no reason I can not use complex numbers for the constanst of integration

SolForm[z_,c1_]=c1 Tan[c1 z]
Plot[ SolForm[z,I],{z,-10,10}]

So this is one of those "hydraulic jump solutions. It is pretty much 1 and -1 outside a narrow transition zone. It is actually a Tanh!  We can use a solution like this to check our numerics if we want.  First we have to undo all the scalings and shiftings we did. Or we can just use the "const + const Tanh[const x - const t]" form we found and plug into the PDE.

uF[x_,t_]=α+β Tanh[δ x - γ t];
Simplify[D[uF[x,t],t]+ uF[x,t] D[uF[x,t],x] == -ν D[uF[x,t],{x,2}]]

Grabbing the bits that need to be zero for this to always hold qand solving gives my solution form

Solve[{
β-2 δ ν==0,
γ-α δ==0
}
]
uF[x_,t_,{α_,δ_,ν_}]=α+2 δ ν Tanh[δ (x - α t)];
Simplify[
D[uF[x,t,{α,δ,ν}],t]+uF[x,t,{α,δ,ν}]D[uF[x,t,{α,δ,ν}],x] == -ν D[uF[x,t,{α,δ,ν}],{x,2}]
]