fargOCA issueshttps://gitlab.oca.eu/DISC/fargOCA/-/issues2022-02-15T18:47:46Zhttps://gitlab.oca.eu/DISC/fargOCA/-/issues/620Adding radiative energy transport2022-02-15T18:47:46ZElena LegaAdding radiative energy transportOn last December with @fmasset we went through the derivation of the energy equations
quite in detail.
Our conclusion is that the way we treat internal and radiative energy is ok a part one point to be tested.
Up to now we have neglec...On last December with @fmasset we went through the derivation of the energy equations
quite in detail.
Our conclusion is that the way we treat internal and radiative energy is ok a part one point to be tested.
Up to now we have neglected the advection of the radiative energy.
However, this term appears in the orginal derivation of the equation for the temporal evolution of
the radiative energy by Mihalas and Mihalas (Foundations of Radiation Hydrodynamics) and its importance
is stated in the paper "Monte-Carlo Radiation Hydrodinamics with implicit methods" (Roth, Kasen 2014).
In this paper it is shown that even for fluid speed v<<<<c radiation advection is required to correctly transport
the energy.Release 0.9Elena LegaElena Legahttps://gitlab.oca.eu/DISC/fargOCA/-/issues/596Implicit and explicit (Super Time Stepping) solvers for diffusion equation in...2022-01-18T15:50:14ZElena LegaImplicit and explicit (Super Time Stepping) solvers for diffusion equation in Energy StepIn order to solve the Energy Step corresponding to the radiative diffusion we use an implicit solver (sor).
The reason is that, as it is well known, the numerical solution of the diffusion equation obtained
via explicit algorithm is ...In order to solve the Energy Step corresponding to the radiative diffusion we use an implicit solver (sor).
The reason is that, as it is well known, the numerical solution of the diffusion equation obtained
via explicit algorithm is numerically unstable for time-step larger than:
$`\Delta t_p = {{ C_p }\over {max({{\Chi_x} \over {\Delta x^2}} + {{\Chi_y}\over {\Delta y^2}} + {{\Chi_z}\over {\Delta z^2}})}}`$
where $`C_p<0.5`$ is the parabolic courant number and $`\Chi_x`$, $`\Chi_y`$ and $`\Chi_z`$ are the thermal diffusivities in units $`[L^2]/[T]`$.
We recall that in the code the hydro time-step computed via the CFL condition scales linearly with the grid resolution ($`\Delta x`$, $`\Delta y`$ and $`\Delta z`$); therefore for large grid resolution and/or thermal diffusivities, $`\Delta t_p`$ is much shorter than the hydro time step and the explicit method is very inefficient.
The implicit solution has the great advantage of being unconditionally stable (one may loose precision of the solution but not the stability for large time-steps). The great disadvantage is that implicit algorithm are based on iterative solutions and is not solvable in parallel in a scalable way.
There exists an alternative method, which is explicit and allows to use a time-step $`\tau`$ larger than $`\Delta t_p`$ iterating over a small number $`s`$ of sub steps of length $`\Delta t_j`$ such that:
$`\tau = \sum _{i=1}^{s} \Delta t_j.`$
This is obtained requiring that the solution is stable on
$`\tau`$ and not on each $`\Delta t_j`$. The method is called super-time stepping (Alexiades,Amiez,Gremaud 1995).
The solution at intermediate steps $`\Delta t_j`$ is obtained either via Tchebychev or Legendre polynĂ´mes. An example for $s=3$ is given in [Mignone et al. 2017](https://arxiv.org/pdf/1702.05487.pdf)
For our code fargOCA the interest of the super time stepping is twofold:
1) explicit method are easy to parallelize: we would really benefit of high degree of parallelization in this phase in which we are moving the code on Kokkos (practically finished by @alainm) in order to use GPUs and future accelerators. We stress the fact that new machines coming on the national panorama are based on GPUs.
2) we need to solve th diffusion equation faster for all the projects involving fully radiative model like for example the "inflow" case that we are studying with @morbyRelease 0.9Elena LegaElena Lega