PLUTO
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
tc_kappa.c
Go to the documentation of this file.
1
/* ///////////////////////////////////////////////////////////////////// */
2
/*!
3
\file
4
\brief Define the thermal conduction coefficients.
5
6
Use this function to supply the thermal conduction coefficients \f$
7
\kappa_\| \f$ and \f$ \kappa_\bot \f$ along and across magnetic
8
field lines and the \f$ \phi \f$ parameter used to control the magnitude
9
of the saturated flux \f$ F_{\rm sat} = 5\phi\rho c_{\rm iso}^3 \f$.
10
To exclude saturation, simply set \f$ \phi \f$ to a very large number.
11
12
\authors A. Mignone (mignone@ph.unito.it)\n
13
T. Matsakos
14
\date Oct 31, 2012
15
*/
16
/* ///////////////////////////////////////////////////////////////////// */
17
#include "
pluto.h
"
18
19
/* ********************************************************************* */
20
void
TC_kappa
(
double
*v,
double
x1,
double
x2,
double
x3,
21
double
*kpar,
double
*knor,
double
*phi)
22
/*!
23
* Compute thermal conduction coefficients.
24
*
25
* \param [in] v array of primitive variables
26
* \param [in] x1 coordinate in the X1 direction
27
* \param [in] x2 coordinate in the X2 direction
28
* \param [in] x3 coordinate in the X3 direction
29
* \param [out] kpar pointer to the conduction coefficient
30
* \f$ \kappa_\parallel \f$ in the direction of magnetic
31
* field
32
* \param [out] knor pointer to the conduction coefficient
33
* \f$ \kappa_\perp \f$ perpendicular to magnetic field
34
* \param [out] phi pointer to the parameter \f$ \phi \f$ controlling the
35
* magnitude of the saturated flux.
36
*
37
*********************************************************************** */
38
{
39
double
mu,
T
, B2_cgs, nH;
40
41
mu = 0.5;
42
T = v[PRS]/v[
RHO
]*mu*
KELVIN
;
43
44
*kpar = 5.6e-7*T*T*sqrt(T);
45
#if PHYSICS == MHD
46
B2_cgs = EXPAND(v[
BX1
]*v[
BX1
], + v[
BX2
]*v[
BX2
], + v[
BX3
]*v[
BX3
]) + 1.e-12;
47
B2_cgs *= 4.0*
CONST_PI
*
UNIT_DENSITY
*
UNIT_VELOCITY
*
UNIT_VELOCITY
;
48
nH = v[
RHO
]*
UNIT_DENSITY
/
CONST_mp
;
49
*knor = 3.3e-16*nH*nH/(sqrt(T)*B2_cgs);
50
#endif
51
52
*phi = 0.3;
53
}
Sph_disk.T
tuple T
Definition:
Sph_disk.py:33
UNIT_DENSITY
#define UNIT_DENSITY
Unit density in gr/cm^3.
Definition:
pluto.h:369
RHO
#define RHO
Definition:
mod_defs.h:19
KELVIN
#define KELVIN
Definition:
pluto.h:401
CONST_mp
#define CONST_mp
Proton mass.
Definition:
pluto.h:261
UNIT_VELOCITY
#define UNIT_VELOCITY
Unit velocity in cm/sec.
Definition:
pluto.h:377
TC_kappa
void TC_kappa(double *v, double x1, double x2, double x3, double *kpar, double *knor, double *phi)
Definition:
tc_kappa.c:20
BX3
#define BX3
Definition:
mod_defs.h:27
pluto.h
PLUTO main header file.
BX1
#define BX1
Definition:
mod_defs.h:25
CONST_PI
#define CONST_PI
.
Definition:
pluto.h:269
BX2
#define BX2
Definition:
mod_defs.h:26
Src
Thermal_Conduction
tc_kappa.c
Generated by
1.8.10