jlperla / continuous_time_methods

MIT License
23 stars 15 forks source link

Verify algebra for discretizing a dynamic operator (with uniform and non-uniform grids) #31

Closed jlperla closed 6 years ago

jlperla commented 6 years ago

Hi guys: I have set you both as assignees, and you can discuss splitting up any tasks.

I think I have a starting point for the algebra for discretizing the PDE. Get the latest version of the operator_discretization_finite_differences.tex and compile it. You will see section 2 now has code on discretizing an operator with time dependence. Hopefully it is clear.

Some of the tasks here are:

sevhou commented 6 years ago

We've checked first two points the notes seem fine except for minor typos on page 11, I'll fix it on my desktop.

I think the interior of matrix (82) is fine and I'll type up the algebra similar to (36)-(40) during the weekend and check for the boundaries. The interior for implicit in time formulation is good, I'll check for boundary as well.

Anyway we will finish this task by Monday I think.

sevhou commented 6 years ago

The other thing is about the case with non uniform grid:

Do we actually need the time grid to be non uniform as well? First it's not clear what does it mean by time difference changing along the grid; another thing is I don't know what this buys us. But probably I'm wrong about it.

jlperla commented 6 years ago

Great, thanks. I think that the non uniform time grid would be able to reduce the size of the problem when we know certain regions of time would be very flat. For example, as we move towards a steady state, we shouldn't need very precise time steps since the value function shouldn't change much over time.

But that depends on the unconditional convergence of the method for large time steps (which generally requires implicit methods in time), so we need to be a little careful. Regardless, I think the algebra is useful to generalize.

sevhou commented 6 years ago

It turns out your guess of (82) is correct, I've added some steps from $A^{n}$ to $A$, it's a mess when it appears on the notes but it helps me to organize the thoughts, feel free to delete it if you think it's more confusing than helpful.

And I also think the implicit result you guessed is correct as well, do you want us to type it in the same way as explicit solution? Or you just need the key matrices etc.

jlperla commented 6 years ago

Awesome. Yes, it is worth carefully verifying the implicit solution as well (since we should test both). I still wasn't sure about the implicit setup at the $t=0$ step, so carefully go through the equations at that step, and don't assume that I did it correctly. Due to the lack of an initial value, these setups are trickier than the usual PDEs.

jlperla commented 6 years ago

Checked things out, and it looks great with the extra steps. If they are useful for you, then they would be useful for someone trying to understand the derivations of the methods.

jlperla commented 6 years ago

I am going to close this, and put the implicit method in a separate issue.