Last edited by macrovue on December 16th, 2008, 11:00 pm, edited 1 time in total.

- Cuchulainn
**Posts:**65000**Joined:****Location:**Drosophila melanogaster-
**Contact:**

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.

"Compatibility means deliberately repeating other people's mistakes."

David Wheeler

http://www.datasimfinancial.com

http://www.datasim.nl

David Wheeler

http://www.datasimfinancial.com

http://www.datasim.nl

Since this is probably homework, I will just hint that the characteristics are easilyfound and this will also answer the OP's questions.

It's not a homeworkIt's kind of a project which has to be done.Need more detailed explanation.

- Cuchulainn
**Posts:**65000**Joined:****Location:**Drosophila melanogaster-
**Contact:**

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?

"Compatibility means deliberately repeating other people's mistakes."

David Wheeler

http://www.datasimfinancial.com

http://www.datasim.nl

David Wheeler

http://www.datasimfinancial.com

http://www.datasim.nl

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.

- Cuchulainn
**Posts:**65000**Joined:****Location:**Drosophila melanogaster-
**Contact:**

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.

"Compatibility means deliberately repeating other people's mistakes."

David Wheeler

http://www.datasimfinancial.com

http://www.datasim.nl

David Wheeler

http://www.datasimfinancial.com

http://www.datasim.nl

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.

- Cuchulainn
**Posts:**65000**Joined:****Location:**Drosophila melanogaster-
**Contact:**

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.

David Wheeler

http://www.datasimfinancial.com

http://www.datasim.nl

- Cuchulainn
**Posts:**65000**Joined:****Location:**Drosophila melanogaster-
**Contact:**

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.

David Wheeler

http://www.datasimfinancial.com

http://www.datasim.nl

- Cuchulainn
**Posts:**65000**Joined:****Location:**Drosophila melanogaster-
**Contact:**

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.

David Wheeler

http://www.datasimfinancial.com

http://www.datasim.nl

- Cuchulainn
**Posts:**65000**Joined:****Location:**Drosophila melanogaster-
**Contact:**

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.

David Wheeler

http://www.datasimfinancial.com

http://www.datasim.nl

- Cuchulainn
**Posts:**65000**Joined:****Location:**Drosophila melanogaster-
**Contact:**

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

[$]\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

David Wheeler

http://www.datasimfinancial.com

http://www.datasim.nl

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}[$].

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

- Cuchulainn
**Posts:**65000**Joined:****Location:**Drosophila melanogaster-
**Contact:**

Some questions/remarks: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}[$].

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.

David Wheeler

http://www.datasimfinancial.com

http://www.datasim.nl