PLUTO
tc_kappa.c File Reference
#include "pluto.h"
Include dependency graph for tc_kappa.c:

Go to the source code of this file.

Functions

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

Function Documentation

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.

Definition at line 3 of file tc_kappa.c.

5 {
6  double mu, nH, sqT, T, B2_cgs;
7  double ctts_mu = 1.265060;
8 
9  mu = ctts_mu/2.0;
10  T = v[PRS]/v[RHO]*(mu*CONST_mp*UNIT_VELOCITY*UNIT_VELOCITY/CONST_kB);
11  sqT = sqrt(T);
12 
13  *kpar = 5.6e-7*T*T*sqT;
14 
15  #if PHYSICS == MHD
16  nH = v[RHO]*UNIT_DENSITY/(mu*CONST_mp);
17  B2_cgs = EXPAND(v[BX1]*v[BX1], + v[BX2]*v[BX2], + v[BX3]*v[BX3]) + 1.e-12;
19  *knor = 3.3e-16*nH*nH/sqT/B2_cgs;
20  #else
21  *knor = 0.0;
22  #endif
23 
24  *kpar *= CONST_mp*mu/(UNIT_DENSITY*UNIT_VELOCITY*UNIT_LENGTH*CONST_kB);
25  *knor *= CONST_mp*mu/(UNIT_DENSITY*UNIT_VELOCITY*UNIT_LENGTH*CONST_kB);
26 
27  *phi = 0.3;
28 }
tuple T
Definition: Sph_disk.py:33
#define UNIT_DENSITY
Unit density in gr/cm^3.
Definition: pluto.h:369
#define RHO
Definition: mod_defs.h:19
#define CONST_mp
Proton mass.
Definition: pluto.h:261
#define UNIT_VELOCITY
Unit velocity in cm/sec.
Definition: pluto.h:377
#define UNIT_LENGTH
Unit Length in cm.
Definition: pluto.h:373
#define CONST_kB
Boltzmann constant.
Definition: pluto.h:259
#define BX3
Definition: mod_defs.h:27
#define BX1
Definition: mod_defs.h:25
#define CONST_PI
.
Definition: pluto.h:269
#define BX2
Definition: mod_defs.h:26