-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathres_eta.c
executable file
·35 lines (32 loc) · 1.36 KB
/
res_eta.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* ///////////////////////////////////////////////////////////////////// */
/*!
\file
\brief Define the components of the diagonal resistive tensor.
Use this function to supply the resistivity in the three directions
\f$ \eta_{x1}\f$, \f$ \eta_{x2}\f$ and \f$ \eta_{x3}\f$.
\authors A. Mignone ([email protected])\n
\date Feb 26, 2019
*/
/* ///////////////////////////////////////////////////////////////////// */
#include "pluto.h"
/* ********************************************************************* */
void Resistive_eta(double *v, double x1, double x2, double x3,
double *J, double *eta)
/*!
* Compute the resistive tensor components as function of the primitive
* variables, coordinates and currents.
*
* \param [in] v array of primitive variables
* \param [in] x1 coordinate in the X1 direction
* \param [in] x2 coordinate in the X2 direction
* \param [in] x3 coordinate in the X3 direction
* \param [in] J current components, J[IDIR], J[JDIR], J[KDIR]
* \param [out] eta an array containing the three components of
* \f$ \tens{\eta}\f$.
*
*********************************************************************** */
{
eta[IDIR] = g_inputParam[ETA]; /* For strictly 2D flow (Bz = 0) */
eta[JDIR] = g_inputParam[ETA]; /* only eta_z is necessary. */
eta[KDIR] = g_inputParam[ETA];
}