WARPXM v1.10.0
Loading...
Searching...
No Matches
functions.h
Go to the documentation of this file.
1#ifndef FUNCTIONS_H
2#define FUNCTIONS_H
3
4#include "warpxm/warpxm_config.h"
5
6#include <cmath>
7#include <vector>
8
18 real coulomb_log_a,
19 real A_a,
20 real Z_a,
21 real A_b,
22 real Z_b)
23{
24
25 // K = (nu_p_tau)*sqrt(2)*Z_a*Z_a*Z_b*Z_b * coulomb_log * (A_a+A_b)/(A_a*A_a*A_b*A_b)
26
27 return nu_p_norm * sqrt(2) * Z_a * Z_a * Z_b * Z_b * coulomb_log_a * (A_a + A_b) /
28 (A_a * A_a * A_b * A_b);
29}
30
32 real minimum,
33 real A_a,
34 real A_b,
35 real theta_a,
36 real rho_b,
37 real theta_b)
38{
39 // theta_a = T_a/A_a = pressure_a/rho_a
40 // nu_a_b = K * rho_b/(theta_a+theta_b)^(3/2)
41 return fmax(minimum, collision_coefficient * rho_b / pow(theta_a + theta_b, 1.5));
42}
43
45 real minimum,
46 real rho,
47 real theta)
48{
49 // here a=b
50 // same calculation coefficient (K)
51 // rho_b=rho
52 // theta_a=theta_b=theta
53 return fmax(minimum, collision_coefficient * rho / pow(2.0 * theta, 1.5));
54}
55
56void mat_mult(const std::vector<std::vector<real>>& a,
57 const std::vector<std::vector<real>>& b,
58 std::vector<std::vector<real>>& c);
59
60
62
63#endif // FUNCTIONS_H
void mat_mult(const std::vector< std::vector< real > > &a, const std::vector< std::vector< real > > &b, std::vector< std::vector< real > > &c)
real calculate_collision_coefficient(real nu_p_norm, real coulomb_log_a, real A_a, real Z_a, real A_b, real Z_b)
Definition: functions.h:17
real calculate_interspecies_collision_frequency(real collision_coefficient, real minimum, real A_a, real A_b, real theta_a, real rho_b, real theta_b)
Definition: functions.h:31
real calculate_intraspecies_collision_frequency(real collision_coefficient, real minimum, real rho, real theta)
Definition: functions.h:44
real heaviside(real x)
#define real
Definition: wmoclunstructuredreconstruction.h:11