PLUTO  4.4-patch2
Functions
rkl.c File Reference

Runge-Kutta-Legendre driver for integration of diffusion terms. More...

#include "pluto.h"

Functions

void RKL (const Data *d, double dt, timeStep *Dts, Grid *grid)
 

Detailed Description

Take one step in the solution of the diffusion equation $ dQ/dT = F$ using Runge-Kutta-Legendre (RKL) method. Equations are evolved in time by taking s sub-steps including only the diffusion (parabolic) terms. The full step tau equals the current integration time step (from hydro or a fixed one).

This driver can be used with a 1st or 2nd order algorithm (default is 2).

For the 1st order method (RKL_ORDER = 1):

\[ \begin{array}{lcl} Y_0 & = & U^n \\ \noalign{\medskip} Y_1 & = & Y_0 + \tilde{\mu}_1\tau M(Y_0) \\ \noalign{\medskip} Y_j & = & \mu_j Y_{j-1} + \nu_j Y_{j-2} + \tilde{\mu}_j \tau M(Y_{j-1}) \quad \rm{for} \quad j = 2,...,s \\ \noalign{\medskip} U^{n+1} & = & Y_s \end{array} \]

where

\[ \begin{array}{lclclcl} b_0 = b_1 = b_2 & = & 1 & & b_j & = & 1 \\ \noalign{\medskip} a_j & = & 0.0 & & w_1 & = & \frac{2}{s^2 + s} \\ \noalign{\medskip} \mu_j & = & \frac{2j - 1}{j} w_1 & & \nu_j & = & -\frac{j-1}{j} \\ \noalign{\medskip} \tilde{\mu}_j & = & w_1 \mu_j & & \quad \rm{for} \quad j = 2,...,s \end{array} \]

For the 2nd order method (RKL_ORDER = 2):

\[ \begin{array}{lcl} Y_0 & = & U^n \\ \noalign{\medskip} Y_1 & = & Y_0 + \tilde{\mu}_1\tau M(Y_0) \\ \noalign{\medskip} Y_j & = & \mu_j Y_{j-1} + \nu_j Y_{j-2} + (1 - \mu_j - \nu_j) Y_0 + \tilde{\mu}_j \tau M(Y_{j-1}) + \tilde{\gamma}_j \tau M(Y_0) \quad \rm{for} \quad j = 2,...,s \\ \noalign{\medskip} U^{n+1} & = & Y_s \end{array} \]

where

\[ \begin{array}{lclclcl} b_0 = b_1 = b_2 & = & \frac{1}{3} & & b_j & = & \frac{j^2 + j - 2}{2j(j + 1)} \\ \noalign{\medskip} a_j & = & 1 - b_j & & w_1 & = & \frac{4}{s^2 + s - 2} \\ \noalign{\medskip} \mu_j & = & \frac{2j - 1}{j} \frac{b_j}{b_{j-1}} & & \nu_j & = & -\frac{j-1}{j} \frac{b_j}{b_{j-2}} \\ \noalign{\medskip} \tilde{\mu}_j & = & w_1 \mu_j & & \tilde{\gamma}_j = -a_{j-1}\tilde{\mu}_j \quad \rm{for} \quad j = 2,...,s \end{array} \]

Todo:
  • selective update on variables
  • remove tau from multiplication inside inner loop (put it outside)

References

Authors
L. Rickler (luca..nosp@m.rick.nosp@m.ler@e.nosp@m.du.u.nosp@m.nito..nosp@m.it)
A. Mignone (migno.nosp@m.ne@t.nosp@m.o.inf.nosp@m.n.it)
Date
Aug 09, 2019

Function Documentation

◆ RKL()

void RKL ( const Data d,
double  dt,
timeStep Dts,
Grid grid 
)

Solve diffusion equation using Runge-Kutta-Legendre (RKL) method

Parameters
[in,out]dpointer to Data structure
[in]dtthe time step increment
[in,out]Dtspointer to timeStep structure
[in]gridpointer to an array of Grid structures