Questions about different diffusive schemes used in IAMR
ruohai0925 opened this issue · 3 comments
Hello all,
I am now writing the codes about dealing with the diffusive term of the scalar equation. I noticed there are three different rho_flags in the IAMR according to the diffusion type choosing. Then based on the rho_flag, different fluxes terms will be defined and stored, such as codes in the Diffusion::diffusive_scalar.
Now I understand the scheme in the JCP paper, but it seems too difficult for me to distinguish these three different diffusion types and their advantages. Could someone give me a general and short explanation of these three different diffusion types? What are the underlying ideas about designing them?
Thanks so much.
Jordan
Let me chat with @asalmgren about this today - I don't know the history of what these options are. I have a vague understanding about how this relates to whether you are diffusing a simple scalar "phi" as opposed to a conservative rho-weighted scalar "rho*phi", but there appear to be more options here than I am familiar with.
There are three types, corresponding to three types of density weightings in the time derivative.
rho.cp(T).dT/dt, dc/dt, and d(rho.Y)/dt
The first here is for something like a (non-conservative) temperature equation, and will use a time-centered rho
rho^{n+1/2} [ T^{n+1} - T^{n} ] / deltaT
The second doesn't have a rho (this corresponds to what is in the IAMR paper), and corresponds to a transport of a generic conserved scalar. The time derivative in the third is discretized as
[ (rho.Y)^{n+1} - (rho.Y)^n ] / deltaT
This is used, for example, in the low Mach algorithm, where Y_i is a mass fraction, and the conservation equation is for mass density of species i.
Thanks, Andy and Marc. I will go back to think and re-learn this question before adding more understandings here.