Page 1 of 11

About solving a transport equation

Posted: December 15th, 2008, 9:49 am
by macrovue

About solving a transport equation

Posted: December 15th, 2008, 4:52 pm
by Cuchulainn
Using the Fichera approach I conclude no BCs at x = 0, 1. If u(x,0) = f(x) then we get 'compatibility' conditions u(0,t) = f(0) and u(1,t) = f(1). I did a quick energy analysis and it looks conservative (decreasing in time). So some one-step 2nd order methods (e.g. Box) should be OK.Maybe there is an exact solution or MOC... I leave that to others.

About solving a transport equation

Posted: December 15th, 2008, 8:03 pm
by Alan
Since this is probably homework, I will just hint that the characteristics are easilyfound and this will also answer the OP's questions.

About solving a transport equation

Posted: December 16th, 2008, 7:48 am
by macrovue
It's not a homeworkIt's kind of a project which has to be done.Need more detailed explanation.

About solving a transport equation

Posted: December 16th, 2008, 1:58 pm
by Cuchulainn
QuoteOriginally posted by: macrovueIt's not a homeworkIt's kind of a project which has to be done.Need more detailed explanation.Did you do research on this topic? What's wrong what the tips you already have received?

About solving a transport equation

Posted: December 16th, 2008, 3:56 pm
by Alan
Yeah -- we need more proof that this is not homework Discuss exactly where this problem and the questions come from, and what you have tried so far.

About solving a transport equation

Posted: December 16th, 2008, 6:30 pm
by Cuchulainn
Well, we know where we're going but we don't where we've been ..Let me try to reconstruct this unusual 1st order hyperbolic PDE (disclaimer: only a guess!)u_t + u_x = 0 on real linedefine y = coth(x)then u_t + (1+y)(1-y)u_y = 0 on [-1, 1]]define z = 1+ythen u_t + z(2-z)u_z = 0 on [0,2]Exercise: in the future we define y = coth(cx) where c is a hot spot parameter.etc.??

About solving a transport equation

Posted: December 16th, 2008, 11:11 pm
by Alan
Daniel,I didn't mean for you to discuss, but macrovue should explain the origin of his problem -- if he wants more detailed hints.

About solving a transport equation

Posted: December 17th, 2008, 9:09 am
by Cuchulainn
QuoteOriginally posted by: AlanDaniel,I didn't mean for you to discuss, but macrovue should explain the origin of his problem -- if he wants more detailed hints.I meant it for mv, indeed.

About solving a transport equation

Posted: December 18th, 2008, 12:27 pm
by Cuchulainn
Looks as if this transport thread is not going anywhere. The original post has been removed.

About solving a transport equation

Posted: May 24th, 2009, 6:11 pm
by Cuchulainn
Original post was:QuoteI have to define initial and boundary condition for a transport PDE: u_t+x(1-x)u_x=0with x and t is between [0,1], to solve this equation, what kind of numerical methodand boundary condition do you recommend and why?What kind of numerical error do you expect?Detailed explanation will be appreciated in advance.I have had a look at this, let me just take a similar PDE (but containing the essential difficulties) take the IBVP on (0, infinity) with BC at x = 0 and nothing at infinity of course. I transform to [0,1) to get a PDE similar to above.In general, numerical BCs need to be defined at x = 1 and it is very tricky (spurious reflection) when we take centred 2nd order approximation to du/dx at x = 1. This was a big pain in the past with ADI for Asian options.Now there is no BC at x = 1 and we just get du/dt = 0 there. It is possible to get a nice energy inequality in L2 space that say that the solution is bounded by IC, BC and RHS terns (use Gronwall's lemma).Numerically, we have in essence numerical BC at both x = 0 and x = 1, so we can then solve an ODE using Crank Nicolson in time, for example.In general, numerical BCs need to be defined at x = 1 and it is very tricky (spurious reflection) when we take centred 2nd order approximation to du/dx at x = 1. This was a big pain in the past with ADI for Asian options and Cheyette.Now there is no BC at x = 1 and we just get du/dt = 0 there. It is possible to get a nice energy inequality in L2 space that say that the solution is bounded by IC, BC and RHS terns (use Gronwall's lemma).Numerically, we have in essence numerical BC at both x = 0 and x = 1, so we can then solve an ODE using Crank Nicolson in time, for example. I have done this in the case of a skew symmetric matrix as well as my predictor corrector_type scheme (second order) and it works very well and no spurious reflections in the upstream direction. A spin off is that the BCs are not an issue anymore.Conclusion: No BC needed for PDE, but we need BC for the FDM scheme (and choose clever ones).BTW nice problem. Pity the thread had such a short ½ life.

About solving a transport equation

Posted: December 18th, 2009, 7:07 am
by Cuchulainn
This model pde is a good one to look at since in is defined on the real line instead of the half line. It is already transformed to [-1,1]. No BC is needed but rather a compatibility condition with the initial condition at the end points.Numerically, I used Backward Time Centred Space (BTCS) using LU decomposition and ADE and the results look good. Accuracy is first and second order, respectively.The model was U_t + aU_x = 0 U(x,0) = f(x)Solution is U(x,t) = f(x - at)The results apply to other cases, for example half-line, Asian-type pde.So, original pde is transfomed by using y = tanh(x), for example.

Re: About solving a transport equation

Posted: January 23rd, 2020, 8:35 pm
by Cuchulainn
The OP post (deleted) is similar  to the rather innocuous-looking degenerate pde that crops up here and there

[$]\frac{\partial u}{\partial t} - (1-y)^2\frac{\partial u}{\partial y}  = 0 [$] on the interval [$](0,1)[$] (1)

with initial condition

[$]u(y,0) = f(y)[$] on the interval [$](0,1)[$] (2)

Questions on (1), (2):

1. Does it have a solution?
2. Is there a closed form for the solution?
3. What 'happens' at the boundaries [$]y = 0[$] and [$]y = 1[$]. Describe the 'physics' flow.
4. What are the numerical boundary conditions.

/// BTW OP's pde was

[$]\frac{\partial u}{\partial t} + (1+y)(1-y)\frac{\partial u}{\partial y}  = 0 [$] on the interval [$](-1,1)[$] AFAIR

Re: About solving a transport equation

Posted: January 24th, 2020, 5:06 am
by Alan
I'll play a little. For 2, I get

[$] u(y,t) = f \left( \xi(y,t) \right)[$] where the characteristic  [$]\xi(y,t) = \frac{y + t - t y}{1 + t - t y}[$].

Re: About solving a transport equation

Posted: January 26th, 2020, 8:33 pm
by Cuchulainn
I'll play a little. For 2, I get

[$] u(y,t) = f \left( \xi(y,t) \right)[$] where the characteristic  [$]\xi(y,t) = \frac{y + t - t y}{1 + t - t y}[$].
Some questions/remarks:

1. How do you get the characteristics? I tried and got  [$]\xi(y,t) = \frac{-1 + t - t y}{1 -  y}[$]. I must be doing something wrong.
2. The solution does not need any boundary conditions.
3. Plugging in, [$]u(0,t) = f(t/(1+t))[$]. Does this mean anything?
4. [$]u(1,t) = f(1))[$], 
5. What happens in the empty quarter [$]y > 1[$]? for mean, it is beyond infinity.

4 is what I use for numerical BC but [$]y=0[$] is an outflow boundary so it does not matter what happens there. In [$]0 < y < 1[$] I have a 2nd order explicit scheme whereas for our Anchor article I used 1st order upwinding.