SERVING THE QUANTITATIVE FINANCE COMMUNITY

  • 1
  • 2
  • 3
  • 4
  • 5
  • 11
 
User avatar
macrovue
Topic Author
Posts: 4
Joined: December 3rd, 2008, 12:26 pm

About solving a transport equation

December 15th, 2008, 9:49 am

Last edited by macrovue on December 16th, 2008, 11:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 61487
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

About solving a transport equation

December 15th, 2008, 4:52 pm

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.
Last edited by Cuchulainn on December 14th, 2008, 11:00 pm, edited 1 time in total.
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget
 
User avatar
Alan
Posts: 10020
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

About solving a transport equation

December 15th, 2008, 8:03 pm

Since this is probably homework, I will just hint that the characteristics are easilyfound and this will also answer the OP's questions.
 
User avatar
macrovue
Topic Author
Posts: 4
Joined: December 3rd, 2008, 12:26 pm

About solving a transport equation

December 16th, 2008, 7:48 am

It's not a homeworkIt's kind of a project which has to be done.Need more detailed explanation.
 
User avatar
Cuchulainn
Posts: 61487
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

About solving a transport equation

December 16th, 2008, 1:58 pm

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?
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget
 
User avatar
Alan
Posts: 10020
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

About solving a transport equation

December 16th, 2008, 3:56 pm

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.
 
User avatar
Cuchulainn
Posts: 61487
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

About solving a transport equation

December 16th, 2008, 6:30 pm

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.??
Last edited by Cuchulainn on December 15th, 2008, 11:00 pm, edited 1 time in total.
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget
 
User avatar
Alan
Posts: 10020
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

About solving a transport equation

December 16th, 2008, 11:11 pm

Daniel,I didn't mean for you to discuss, but macrovue should explain the origin of his problem -- if he wants more detailed hints.
Last edited by Alan on December 16th, 2008, 11:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 61487
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

About solving a transport equation

December 17th, 2008, 9:09 am

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.
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget
 
User avatar
Cuchulainn
Posts: 61487
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

About solving a transport equation

December 18th, 2008, 12:27 pm

Looks as if this transport thread is not going anywhere. The original post has been removed.
Last edited by Cuchulainn on December 17th, 2008, 11:00 pm, edited 1 time in total.
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget
 
User avatar
Cuchulainn
Posts: 61487
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

About solving a transport equation

May 24th, 2009, 6:11 pm

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.
Last edited by Cuchulainn on May 23rd, 2009, 10:00 pm, edited 1 time in total.
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget
 
User avatar
Cuchulainn
Posts: 61487
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

About solving a transport equation

December 18th, 2009, 7:07 am

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.
Last edited by Cuchulainn on December 17th, 2009, 11:00 pm, edited 1 time in total.
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget
 
User avatar
Cuchulainn
Posts: 61487
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: About solving a transport equation

January 23rd, 2020, 8:35 pm

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
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget
 
User avatar
Alan
Posts: 10020
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Re: About solving a transport equation

January 24th, 2020, 5:06 am

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}[$].
 
User avatar
Cuchulainn
Posts: 61487
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: About solving a transport equation

January 26th, 2020, 8:33 pm

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.
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget
ABOUT WILMOTT

PW by JB

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...


Twitter LinkedIn Instagram

JOBS BOARD

JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...


GZIP: On