MPI-AMRVAC  2.2
The MPI - Adaptive Mesh Refinement - Versatile Advection Code
Modules | Functions/Subroutines | Variables
mod_magnetofriction.t File Reference

Go to the source code of this file.

Modules

module  mod_magnetofriction
 module mod_magnetofriction.t Purpose: use magnetofrictional method to relax 3D magnetic field to force-free field 01.04.2016 developed by Chun Xia and Yang Guo 04.10.2017 modulized by Chun Xia Usage: in amrvac.par: &methodlist time_integrator='onestep' ! time marching scheme, or 'twostep','threestep' flux_scheme=13*'cd4' ! or 'tvdlf', 'fd' limiter= 13*'koren' ! or 'vanleer','cada3','mp5' so on / &meshlist ditregrid=20 ! set iteration interval for adjusting AMR / &mhd_list mhd_magnetofriction=.true. / &mf_list mf_it_max=60000 ! set the maximum iteration number mf_ditsave=20000 ! set iteration interval for data output mf_cc=0.3 ! stability coefficient controls numerical stability mf_cy=0.2 ! frictional velocity coefficient mf_cdivb=0.1 ! divb cleaning coefficient controls diffusion speed of divb /
 

Functions/Subroutines

subroutine mod_magnetofriction::mf_params_read (files)
 Read this module"s parameters from a file. More...
 
subroutine mod_magnetofriction::magnetofriction_init ()
 Initialize the module. More...
 
subroutine mod_magnetofriction::magnetofriction
 
subroutine metrics
 
subroutine mask_inner (ixIL, ixOL, w, x)
 
subroutine printlog_mf
 
double precision function integral_grid_mf (ixIL, ixOL, w, x, iw, patchwi)
 
subroutine mod_magnetofriction::mf_velocity_update (dtfff)
 
subroutine mod_magnetofriction::vhat (w, x, ixIL, ixOL, vhatmaxgrid)
 
subroutine mod_magnetofriction::frictional_velocity (w, x, ixIL, ixOL, qvmax, qdt)
 
subroutine mod_magnetofriction::advectmf (idimLIM, qt, qdt)
 
subroutine mod_magnetofriction::advect1mf (method, dtin, dtfactor, idimLIM, qtC, psa, qt, psb)
 
subroutine mod_magnetofriction::process1_gridmf (method, igrid, qdt, ixGL, idimLIM, qtC, wCT, qt, w, wold)
 
subroutine mod_magnetofriction::upwindlrmf (ixIL, ixLL, ixRL, idim, w, wCT, wLC, wRC, x)
 
subroutine mod_magnetofriction::getfluxmf (w, x, ixIL, ixOL, idir, idim, f)
 
subroutine mod_magnetofriction::tvdlfmf (qdt, ixIL, ixOL, idimLIM, qtC, wCT, qt, wnew, wold, fC, dxD, x)
 
subroutine mod_magnetofriction::hancockmf (qdt, ixIL, ixOL, idimLIM, qtC, wCT, qt, wnew, dxD, x)
 
subroutine mod_magnetofriction::fdmf (qdt, ixIL, ixOL, idimLIM, qtC, wCT, qt, wnew, wold, fC, dxD, x)
 
subroutine mod_magnetofriction::reconstructlmf (ixIL, iLL, idims, w, wLC)
 
subroutine mod_magnetofriction::reconstructrmf (ixIL, iLL, idims, w, wRC)
 
subroutine mod_magnetofriction::centdiff4mf (qdt, ixIL, ixOL, idimLIM, qtC, wCT, qt, w, wold, fC, dxD, x)
 
subroutine mod_magnetofriction::getdtfff_courant (w, x, ixIL, ixOL, dtnew)
 
subroutine mod_magnetofriction::getcmaxfff (w, ixIL, ixOL, idims, cmax)
 
subroutine mod_magnetofriction::divbclean (qdt, ixIL, ixOL, wCT, w, x)
 Clean divergence of magnetic field by Janhunen's and Linde's source terms. More...
 
subroutine mod_magnetofriction::addgeometrymf (qdt, ixIL, ixOL, wCT, w, x)
 
subroutine mod_magnetofriction::get_current (w, ixIL, ixOL, idirmin, current)
 Calculate idirmin and the idirmin:3 components of the common current array make sure that dxlevel(^D) is set correctly. More...
 
subroutine mod_magnetofriction::get_divb (w, ixIL, ixOL, divb)
 Calculate div B within ixO. More...
 

Variables

double precision mod_magnetofriction::mf_cc
 stability coefficient controls numerical stability More...
 
double precision mod_magnetofriction::mf_cy
 frictional velocity coefficient More...
 
double precision mod_magnetofriction::mf_cy_max
 
double precision mod_magnetofriction::mf_cdivb
 divb cleaning coefficient controls diffusion speed of divb More...
 
double precision mod_magnetofriction::mf_tvdlfeps
 TVDLF dissipation coefficient controls the dissipation term. More...
 
double precision mod_magnetofriction::mf_tvdlfeps_min
 
double precision mod_magnetofriction::tmf
 time in magnetofriction process More...
 
double precision mod_magnetofriction::cmax_mype
 maximal speed for fd scheme More...
 
double precision mod_magnetofriction::cmax_global
 maximal speed for fd scheme More...
 
integer mod_magnetofriction::mf_ditsave
 
integer mod_magnetofriction::mf_it_max
 
logical mod_magnetofriction::mf_advance
 
logical mod_magnetofriction::fix_conserve_at_step = .true.
 

Function/Subroutine Documentation

◆ integral_grid_mf()

double precision function magnetofriction::integral_grid_mf ( integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, dimension(ixi^s,nw+nwauxio)  w,
double precision, dimension(ixi^s,1:ndim), intent(in)  x,
integer, intent(in)  iw,
logical, dimension(ixi^s), intent(in)  patchwi 
)

Definition at line 371 of file mod_magnetofriction.t.

Here is the call graph for this function:

◆ mask_inner()

subroutine magnetofriction::mask_inner ( integer, intent(in)  ixI,
double precision, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, dimension(ixi^s,nw), intent(in)  w,
double precision, dimension(ixi^s,1:ndim), intent(in)  x 
)

Definition at line 307 of file mod_magnetofriction.t.

◆ metrics()

subroutine magnetofriction::metrics ( )

Definition at line 261 of file mod_magnetofriction.t.

Here is the call graph for this function:

◆ printlog_mf()

subroutine magnetofriction::printlog_mf ( )

Definition at line 333 of file mod_magnetofriction.t.