PLUTO  4.4-patch2
Functions
tc.h File Reference

Thermal conduction (TC) module header file. More...

Go to the source code of this file.

Functions

void TC_Flux (double ***, const Sweep *, double *, int, int, Grid *)
 
void TC_kappa (double *, double, double, double, double *, double *, double *)
 
void TC_RHS (const Data *, Data_Arr, double *, double **, double, int, int, Grid *)
 
void GetGradient (double ***, double **, int, int, Grid *)
 

Detailed Description

Contains prototypes for the thermal conduction module.

Authors
A. Mignone (migno.nosp@m.ne@p.nosp@m.h.uni.nosp@m.to.i.nosp@m.t)
T. Matsakos
Date
May 11, 2018

Function Documentation

◆ GetGradient()

void GetGradient ( double ***  T,
double **  gradT,
int  beg,
int  end,
Grid grid 
)

Compute the gradient of a 3D scalar quantity T in the direction given by g_dir. Return a 1D array (dT/dx, dT/dy, dT/dz) along that direction computed at cell interfaces, e.g.

if g_dir == IDIR –> compute

[ dT/dl1, dT/dl2, dT/dl3 ] at interface (i+1/2,j,k)

if g_dir == JDIR –> compute

[ dT/dl1, dT/dl2, dT/dl3 ] at interface (i,j+1/2,k)

if g_dir == KDIR –> compute

[ dT/dl1, dT/dl2, dT/dl3 ] at interface (i,j,k+1/2)

Here dl1, dl2 and dl3 are the line element in the thre directions:

Cartesian: {dl1, dl2, dl3} = {dx, dy, dz} Cylindrical: {dl1, dl2, dl3} = {dr, dz, - } Polar: {dl1, dl2, dl3} = {dr, r.dphi, dz} Spherical: {dl1, dl2, dl3} = {dr, r.dtheta, r.sin(theta).dphi}

LAST MODIFIED

14 Apr 2011 by T. Matsakos, A. Mignone

◆ TC_Flux()

void TC_Flux ( double ***  T,
const Sweep sweep,
double *  dcoeff,
int  beg,
int  end,
Grid grid 
)

Compute the thermal conduction flux, sweep->par_flx.

Parameters
[in]T3D array containing the dimensionless temperature
[in,out]sweeppointer to a Sweep structure
[out]dcoeffthe diffusion coefficient needed for computing the time step.
[in]beginitial index of computation
[in]endfinal index of computation
[in]gridpointer to an array of Grid structures
Returns
This function has no return value.

◆ TC_kappa()

void TC_kappa ( double *  v,
double  x1,
double  x2,
double  x3,
double *  kpar,
double *  knor,
double *  phi 
)

Compute thermal conduction coefficients.

Parameters
[in]varray of primitive variables
[in]x1coordinate in the X1 direction
[in]x2coordinate in the X2 direction
[in]x3coordinate in the X3 direction
[out]kparpointer to the conduction coefficient $ \kappa_\parallel $ in the direction of magnetic field
[out]knorpointer to the conduction coefficient $ \kappa_\perp $ perpendicular to magnetic field
[out]phipointer to the parameter $ \phi $ controlling the magnitude of the saturated flux.

◆ TC_RHS()

void TC_RHS ( const Data d,
Data_Arr  dU,
double *  dcoeff,
double **  aflux,
double  dt,
int  beg,
int  end,
Grid grid 
)
Parameters
[in]dpointer to PLUTO Data structure
[out]dUa 4D array containing conservative variables increment
[out]dcoeff1D array of diffusion coefficients
[out]afluxpointer to 2D array for AMR re-fluxing operations
[in]dtthe current time-step
[in]beg,endinitial and final interface indices
[in]gridpointer to Grid structure.