PLUTO  4.4-patch2
Macros | Functions
sts.c File Reference

Super Time Stepping driver for integration of diffusion terms. More...

#include "pluto.h"

Macros

#define STS_NU   0.01
 

Functions

static void STS_ComputeSubSteps (double, double tau[], int)
 
static double STS_FindRoot (double, double)
 
void STS (const Data *d, double dt, timeStep *Dts, Grid *grid)
 

Detailed Description

Take one step in the solution of the diffusion equation $ dU/dt = R(\partial^2U) $ where R is a nonlinear right hand side involving second derivatives. The super step is taken to be equal to the current time step dt and the number of substeps Nsts is given by solving the following nonlinear equation:

\[ \frac{\Delta t}{\Delta t_{\rm par}} = \frac{N}{2\sqrt{\nu}}\frac{(1+\sqrt{\nu})^{2N} - (1-\sqrt{\nu})^{2N}} {(1+\sqrt{\nu})^{2N} + (1-\sqrt{\nu})^{2N}} \]

where $\nu$ is set by the macro STS_NU (default equal to 0.01). The previous relation is given by Eq. [2.10] of Alexiades et al. with the explicit parabolic time step $\Delta t_{\rm par}$ being computed from

\[ \frac{2}{N_d} \max\left[ \frac{\eta_x}{\Delta x^2} + \frac{\eta_y}{\Delta y^2} + \frac{\eta_z}{\Delta z^2} \right] \Delta t_{\rm par} = C_p < \frac{1}{N_d} \]

where $C_p$ is the parabolic Courant number, $ N_d $ is the number of spatial dimensions and the maximum of the square bracket is computed during the call to ParabolicRHS.

This function is called in an operator-split way before/after advection has been carried out.

References

Authors
A. Mignone (migno.nosp@m.ne@t.nosp@m.o.inf.nosp@m.n.it)
T. Matsakos
Date
July 1, 2019

Macro Definition Documentation

◆ STS_NU

#define STS_NU   0.01

Sets the nu parameter used in STS.

Function Documentation

◆ STS()

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

Solve diffusion equation(s) using Super-Time-Stepping.

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

◆ STS_ComputeSubSteps()

void STS_ComputeSubSteps ( double  dtex,
double  tau[],
int  N 
)
static

Compute the single sub-step sequence (Eq. [2.9]). N must be an integer by now.

◆ STS_FindRoot()

double STS_FindRoot ( double  dt_exp,
double  dT 
)
static

Find the number of sub-steps N by solving Eq. (2.10) of AAG using a Newton-Raphson scheme. Input to the function are:

Parameters
[in]dt_expthe explicit time step
[in]dtthe super-step.