SERVING THE QUANTITATIVE FINANCE COMMUNITY

• 1
• 3
• 4
• 5
• 6
• 7
• 11

Cuchulainn
Posts: 62071
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: About solving a transport equation

So,here is the Anchor PDE article

https://onlinelibrary.wiley.com/doi/epd ... wilm.10366

See section 8  where it is claimed that no BCs are needed at y = 0, y = 1. I know why.

Motivate using characteristics, without diagrams. A formula is good enough.

The question can't be easier.

Paul
Posts: 10768
Joined: July 20th, 2001, 3:28 pm

### Re: About solving a transport equation

Someone's getting tetchy! (Brexit, perchance?!)

Ok, in original S, A, and t. Pretend S is constant and ignore S derivs too (so I can give you a formula). We would then have

$V=f(\ln(S-A)+\lambda t)$

The characteristics are given by

$A=S-ae^{-\lambda t}$

As long as you have final conditions then you don't need boundary conditions. Going backwards the characteristics radiate out from A=S, so to speak.(*) If you were solving in the other direction over a finite A range then you would need both initial and boundary conditions.

The question indeed could not have been easier!!!

Averaging is quite benign. If you had max instead (like a lookback) then that's harder because the max keeps increasing.(*) Then a BC is technically necessary (or you could do the binomial trick).

Upwind = characteristics. Or at least it's acknowledging that there is a natural direction to information flow.

(*) That would be like having mean-fleeing interest rates.

Cuchulainn
Posts: 62071
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: About solving a transport equation

Someone's getting tetchy! (Brexit, perchance?!)

Ok, in original S, A, and t. Pretend S is constant and ignore S derivs too (so I can give you a formula). We would then have

$V=f(\ln(S-A)+\lambda t)$

The characteristics are given by

$A=S-ae^{-\lambda t}$

As long as you have final conditions then you don't need boundary conditions. Going backwards the characteristics radiate out from A=S, so to speak.(*) If you were solving in the other direction over a finite A range then you would need both initial and boundary conditions.

The question indeed could not have been easier!!!

Averaging is quite benign. If you had max instead (like a lookback) then that's harder because the max keeps increasing.(*) Then a BC is technically necessary (or you could do the binomial trick).

Upwind = characteristics. Or at least it's acknowledging that there is a natural direction to information flow.

(*) That would be like having mean-fleeing interest rates.
The real problem is in fact a generalisation of the initial 1d pde

$\frac{\partial V}{\partial t} = (1-y)^2\lambda(S-(y/(1-y))\frac{\partial V}{\partial y}$ where $y = A/(A+1)$ as in section 8 of the article.

I reckon that this is much more difficult to analyse and to 'visualise'. At least, it would be nice to have it as an ODE.An exact solution would be even better, as in the 1d case,

Pretending S is fixed etc. is a big assumption. It is possible to do everything more rigorously we want using PDE/FDM (e.g. Fichera)combination, so MDC is not really needed and it is non-trivial,to get it working. It is useful for a 'second opinion'. Alan's solution can be used to stress-test various fd schemes which is what I have done and some interesting behaviour was seen.

For pure convection system (waterhammer in a 1d pipe) then MOC works fine but characteristics and diffusion introduce more challenges, e.g. what we can call 'FDM/MOC grid mismatch'.

Cuchulainn
Posts: 62071
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: About solving a transport equation

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}$.
Got it! It's just a trick you have to do several times and then it becomes a mechanical step-by-step process, similar to transforming an elliptic pde to canonical form. In fact, the two processes are very similar.
Like driving a car or performing katas. The last time I did this stuff was in 1982 for waterhammer and I had lost my notes.

www.youtube.com/watch?v=UsWmlb-dpucI look forward to reading page 33 and the other pages as well.

Paul
Posts: 10768
Joined: July 20th, 2001, 3:28 pm

### Re: About solving a transport equation

1) Yes, S fixed is bad. But it gives a good initial insight. Then add some more insight from an explicit FD method.

2) I'd be careful with treating this as mechanical. And I don't often say that. That's because of the trouble that characteristics can get you into if you don't know all the tricky things they can do. (But I'm getting vibes that you aren't too interested in that...although that is what makes them fun.)

3) I've been trying to find books that would be good. I can't remember what I used almost half a century ago. But for once I'd avoid engineering books, because of (2) above, and obvs you want to avoid the French and Russians.

Cuchulainn
Posts: 62071
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: About solving a transport equation

For characteristics in say (t,x,y) the Springer book by Holt "Numerical Methods in Fluid Dynamics" has a chapter on bicharacteristics, Sauer's method and Bruh et al that look relevant. and could possibly be applied. For example, Sauer is doing onto (t,x,y)  what we did on (t,x) for nonlinear systems.

Paul
Posts: 10768
Joined: July 20th, 2001, 3:28 pm

### Re: About solving a transport equation

Fluids will have lots of useful examples, eg supersonics and compressible flow, and thin layers, eg Severn Bore. But they might skip general theory.

Cuchulainn
Posts: 62071
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: About solving a transport equation

A random question: a 2-factor PDE with 1 diffusion d and 2 convections c1 and c2. Do d and c1 belong together c2 out on a limb or do c1 and c2 belong 'more' together with the d term all on its owney oh?

Strang-Marchcuk: option 2

I think 2 is better for several reasons; 1 is extremely popular.

And what about making it into a singular perturbation problem? (the other way around is well-known in another area). Any real first order equation is degenerate elliptic.

$\frac{\partial V}{\partial t} = \varepsilon \frac{\partial^2 V}{\partial A^2} + (S-A) \frac{\partial V}{\partial A} = 0,$

with $0 < \varepsilon \ll 1$

https://en.wikipedia.org/wiki/Lax%E2%80%93Wendroff_method

Cuchulainn
Posts: 62071
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: About solving a transport equation

Just brainstorming, if the MOC can also be applied to this initlial value problem in the plane $-\infty \lt x,y \lt \infty$

$\frac{\partial V}{\partial t} = a \frac{\partial V}{\partial x} + b \frac{\partial V}{\partial y}$
$V(x,y,0) = f(x,y)$

Let's say $a > 0$ and $b > 0$ are constants.

Then the next difficulty is
$\frac{\partial V}{\partial t} = a(1-x^2) \frac{\partial V}{\partial x} + b(1-y^2) \frac{\partial V}{\partial y}$, $-1 \lt x,y \lt 1$

e,g. a transformation $\xi = \xi(x,y,z)$ and $\eta = \eta(x,y,z)$ and proceed as in the 1d case?
It might break down..

Alan
Posts: 10163
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

### Re: About solving a transport equation

Just brainstorming, if the MOC can also be applied to this initlial value problem in the plane $-\infty \lt x,y \lt \infty$

$\frac{\partial V}{\partial t} = a \frac{\partial V}{\partial x} + b \frac{\partial V}{\partial y}$
$V(x,y,0) = f(x,y)$

Let's say $a > 0$ and $b > 0$ are constants.

Then the next difficulty is
$\frac{\partial V}{\partial t} = a(1-x^2) \frac{\partial V}{\partial x} + b(1-y^2) \frac{\partial V}{\partial y}$, $-1 \lt x,y \lt 1$

e,g. a transformation $\xi = \xi(x,y,z)$ and $\eta = \eta(x,y,z)$ and proceed as in the 1d case?
It might break down..

This "next difficulty" problem separates into 2 problems of the same type as before. Use just the coefficient of $V_x$ to compute, as before, the characteristic $\xi^1(x,t)$. Use just the coefficient of $V_y$ to compute, as before, the characteristic $\xi^2(y,t)$. Then it is easy to confirm that the PDE is solved by

$V(x,y,t) = f(\xi^1(x,t),\xi^2(y,t))$

Paul
Posts: 10768
Joined: July 20th, 2001, 3:28 pm

### Re: About solving a transport equation

Is everyone ok with the concept of domains of influence and dependence with respect to these pdes? I’m a bit worried that you aren’t.

And shocks/multi-valued solutions.

Cuchulainn
Posts: 62071
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: About solving a transport equation

A wild guess is that

$\xi^1(x,t) = (x + t(1-x))/(1 + t(1-x))$.
$\xi^2(x,t) = (y + t(1-y))/(1 + t(1-y))$.

I'll get back.

test case
BTW for Asian options, is the exact or FDM solution valid for when $\sigma=0$ e.g. plug into Anchor code, is that heresy?
Last edited by Cuchulainn on January 31st, 2020, 7:34 pm, edited 2 times in total.

Alan
Posts: 10163
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

### Re: About solving a transport equation

@Daniel. No. Paul posted what he said was a solution to the original problem. I haven't checked it, but if it is correct, then you have to take $t \rightarrow -t$ and that should be it for my $\xi^i$, taking your a=b=1. Anyway, the simple cookbook for these 1D problem $V_t = b(x) V_x$ is, as I already posted, first solve

(*)   $\int_x^{\xi(x,t)} \frac{du}{b(u)} = t$.

I think this works generally as long as (i) $b(\cdot)$ remains independent of $t$, and (ii) you stick to integrating in an interval that is free of zero's of $b$. Once you convince yourself $f(\xi(x,t))$ solves  $V_t = b(x) V_x$ with $V(x,0)=f(x)$ in such an interval, then my solution for the "next difficulty" problem should be immediate.

@Paul. I don't know much about shocks. But, I think my solution to the posted problem is correct
Last edited by Alan on January 31st, 2020, 7:57 pm, edited 3 times in total.

Cuchulainn
Posts: 62071
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: About solving a transport equation

Is everyone ok with the concept of domains of influence and dependence with respect to these pdes? I’m a bit worried that you aren’t.

And shocks/multi-valued solutions.
I'm not OK. Some scary thoughts and flashbacks I had during Newsnight last night were,

1. Upwind FDM smears out sharp fronts/shock, making them smoother
2. Discontinuities get propagated
3. Discontinuous initial conditions
4.  Discontinuous initial derivatives
5. Characteristics intersect(is that a shock)

And for some reason "Rankine–Hugoniot conditions" seem to surface now that we had in undergrad fluid dynamics, but it's a long way away. I used conservation of energy (Bernoulli's principle) for waterhammer but I would not know what to do with conservation {mass, momentum), e.g. in a PDE.

But if we stick in bit of the old diffusion, much of 1-5 disappears except (4 and 5?)

How do we know when shocks occur in general?

I have a passing acquaintance with these. My MSc research was FEM for hyperbolic systems of Friedrichs type in Sobolev spaces, but little of 1-5.

Paul
Posts: 10768
Joined: July 20th, 2001, 3:28 pm

### Re: About solving a transport equation

1. Yes. And that’s bad. If no diffusion then there shouldn’t be smoothing.

I think all else is yes, but that’s as it should be!

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

 JOBS BOARD

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

GZIP: On