marthinwurer / gcmiipy

A recreation of GISS's GCMII Global Climate model in python
2 stars 0 forks source link

Discretize the Navier-stokes equations #1

Open marthinwurer opened 5 years ago

marthinwurer commented 5 years ago

Discretize the Navier-stokes equations step by step.

Start with just the Euler equations: ignore the viscosity terms at first.

Do a step by step guide with citations on how to discretize them.

Solve them for 1d first.

marthinwurer commented 5 years ago

So, my goal was to do this explicitly. As per https://www.myroms.org/wiki/Time-stepping_Schemes_Review There are only a few ways of doing this that are stable. As we have no real diffusion, we need the advection equation to be stable. Upwinding is one way to do this, which I might have to resort to. I'd rather do some sort of central differences method.

Goals for a discretization method:

Actually, might be able to do the forward-backward step in that link. Or use some kind of flux limiter to keep things stable.

http://www.ita.uni-heidelberg.de/~dullemond/lectures/num_fluid_2012/Chapter_4.pdf

This has a good selection of things. I basically want stable and TVD so there are no oscillations.

These basically look like upwinding with a bigger stencil and slope limits - which is kind of what they are.

https://www3.nd.edu/~gtryggva/CFD-Course/2011-Lecture-15.pdf

http://www.ita.uni-heidelberg.de/~dullemond/lectures/num_fluid_2012/Chapter_3.pdf

http://www.ita.uni-heidelberg.de/~dullemond/lectures/num_fluid_2012/Chapter_5.pdf

5.2.3 The order of evaluation matters...

https://www.io-warnemuende.de/tl_files/staff/burchard/pdf/liege02.pdf

https://www.youtube.com/watch?v=sz_6hw0vEa4

Ok, TVD schemes as she's explaining them have two portions. One is the linear upwind, and the other is the higher order function. Both are discretizations. We use some ratio function to determine what portion of which we are using.

To find the ratio, you plug in the local gradient of the term to a function, and that function is the TVD scheme you use.

These will only work for 2nd order ones.

I should also try adding diffusion intentionally

https://www.youtube.com/watch?v=K343wYgdsOc

https://www.youtube.com/watch?v=gQ7KGhuE1e8

Talks about test case for models

http://www.mathematik.uni-dortmund.de/~kuzmin/cfdintro/lecture4.pdf

https://web.stanford.edu/group/frg/course_work/AA214B/CA-AA214B-Ch6.pdf

https://pdfs.semanticscholar.org/847f/819a4ea14bd789aca8bc88e85e906cfc657c.pdf

https://s3.amazonaws.com/academia.edu.documents/41958572/A_comparison_of_high-order_explicit_and_20160203-30232-royb3h.pdf?AWSAccessKeyId=AKIAIWOWYYGZ2Y53UL3A&Expires=1546472024&Signature=XzKOfb%2FnKjJtS7kzKVODtCK3Dic%3D&response-content-disposition=inline%3B%20filename%3DA_comparison_of_high-order_explicit_and.pdf

http://www.waveworkshop.org/10thWaves/Papers/WHF10Paper_Li.pdf

marthinwurer commented 5 years ago

https://www.ljll.math.upmc.fr/~despres/BD_fichiers/TD_1.pdf

ta.twi.tudelft.nl/nw/users/matthias/teaching/athens/timestepping_2015.pdf

http://www.cs.tau.ac.il/~turkel/PSmanuscripts/jst.pdf

https://www.coaps.fsu.edu/pub/eric/OCP5930/Papers/Boris_Book_Flux_Corrected_Transport.pdf#page=2&zoom=auto,434,1023

For higher order stuff:

https://en.wikipedia.org/wiki/Finite_difference_coefficient