PLUTO  4.4-patch2
Functions
source.c File Reference

Compute source terms for Powell formulation. More...

#include "pluto.h"

Functions

void Roe_DivBSource (const Sweep *sweep, int beg, int end, Grid *grid)
 
void HLL_DivBSource (const Sweep *sweep, double **Uhll, int beg, int end, Grid *grid)
 

Detailed Description

This file contains two implementations of Powell's source term in the 8-wave formulation for MHD:

\[ Q\nabla\cdot\vec{B} \approx Q_i\, \frac{A_{i\HALF}B_{i+\HALF} - A_{i-\HALF}B_{i-\HALF}}{\Delta{\cal V}_i} \]

where B is the magnetic field in the normal direction (g_dir), Q is a fluid quantity, A is the area and the denominator is the cell volume. The first function, Roe_DivBSource() is called by Roe_Solver() and TVDLF_Solver() and computes the normal component using arithmetic average of the left and right states: $ B_{i+\HALF} = (B^+_i + B^-_{i+1})/2 $. The second implementation contained in HLL_DivBSource() computes the term using upwinding:

\[ B_{i+\HALF} = \left\{\begin{array}{ll} B^+_i & \qquad{\rm if}\quad F_{\rho,i+\HALF} > 0\\ \noalign{\medskip} B^-_{i+1} & \qquad{\rm otherwise} \end{array}\right. \]

Reference:

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

Function Documentation

◆ HLL_DivBSource()

void HLL_DivBSource ( const Sweep sweep,
double **  Uhll,
int  beg,
int  end,
Grid grid 
)

Include div.B source term to momentum, induction and energy equation. Used in conjunction with an HLL-type Riemann solver.

◆ Roe_DivBSource()

void Roe_DivBSource ( const Sweep sweep,
int  beg,
int  end,
Grid grid 
)

Include Powell div.B source term to momentum, induction and energy equation for Roe and TVDLF solvers.