MPI-AMRVAC 3.1
The MPI - Adaptive Mesh Refinement - Versatile Advection Code (development version)
|
Magnetofriction module. More...
Functions/Subroutines | |
subroutine, public | mf_phys_init () |
subroutine, public | mf_to_conserved (ixil, ixol, w, x) |
Transform primitive variables into conservative ones. | |
subroutine, public | mf_to_primitive (ixil, ixol, w, x) |
Transform conservative variables into primitive ones. | |
subroutine, public | get_normalized_divb (w, ixil, ixol, divb) |
get dimensionless div B = |divB| * volume / area / |B| | |
subroutine, public | get_current (w, ixil, ixol, idirmin, current, fourthorder) |
Calculate idirmin and the idirmin:3 components of the common current array make sure that dxlevel(^D) is set correctly. | |
subroutine, public | mf_clean_divb_multigrid (qdt, qt, active) |
subroutine, public | mf_face_to_center (ixol, s) |
calculate cell-center values from face-center values | |
subroutine, public | b_from_vector_potential (ixisl, ixil, ixol, ws, x) |
calculate magnetic field from vector potential | |
subroutine, public | record_force_free_metrics () |
Variables | |
double precision, public | mf_nu = 1.d-15 |
viscosity coefficient in s cm^-2 for solar corona (Cheung 2012 ApJ) | |
double precision, public | mf_vmax = 3.d6 |
maximal limit of magnetofrictional velocity in cm s^-1 (Pomoell 2019 A&A) | |
double precision, dimension(2 *^nd), public | mf_decay_scale =0.d0 |
decay scale of frictional velocity near boundaries | |
double precision, public | mf_glm_alpha = 0.5d0 |
GLM-MHD parameter: ratio of the diffusive and advective time scales for div b taking values within [0, 1]. | |
double precision, public | mf_eta = 0.0d0 |
The resistivity. | |
double precision, public | mf_eta_hyper = 0.0d0 |
The hyper-resistivity. | |
double precision, public, protected | he_abundance =0.1d0 |
Helium abundance over Hydrogen. | |
integer, dimension(:), allocatable, public, protected | mom |
Indices of the momentum density. | |
integer, public, protected | psi_ |
Indices of the GLM psi. | |
integer, dimension(2 *^nd), public, protected | boundary_divbfix_skip =0 |
To skip * layer of ghost cells during divB=0 fix for boundary. | |
logical, public, protected | mf_particles = .false. |
Whether particles module is added. | |
logical, public, protected | mf_glm = .false. |
Whether GLM-MHD is used. | |
logical, public, protected | source_split_divb = .false. |
Whether divB cleaning sources are added splitting from fluid solver. | |
logical, public, protected | mf_4th_order = .false. |
MHD fourth order. | |
logical, public, protected | mf_record_electric_field = .false. |
set to true if need to record electric field on cell edges | |
integer, public, protected | mf_divb_nth = 1 |
Whether divB is computed with a fourth order approximation. | |
logical, dimension(2 *^nd), public, protected | boundary_divbfix =.true. |
To control divB=0 fix for boundary. | |
logical, public | divbwave = .true. |
Add divB wave in Roe solver. | |
logical, public, protected | clean_initial_divb =.false. |
clean divb in the initial condition | |
character(len=std_len), public, protected | typedivbfix = 'ct' |
Method type to clean divergence of B. | |
character(len=std_len), public, protected | type_ct = 'average' |
Method type of constrained transport. | |
Magnetofriction module.
subroutine, public mod_mf_phys::b_from_vector_potential | ( | integer, intent(in) | ixis, |
integer, intent(in) | l, | ||
integer, intent(in) | ixi, | ||
l, | |||
integer, intent(in) | ixo, | ||
l, | |||
double precision, dimension(ixis^s,1:nws), intent(inout) | ws, | ||
double precision, dimension(ixi^s,1:ndim), intent(in) | x | ||
) |
calculate magnetic field from vector potential
Definition at line 2365 of file mod_mf_phys.t.
subroutine, public mod_mf_phys::get_current | ( | double precision, dimension(ixi^s,1:nw), intent(in) | w, |
integer, intent(in) | ixi, | ||
integer, intent(in) | l, | ||
integer, intent(in) | ixo, | ||
l, | |||
integer, intent(out) | idirmin, | ||
double precision, dimension(ixi^s,7-2*ndir:3) | current, | ||
logical, intent(in), optional | fourthorder | ||
) |
Calculate idirmin and the idirmin:3 components of the common current array make sure that dxlevel(^D) is set correctly.
Definition at line 1092 of file mod_mf_phys.t.
subroutine, public mod_mf_phys::get_normalized_divb | ( | double precision, dimension(ixi^s,1:nw), intent(in) | w, |
integer, intent(in) | ixi, | ||
integer, intent(in) | l, | ||
integer, intent(in) | ixo, | ||
l, | |||
double precision, dimension(ixi^s) | divb | ||
) |
get dimensionless div B = |divB| * volume / area / |B|
Definition at line 1058 of file mod_mf_phys.t.
subroutine, public mod_mf_phys::mf_clean_divb_multigrid | ( | double precision, intent(in) | qdt, |
double precision, intent(in) | qt, | ||
logical, intent(inout) | active | ||
) |
[in] | qdt | Current time step |
[in] | qt | Current time |
[in,out] | active | Output if the source is active |
Definition at line 1669 of file mod_mf_phys.t.
subroutine, public mod_mf_phys::mf_face_to_center | ( | integer, intent(in) | ixo, |
integer, intent(in) | l, | ||
type(state) | s | ||
) |
calculate cell-center values from face-center values
Definition at line 2303 of file mod_mf_phys.t.
subroutine, public mod_mf_phys::mf_phys_init |
subroutine, public mod_mf_phys::mf_to_conserved | ( | integer, intent(in) | ixi, |
integer, intent(in) | l, | ||
integer, intent(in) | ixo, | ||
l, | |||
double precision, dimension(ixi^s, nw), intent(inout) | w, | ||
double precision, dimension(ixi^s, 1:ndim), intent(in) | x | ||
) |
Transform primitive variables into conservative ones.
Definition at line 375 of file mod_mf_phys.t.
subroutine, public mod_mf_phys::mf_to_primitive | ( | integer, intent(in) | ixi, |
integer, intent(in) | l, | ||
integer, intent(in) | ixo, | ||
l, | |||
double precision, dimension(ixi^s, nw), intent(inout) | w, | ||
double precision, dimension(ixi^s, 1:ndim), intent(in) | x | ||
) |
Transform conservative variables into primitive ones.
Definition at line 385 of file mod_mf_phys.t.
subroutine, public mod_mf_phys::record_force_free_metrics |
logical, dimension(2*^nd), public, protected mod_mf_phys::boundary_divbfix =.true. |
To control divB=0 fix for boundary.
Definition at line 79 of file mod_mf_phys.t.
integer, dimension(2*^nd), public, protected mod_mf_phys::boundary_divbfix_skip =0 |
To skip * layer of ghost cells during divB=0 fix for boundary.
Definition at line 46 of file mod_mf_phys.t.
logical, public, protected mod_mf_phys::clean_initial_divb =.false. |
clean divb in the initial condition
Definition at line 88 of file mod_mf_phys.t.
logical, public mod_mf_phys::divbwave = .true. |
Add divB wave in Roe solver.
Definition at line 85 of file mod_mf_phys.t.
double precision, public, protected mod_mf_phys::he_abundance =0.1d0 |
Helium abundance over Hydrogen.
Definition at line 34 of file mod_mf_phys.t.
logical, public, protected mod_mf_phys::mf_4th_order = .false. |
MHD fourth order.
Definition at line 70 of file mod_mf_phys.t.
double precision, dimension(2*^nd), public mod_mf_phys::mf_decay_scale =0.d0 |
decay scale of frictional velocity near boundaries
Definition at line 18 of file mod_mf_phys.t.
integer, public, protected mod_mf_phys::mf_divb_nth = 1 |
Whether divB is computed with a fourth order approximation.
Definition at line 76 of file mod_mf_phys.t.
double precision, public mod_mf_phys::mf_eta = 0.0d0 |
The resistivity.
Definition at line 25 of file mod_mf_phys.t.
double precision, public mod_mf_phys::mf_eta_hyper = 0.0d0 |
The hyper-resistivity.
Definition at line 28 of file mod_mf_phys.t.
logical, public, protected mod_mf_phys::mf_glm = .false. |
Whether GLM-MHD is used.
Definition at line 64 of file mod_mf_phys.t.
double precision, public mod_mf_phys::mf_glm_alpha = 0.5d0 |
GLM-MHD parameter: ratio of the diffusive and advective time scales for div b taking values within [0, 1].
Definition at line 22 of file mod_mf_phys.t.
double precision, public mod_mf_phys::mf_nu = 1.d-15 |
viscosity coefficient in s cm^-2 for solar corona (Cheung 2012 ApJ)
Definition at line 12 of file mod_mf_phys.t.
logical, public, protected mod_mf_phys::mf_particles = .false. |
Whether particles module is added.
Definition at line 61 of file mod_mf_phys.t.
logical, public, protected mod_mf_phys::mf_record_electric_field = .false. |
set to true if need to record electric field on cell edges
Definition at line 73 of file mod_mf_phys.t.
double precision, public mod_mf_phys::mf_vmax = 3.d6 |
maximal limit of magnetofrictional velocity in cm s^-1 (Pomoell 2019 A&A)
Definition at line 15 of file mod_mf_phys.t.
integer, dimension(:), allocatable, public, protected mod_mf_phys::mom |
Indices of the momentum density.
Definition at line 40 of file mod_mf_phys.t.
integer, public, protected mod_mf_phys::psi_ |
Indices of the GLM psi.
Definition at line 43 of file mod_mf_phys.t.
logical, public, protected mod_mf_phys::source_split_divb = .false. |
Whether divB cleaning sources are added splitting from fluid solver.
Definition at line 67 of file mod_mf_phys.t.
character(len=std_len), public, protected mod_mf_phys::type_ct = 'average' |
Method type of constrained transport.
Definition at line 94 of file mod_mf_phys.t.
character(len=std_len), public, protected mod_mf_phys::typedivbfix = 'ct' |
Method type to clean divergence of B.
Definition at line 91 of file mod_mf_phys.t.