WARPXM v1.10.0
Loading...
Searching...
No Matches
rmhd.h
Go to the documentation of this file.
1#pragma once
2
4
5namespace wxm
6{
7namespace apps
8{
9namespace rmhd
10{
11
12real current_density_cart(const real skin_depth_norm, const real* grad_B[3], real* J);
13
14real current_density_cyl(const real skin_depth_norm,
15 const real r,
16 const real* B,
17 const real* grad_B[3],
18 const int ir,
19 const int ith,
20 const int iz,
21 real* J);
22
23real get_eta(const real* q,
24 const real J[3],
25 const bool const_resistivity,
26 const real constant_resistivity_eta,
27 const std::string resistivity_type,
28 const real max_eta,
29 const real min_eta,
30 const real n_vac,
31 const real eta_vac,
32 const real gas_gamma,
33 const real ompt,
34 const real nupt,
35 const real lnlam = 10.0,
36 const real Ai = 1.0,
37 const real Zi = 1.0,
38 const real Ae = 1.0 / 1836.0,
39 const real rho_min = std::numeric_limits<real>::epsilon(),
40 const real press_min = std::numeric_limits<real>::epsilon());
41
70 const real gas_gamma,
71 const real lnlam = 10,
72 const real Ai = 1.0,
73 const real Zi = 1.0,
74 const real Ae = 1.0 / 1836.0,
75 const real rho_min = std::numeric_limits<real>::epsilon(),
76 const real press_min = std::numeric_limits<real>::epsilon());
77
101 const real J[3],
102 const real gas_gamma,
103 const real ompt,
104 const real nupt,
105 const real lnlam = 10,
106 const real Ai = 1.0,
107 const real Zi = 1.0,
108 const real Ae = 1.0 / 1836.0,
109 const real rho_min = std::numeric_limits<real>::epsilon(),
110 const real press_min = std::numeric_limits<real>::epsilon());
111
113 const real nu_p_norm,
114 const real skin_depth_norm,
115 const solverVariables_t* pSV,
116 const real* q,
117 const real* J,
118 const real eta,
119 std::vector<std::vector<real>>& internal_diffusion_flux);
120
121void noslipWallCondition_MHD(const real gas_gamma,
122 const solverVariables_t* pSV,
123 const real* QC,
124 const real vx_w,
125 const real vy_w,
126 const real vz_w,
127 const real bx_w,
128 const real by_w,
129 const real bz_w,
130 real* QC_w,
131 const real rho_min = std::numeric_limits<real>::epsilon(),
132 const real press_min = std::numeric_limits<real>::epsilon());
133
156 const real j_coefficient,
157 const real diffusion_coefficient,
158 const real eta,
159 const real cfl_diff = 0.5);
160
161namespace bc
162{
163// helper functions for boundary condition current profiles
164real ramp(const real t, const real per, const real Imax);
165real staggered_ramp(const real t, const real per, const real Imax);
166real half_period_sine_wave(const real t, const real t_qtr, const real Imax);
167
168} // namespace bc
169
170} // namespace rmhd
171} // namespace apps
172} // namespace wxm
list apps
Definition: shock_tube.py:33
real staggered_ramp(const real t, const real per, const real Imax)
real ramp(const real t, const real per, const real Imax)
real half_period_sine_wave(const real t, const real t_qtr, const real Imax)
real get_resistivity(const real *q, const real gas_gamma, const real lnlam=10, const real Ai=1.0, const real Zi=1.0, const real Ae=1.0/1836.0, const real rho_min=std::numeric_limits< real >::epsilon(), const real press_min=std::numeric_limits< real >::epsilon())
Compute Spitzer-like resistivity.
real get_resistivity_chodura(const real *q, const real J[3], const real gas_gamma, const real ompt, const real nupt, const real lnlam=10, const real Ai=1.0, const real Zi=1.0, const real Ae=1.0/1836.0, const real rho_min=std::numeric_limits< real >::epsilon(), const real press_min=std::numeric_limits< real >::epsilon())
Compute Chodura resistivity.
void noslipWallCondition_MHD(const real gas_gamma, const solverVariables_t *pSV, const real *QC, const real vx_w, const real vy_w, const real vz_w, const real bx_w, const real by_w, const real bz_w, real *QC_w, const real rho_min=std::numeric_limits< real >::epsilon(), const real press_min=std::numeric_limits< real >::epsilon())
real set_time_step(const solverVariables_t *pSV, const real j_coefficient, const real diffusion_coefficient, const real eta, const real cfl_diff=0.5)
Suggested time step calculation for RMHD resistive diffusion.
real get_eta(const real *q, const real J[3], const bool const_resistivity, const real constant_resistivity_eta, const std::string resistivity_type, const real max_eta, const real min_eta, const real n_vac, const real eta_vac, const real gas_gamma, const real ompt, const real nupt, const real lnlam=10.0, const real Ai=1.0, const real Zi=1.0, const real Ae=1.0/1836.0, const real rho_min=std::numeric_limits< real >::epsilon(), const real press_min=std::numeric_limits< real >::epsilon())
real current_density_cyl(const real skin_depth_norm, const real r, const real *B, const real *grad_B[3], const int ir, const int ith, const int iz, real *J)
real current_density_cart(const real skin_depth_norm, const real *grad_B[3], real *J)
real rmhd_internal_diffusion_flux(const real nu_p_norm, const real skin_depth_norm, const solverVariables_t *pSV, const real *q, const real *J, const real eta, std::vector< std::vector< real > > &internal_diffusion_flux)
Base namespace for everything not included in the global namespace.
Definition: field_source.h:8
Definition: wmapplication.h:38
#define real
Definition: wmoclunstructuredreconstruction.h:11