MPI-AMRVAC  2.0
The MPI - Adaptive Mesh Refinement - Versatile Advection Code
Data Types | Functions/Subroutines | Variables
mod_thermal_conduction Module Reference

Thermal conduction for HD and MHD. More...

Data Types

interface  get_heatconduct
 
interface  getdt_heatconduct
 
interface  thermal_conduction
 

Functions/Subroutines

subroutine tc_params_read (files)
 Read this module"s parameters from a file. More...
 
subroutine thermal_conduction_init (phys_gamma)
 Initialize the module. More...
 
subroutine do_thermal_conduction
 
subroutine evolve_stepj (igrid, qcmu, qcmut, qcnu, qcnut, qdt, ixIL, ixOL, w1, w2, w, x, wold)
 
subroutine evolve_step1 (igrid, qcmut, qdt, ixIL, ixOL, w1, w, x, wold)
 
subroutine mhd_get_heatconduct (qd, tmp1, tmp2, ixIL, ixOL, w, x, qvec)
 anisotropic thermal conduction with slope limited symmetric scheme Sharma 2007 Journal of Computational Physics 227, 123 More...
 
double precision function, dimension(ixi^sslope_limiter (f, ixIL, ixOL, idims, pm)
 
subroutine mhd_getdt_heatconduct (w, ixIL, ixOL, dtnew, dxD, x)
 
subroutine hd_get_heatconduct (qd, tmp1, tmp2, ixIL, ixOL, w, x, qvec)
 
subroutine hd_getdt_heatconduct (w, ixIL, ixOL, dtnew, dxD, x)
 

Variables

double precision, public tc_k_para
 Coefficient of thermal conductivity (parallel to magnetic field) More...
 
double precision, public tc_k_perp
 Coefficient of thermal conductivity perpendicular to magnetic field. More...
 
double precision dt_tc
 Time step of thermal conduction. More...
 
integer, public s
 Number of sub-steps of supertime stepping. More...
 
integer tc_ncycles =1000
 Maximal substeps of TC within one fluid time step to limit fluid time step. More...
 
logical fix_conserve_at_step = .true.
 Whether to conserve fluxes at the current partial step. More...
 
procedure(thermal_conduction), pointer phys_thermal_conduction => null()
 
procedure(get_heatconduct), pointer phys_get_heatconduct => null()
 
procedure(getdt_heatconduct), pointer phys_getdt_heatconduct => null()
 

Detailed Description

Thermal conduction for HD and MHD.

10.07.2011 developed by Chun Xia and Rony Keppens 01.09.2012 moved to modules folder by Oliver Porth 13.10.2013 optimized further by Chun Xia 12.03.2014 implemented RKL2 super timestepping scheme to reduce iterations and improve stability and accuracy up to second order in time by Chun Xia. 23.08.2014 implemented saturation and perpendicular TC by Chun Xia 12.01.2017 modulized by Chun Xia

PURPOSE: IN MHD ADD THE HEAT CONDUCTION SOURCE TO THE ENERGY EQUATION S=DIV(KAPPA_i,j . GRAD_j T) where KAPPA_i,j = tc_k_para b_i b_j + tc_k_perp (I - b_i b_j) b_i b_j = B_i B_j / B**2, I is the unit matrix, and i, j= 1, 2, 3 for 3D IN HD ADD THE HEAT CONDUCTION SOURCE TO THE ENERGY EQUATION S=DIV(tc_k_para . GRAD T) USAGE:

  1. in mod_usr.t -> subroutine usr_init(), add unit_length=<your length="" unit>=""> unit_numberdensity=<your number="" density="" unit>=""> unit_velocity=<your velocity="" unit>=""> unit_temperature=<your temperature="" unit>=""> before call (m)hd_activate()
  2. to switch on thermal conduction in the (m)hd_list of amrvac.par add: (m)hd_thermal_conduction=.true.
  3. in the tc_list of amrvac.par : tc_perpendicular=.true. ! (default .false.) turn on thermal conduction perpendicular to magnetic field tc_saturate=.false. ! (default .true. ) turn off thermal conduction saturate effect tc_dtpar=0.9/0.45/0.3 ! stable time step coefficient for 1D/2D/3D, decrease it for more stable run tc_slope_limiter='MC' ! choose limiter for slope-limited anisotropic thermal conduction in MHD

Function/Subroutine Documentation

◆ do_thermal_conduction()

subroutine mod_thermal_conduction::do_thermal_conduction ( )

Definition at line 185 of file mod_thermal_conduction.t.

Here is the call graph for this function:

◆ evolve_step1()

subroutine mod_thermal_conduction::evolve_step1 ( integer, intent(in)  igrid,
double precision, intent(in)  qcmut,
double precision, intent(in)  qdt,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, dimension(ixi^s,1:nw), intent(out)  w1,
double precision, dimension(ixi^s,1:nw), intent(in)  w,
double precision, dimension(ixi^s,1:ndim), intent(in)  x,
double precision, dimension(ixi^s,1:nw), intent(out)  wold 
)

Definition at line 357 of file mod_thermal_conduction.t.

Here is the call graph for this function:

◆ evolve_stepj()

subroutine mod_thermal_conduction::evolve_stepj ( integer, intent(in)  igrid,
double precision, intent(in)  qcmu,
double precision, intent(in)  qcmut,
double precision, intent(in)  qcnu,
double precision, intent(in)  qcnut,
double precision, intent(in)  qdt,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, dimension(ixi^s,1:nw), intent(in)  w1,
double precision, dimension(ixi^s,1:nw), intent(inout)  w2,
double precision, dimension(ixi^s,1:nw), intent(in)  w,
double precision, dimension(ixi^s,1:ndim), intent(in)  x,
double precision, dimension(ixi^s,1:nw), intent(in)  wold 
)

Definition at line 332 of file mod_thermal_conduction.t.

Here is the call graph for this function:

◆ hd_get_heatconduct()

subroutine mod_thermal_conduction::hd_get_heatconduct ( double precision, dimension(ixi^s), intent(out)  qd,
double precision, dimension(ixi^s), intent(out)  tmp1,
double precision, dimension(ixi^s), intent(out)  tmp2,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, dimension(ixi^s,1:nw), intent(in)  w,
double precision, dimension(ixi^s,1:ndim), intent(in)  x,
double precision, dimension(ixi^s,1:ndim)  qvec 
)

Definition at line 797 of file mod_thermal_conduction.t.

◆ hd_getdt_heatconduct()

subroutine mod_thermal_conduction::hd_getdt_heatconduct ( double precision, dimension(ixi^s,1:nw), intent(inout)  w,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, intent(inout)  dtnew,
double precision, intent(in)  dx,
integer, intent(in)  D,
double precision, dimension(ixi^s,1:ndim), intent(in)  x 
)

Definition at line 930 of file mod_thermal_conduction.t.

◆ mhd_get_heatconduct()

subroutine mod_thermal_conduction::mhd_get_heatconduct ( double precision, dimension(ixi^s), intent(out)  qd,
double precision, dimension(ixi^s), intent(out)  tmp1,
double precision, dimension(ixi^s), intent(out)  tmp2,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, dimension(ixi^s,1:nw), intent(in)  w,
double precision, dimension(ixi^s,1:ndim), intent(in)  x,
double precision, dimension(ixi^s,1:ndim)  qvec 
)

anisotropic thermal conduction with slope limited symmetric scheme Sharma 2007 Journal of Computational Physics 227, 123

Definition at line 414 of file mod_thermal_conduction.t.

Here is the call graph for this function:

◆ mhd_getdt_heatconduct()

subroutine mod_thermal_conduction::mhd_getdt_heatconduct ( double precision, dimension(ixi^s,1:nw), intent(inout)  w,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, intent(inout)  dtnew,
double precision, intent(in)  dx,
integer, intent(in)  D,
double precision, dimension(ixi^s,1:ndim), intent(in)  x 
)

Definition at line 733 of file mod_thermal_conduction.t.

◆ slope_limiter()

double precision function, dimension(ixi^s) mod_thermal_conduction::slope_limiter ( double precision, dimension(ixi^s), intent(in)  f,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
integer, intent(in)  idims,
integer, intent(in)  pm 
)

Definition at line 697 of file mod_thermal_conduction.t.

Here is the call graph for this function:

◆ tc_params_read()

subroutine mod_thermal_conduction::tc_params_read ( character(len=*), dimension(:), intent(in)  files)

Read this module"s parameters from a file.

Definition at line 119 of file mod_thermal_conduction.t.

◆ thermal_conduction_init()

subroutine mod_thermal_conduction::thermal_conduction_init ( double precision, intent(in)  phys_gamma)

Initialize the module.

Definition at line 135 of file mod_thermal_conduction.t.

Here is the call graph for this function:

Variable Documentation

◆ dt_tc

double precision mod_thermal_conduction::dt_tc

Time step of thermal conduction.

Definition at line 43 of file mod_thermal_conduction.t.

◆ fix_conserve_at_step

logical mod_thermal_conduction::fix_conserve_at_step = .true.

Whether to conserve fluxes at the current partial step.

Definition at line 79 of file mod_thermal_conduction.t.

◆ phys_get_heatconduct

procedure(get_heatconduct), pointer mod_thermal_conduction::phys_get_heatconduct => null()

Definition at line 85 of file mod_thermal_conduction.t.

◆ phys_getdt_heatconduct

procedure(getdt_heatconduct), pointer mod_thermal_conduction::phys_getdt_heatconduct => null()

Definition at line 86 of file mod_thermal_conduction.t.

◆ phys_thermal_conduction

procedure(thermal_conduction), pointer mod_thermal_conduction::phys_thermal_conduction => null()

Definition at line 84 of file mod_thermal_conduction.t.

◆ s

integer, public mod_thermal_conduction::s

Number of sub-steps of supertime stepping.

Definition at line 46 of file mod_thermal_conduction.t.

◆ tc_k_para

double precision, public mod_thermal_conduction::tc_k_para

Coefficient of thermal conductivity (parallel to magnetic field)

Definition at line 37 of file mod_thermal_conduction.t.

◆ tc_k_perp

double precision, public mod_thermal_conduction::tc_k_perp

Coefficient of thermal conductivity perpendicular to magnetic field.

Definition at line 40 of file mod_thermal_conduction.t.

◆ tc_ncycles

integer mod_thermal_conduction::tc_ncycles =1000

Maximal substeps of TC within one fluid time step to limit fluid time step.

Definition at line 64 of file mod_thermal_conduction.t.