simulkade / FVTool

Finite volume toolbox for Matlab/Octave
http://fvt.simulkade.com
BSD 2-Clause "Simplified" License
99 stars 56 forks source link

What's the difference between Cylindrical2D and Radial2D? #13

Closed peiyang988 closed 5 years ago

peiyang988 commented 7 years ago

Hello, Thank you for sharing FVTool, I've benefited a lot from it.

After reading some of the codes, I was a little confused by 2-D Cylindrical coordinate system. I know 3-D Cylindrical coordinate system(r, θ, z), but don't know what 2-D Cylindrical means.

If the 2-D Cylindrical coordinate system is based on the r-z plane, what is the difference between it and the 2-D Cartesian coordinate system(x-y)? If the 2-D Cylindrical coordinate system is based on the r-θ plane, what is the difference between it and the 2-D Radial coordinate system(r-θ)?

In addition, can this tool solve equations in 3-D Spherical grids?

I'll appreciate it if you can make me clear about these questions. Thanks!

simulkade commented 7 years ago

Hi @peiyang988

2D cylindrical coordinate (r, z); its difference with the 2D Cartesian is explained here: see, e.g., the difference between the divergence terms, although the gradient terms are identical. 2D radial (r, θ).

Unfortunately, I have not implemented the discretization terms in the 3D spherical coordinate yet, mostly because I never needed it in my work. It can be done relatively easily by modifying the code for the 3D cylindrical terms.

peiyang988 commented 7 years ago

Thanks for your prompt reply. I've got it. 2-D Cylindrical coordinate system is a stretch of the 1-D radial coordinate system in the z direction.