Exact solution for 2D inviscid burgers equation.
I write a code for numerical method for 2D inviscid burgers equation:
u_t + (1/2u^2)_x + (1/2u^2)_y = 0, initial function: u(0, x) = sin(pi*x) but I don't know how to solve the exact solution for it. And I need it to complete the test for my code. Anybody who can tell me how to obtain the exact solution for it? Thanks very much! 
Have you looked into the method of characteristics?

Quote:
But I don't know the characteristics curve method exactly.Could you tell me some details? 
I don't know off hand the solution to the problem, I was just making the suggestion to look into method of characteristics since it is used for hyperbolic PDE. See if you can find a copy of "An Introduction to Nonlinear Partial Differential Equations" by Logan. If I remember correctly it covers the Burger's equation.

Quote:
PS: I see someone says that for 1D case: Ut + (0.5u^2)x = 0, and the initial function is u(0, x) = sin(pi*x); and the exact solution will be: u = sin(pi*(x  ut)) Am I right? 
Yes that looks correct.

Quote:
The exact solution will be u = sin(pi*((x ut ) + (y  ut ))? how can I solve this equation and obtain the u, Just use the iteration method? Thanks! 
I
Quote:
I am speculating here, but to me it looks like you took the solution to a linear scalar transport with speed a and just replaced a by u in the solution? Could that be? 
The Burgers equation
du/dt + u*du/dx =0 implies that the velocity is constant along particolar curves, called "characteristic lines". To see that, write the total differential of u(x,t): du= dt* du/dt + dx *du/dx = dt* (du/dt + dx/dt *du/dx) Therefore you see that u=constant along the line in the x,t plane that satisfies dx/dx=u. Being u constant, you have straight lines of different slopes. In the 2D case, you have some new issue, for example you have two equations for u and v or in some other cases the 2D Burgers equations is factorized 
In the 1D case you have: u_t + uu_x = 0
This implies: du/dt = u_t + dx/dt*u_x = 0 Then choose: dx/dt = u so that the two equations above are equivalent. This leaves you with the following ODE IVP: dx/dt = u du/dt = 0 x(0) = xi u(xi,0)=sin(pi*xi) Solving and applying IC: x = u*t + k(xi) = u*t + xi u = l(xi) = sin(pi*xi) So your solution in implicit form is: x = u*t + xi u = sin(pi*xi) Perhaps it doesn't make sense to combine them together since u would be then defined as a function of u. I started running through the 2D calculation and realized your initial condition is not a function of y. Thus it is not a wellposed problem. Do you mean u(0, x, y) = sin(pi*x), i.e. u does not change with y? If so, you end up with an equation for your second characteristic as: y = u*t + eta, but your initial condition is not a function of eta, so your solution actually doesn't change from the 1D case as far as I can tell. Actually this makes sense since u_y would start out as zero and will never change from this value. You will just have advection in the xdirection. 
Actually since u = sin(pi*xi) you can simplify a but further to:
x = sin(pi*xi)*t + xi u = sin(pi*xi) However, plotting the characteristics given by the first equation, they are definitely going to cross each other leading to shocks. Does everyone agree with this statement? 
However, I don't understand your 2D case... it should imply a set of two equations:
Ut + UUx +VUy=0 Vt + UVx +VVy=0 each one says U and V are constant along the curves dx/dt=U and dy/dt=V, thus what do you mean for 2D Burgers equation? 
Quote:
u_t + uu_x + uu_y = 0 True? 
Quote:
such equation makes no sense for me ... 
Quote:
c_t + uc_x + vc_y = 0 where [u v] is a known velocity field advecting c. Or if it is a momentumtype equation (as I think it is intended to be) it would have to be u_t + uu_x + vu_y = 0 v_t + uv_x + vv_y = 0 as you said before. I think the poster needs to clarify what exactly is being solved. 
Quote:
That's true. however, if the initial conditions are just u=sin(f(x)), as stated (and assuming periodic bcs), then the solution will just be the developing shock solution found from the Cole Hopf transform... Another idea if a solution to the 2d burgers is too hard to find: Use the method of manufactured solution to validate the code! 
All times are GMT 4. The time now is 09:25. 