CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   Exact solution for 2D inviscid burgers equation. (http://www.cfd-online.com/Forums/main/101909-exact-solution-2d-inviscid-burgers-equation.html)

 xiaowanzi01 May 16, 2012 23:39

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!

 cdegroot May 17, 2012 00:19

Have you looked into the method of characteristics?

 xiaowanzi01 May 17, 2012 00:25

Quote:
 Originally Posted by cdegroot (Post 361558) Have you looked into the method of characteristics?

But I don't know the characteristics curve method exactly.Could you tell me some details?

 cdegroot May 17, 2012 00:32

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.

 xiaowanzi01 May 17, 2012 00:47

Quote:
 Originally Posted by cdegroot (Post 361562) 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.
Ok! Thanks!

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?

 cdegroot May 17, 2012 00:57

Yes that looks correct.

 xiaowanzi01 May 17, 2012 01:02

Quote:
 Originally Posted by cdegroot (Post 361566) Yes that looks correct.
So, if the case is 2D:

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!

 cfdnewbie May 17, 2012 02:34

I
Quote:
 Originally Posted by xiaowanzi01 (Post 361564) Ok! Thanks! 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?
I am confused about the solution you have given. Is it defined implicitely???? U as a function of u?? I have never seen that approach for Burgers... It is usually done by Cole Hopf transformation....

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?

 FMDenaro May 17, 2012 03:41

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

 cdegroot May 17, 2012 11:26

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 well-posed 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 x-direction.

 cdegroot May 17, 2012 11:42

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?

 FMDenaro May 17, 2012 12:34

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?

 cdegroot May 17, 2012 12:56

Quote:
 Originally Posted by FMDenaro (Post 361698) 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?
I think he means:

u_t + uu_x + uu_y = 0

True?

 FMDenaro May 17, 2012 13:20

Quote:
 Originally Posted by cdegroot (Post 361703) I think he means: u_t + uu_x + uu_y = 0 True?

such equation makes no sense for me ...

 cdegroot May 17, 2012 13:28

Quote:
 Originally Posted by FMDenaro (Post 361705) such equation makes no sense for me ...
Okay maybe you are right, but you must agree that is what the person who posted stated at the beginning of this thread. I think you are right that physically it does not make sense as an advection equation. For scalar advection you could have:

c_t + uc_x + vc_y = 0

where [u v] is a known velocity field advecting c. Or if it is a momentum-type 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.

 cfdnewbie May 17, 2012 13:55

Quote:
 Originally Posted by cdegroot (Post 361706) Okay maybe you are right, but you must agree that is what the person who posted stated at the beginning of this thread. I think you are right that physically it does not make sense as an advection equation. For scalar advection you could have: c_t + uc_x + vc_y = 0 where [u v] is a known velocity field advecting c. Or if it is a momentum-type 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.

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 15:23.