Functions

microphysics/get_eta.c File Reference

Functions to calculate the diffusion coefficients for resistivity. More...

Go to the source code of this file.

Functions

void convert_diffusion (Real sigma_O, Real sigma_H, Real sigma_P, Real *eta_O, Real *eta_H, Real *eta_A)
 Convert conductivities to diffusivities.
void get_eta (GridS *pG)
 Get magnetic diffusivities.
void eta_single_const (GridS *pG, int i, int j, int k, Real *eta_O, Real *eta_H, Real *eta_A)
 Single-ion prescription with constant diffusivities.
void eta_single_user (GridS *pG, int i, int j, int k, Real *eta_O, Real *eta_H, Real *eta_A)
 Single-ion prescription with user defined diffusivities.
void eta_general_user (GridS *pG, int i, int j, int k, Real *eta_O, Real *eta_H, Real *eta_A)
 Generalized prescription with user defined conductivities.

Detailed Description

Functions to calculate the diffusion coefficients for resistivity.

We provide two standard prescriptions, divided into 3 cases:

  1. CASE 1: eta_Ohm is constant and n_e and rho_i are proportional to gas density rho. The user needs to provide eta_Ohm and two proportional coefficients Q_Hall and Q_AD, which are defined in global.h.
  1. CASE 2: The user provides his/her own function to evaluate the etas, e.g., spatially variable diffussivity, or adopting some chemical model. The (blank) function is given in the problem generator.
  1. CASE 3: The user provides his/her own function to calculate the sigmas, e.g., from non-equilibrium chemistry to evaluate them self-consistently. The (blank) function is given in the problem generator.

CONTAINS PUBLIC FUNCTIONS:

Definition in file get_eta.c.


Function Documentation

void convert_diffusion ( Real  sigma_O,
Real  sigma_H,
Real  sigma_P,
Real eta_O,
Real eta_H,
Real eta_A 
)

Convert conductivities to diffusivities.

NOTE: c^2/4pi factor is NOT included, so (eta x sigma) is dimensionless. The conductivity coefficients should have the right dimension.

Definition at line 177 of file get_eta.c.

Referenced by eta_general_user().

Here is the caller graph for this function:

void eta_general_user ( GridS pG,
int  i,
int  j,
int  k,
Real eta_O,
Real eta_H,
Real eta_A 
)

Generalized prescription with user defined conductivities.

This corresponds to CASE 3. Note the same get_eta_user() function is used to calculate conductivities rather than diffusivities here.

Definition at line 155 of file get_eta.c.

References convert_diffusion(), and get_eta_user().

Here is the call graph for this function:

void eta_single_const ( GridS pG,
int  i,
int  j,
int  k,
Real eta_O,
Real eta_H,
Real eta_A 
)

Single-ion prescription with constant diffusivities.

NEED global parameters: eta_Ohm, Q_Hall and Q_AD. ONLY eta_Ohm has the dimension of diffusivity. This correspond to CASE 1.

Definition at line 108 of file get_eta.c.

References ConsS::B1c, ConsS::B2c, ConsS::B3c, ConsS::d, d_ind, eta_Ohm, Q_AD, Q_Hall, and GridS::U.

void eta_single_user ( GridS pG,
int  i,
int  j,
int  k,
Real eta_O,
Real eta_H,
Real eta_A 
)

Single-ion prescription with user defined diffusivities.

This corresponds to CASE 2.

Definition at line 136 of file get_eta.c.

References get_eta_user().

Here is the call graph for this function:

void get_eta ( GridS pG  ) 

Get magnetic diffusivities.

Definition at line 63 of file get_eta.c.

References GridS::eta_AD, GridS::eta_Hall, GridS::eta_Ohm, get_myeta, GridS::ie, il, GridS::is, iu, GridS::je, jl, GridS::js, ju, GridS::ke, kl, GridS::ks, ku, and GridS::Nx.

Referenced by integrate_diff().

Here is the caller graph for this function: