MPI-AMRVAC  3.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 Adaptation of mod_thermal_conduction for the mod_supertimestepping In order to use it set use_mhd_tc=1 (for the mhd impl) or 2 (for the hd impl) in mhd_list (for the mhd module both hd and mhd impl can be used) or use_new_hd_tc in hd_list parameters to true (for the hd module, hd implementation has to be used) The TC is set by calling one tc_init_hd_for_total_energy and tc_init_mhd_for_total_energy might The second argument: ixArray has to be [rho_,e_,mag(1)] for mhd (Be aware that the other components of the mag field are assumed consecutive) and [rho_,e_] for hd additionally when internal energy equation is solved, an additional element of this array is eaux_: the index of the internal energy variable. More...

Data Types

interface  get_var_subr
 
type  tc_fluid
 

Functions/Subroutines

subroutine tc_init_params (phys_gamma)
 
subroutine, public tc_get_mhd_params (fl, read_mhd_params)
 Init TC coeffiecients: MHD case. More...
 
subroutine, public tc_get_hd_params (fl, read_hd_params)
 Read tc module parameters from par file: MHD case. More...
 
double precision function, public get_tc_dt_mhd (w, ixIL, ixOL, dxD, x, fl)
 Get the explicut timestep for the TC (mhd implementation) More...
 
subroutine, public sts_set_source_tc_mhd (ixIL, ixOL, w, x, wres, fix_conserve_at_step, my_dt, igrid, nflux, fl)
 anisotropic thermal conduction with slope limited symmetric scheme Sharma 2007 Journal of Computational Physics 227, 123 More...
 
subroutine set_source_tc_mhd (ixIL, ixOL, w, x, fl, qvec, rho, Te, alpha)
 
double precision function, dimension(ixi^s) slope_limiter (f, ixIL, ixOL, idims, pm, tc_slope_limiter)
 
subroutine gradientc (q, ixIL, ixOL, idir, gradq)
 Calculate gradient of a scalar q at cell interfaces in direction idir. More...
 
double precision function, public get_tc_dt_hd (w, ixIL, ixOL, dxD, x, fl)
 
subroutine, public sts_set_source_tc_hd (ixIL, ixOL, w, x, wres, fix_conserve_at_step, my_dt, igrid, nflux, fl)
 
subroutine set_source_tc_hd (ixIL, ixOL, w, x, fl, qvec, rho, Te)
 

Variables

double precision tc_gamma_1
 The adiabatic index. More...
 

Detailed Description

Thermal conduction for HD and MHD Adaptation of mod_thermal_conduction for the mod_supertimestepping In order to use it set use_mhd_tc=1 (for the mhd impl) or 2 (for the hd impl) in mhd_list (for the mhd module both hd and mhd impl can be used) or use_new_hd_tc in hd_list parameters to true (for the hd module, hd implementation has to be used) The TC is set by calling one tc_init_hd_for_total_energy and tc_init_mhd_for_total_energy might The second argument: ixArray has to be [rho_,e_,mag(1)] for mhd (Be aware that the other components of the mag field are assumed consecutive) and [rho_,e_] for hd additionally when internal energy equation is solved, an additional element of this array is eaux_: the index of the internal energy variable.

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_slope_limiter='MC' ! choose limiter for slope-limited anisotropic thermal conduction in MHD

Function/Subroutine Documentation

◆ get_tc_dt_hd()

double precision function, public mod_thermal_conduction::get_tc_dt_hd ( 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, intent(in)  dx,
integer, intent(in)  D,
double precision, dimension(ixi^s,1:ndim), intent(in)  x,
type(tc_fluid), intent(in)  fl 
)

Definition at line 665 of file mod_thermal_conduction.t.

◆ get_tc_dt_mhd()

double precision function, public mod_thermal_conduction::get_tc_dt_mhd ( 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, intent(in)  dx,
integer, intent(in)  D,
double precision, dimension(ixi^s,1:ndim), intent(in)  x,
type(tc_fluid), intent(in)  fl 
)

Get the explicut timestep for the TC (mhd implementation)

Definition at line 192 of file mod_thermal_conduction.t.

◆ gradientc()

subroutine mod_thermal_conduction::gradientc ( double precision, dimension(ixi^s), intent(in)  q,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
integer, intent(in)  idir,
double precision, dimension(ixi^s), intent(inout)  gradq 
)

Calculate gradient of a scalar q at cell interfaces in direction idir.

Definition at line 623 of file mod_thermal_conduction.t.

Here is the call graph for this function:

◆ set_source_tc_hd()

subroutine mod_thermal_conduction::set_source_tc_hd ( 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,
type(tc_fluid), intent(in)  fl,
double precision, dimension(ixi^s,1:ndim), intent(out)  qvec,
double precision, dimension(ixi^s), intent(in)  rho,
double precision, dimension(ixi^s), intent(in)  Te 
)

Definition at line 770 of file mod_thermal_conduction.t.

◆ set_source_tc_mhd()

subroutine mod_thermal_conduction::set_source_tc_mhd ( 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,
type(tc_fluid), intent(in)  fl,
double precision, dimension(ixi^s,1:ndim), intent(out)  qvec,
double precision, dimension(ixi^s), intent(in)  rho,
double precision, dimension(ixi^s), intent(in)  Te,
double precision, intent(in)  alpha 
)

Definition at line 331 of file mod_thermal_conduction.t.

Here is the call graph for this function:

◆ 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,
character(len=*), intent(in)  tc_slope_limiter 
)

Definition at line 585 of file mod_thermal_conduction.t.

Here is the call graph for this function:

◆ sts_set_source_tc_hd()

subroutine, public mod_thermal_conduction::sts_set_source_tc_hd ( 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:nw), intent(inout)  wres,
logical, intent(in)  fix_conserve_at_step,
double precision, intent(in)  my_dt,
integer, intent(in)  igrid,
integer, intent(in)  nflux,
type(tc_fluid), intent(in)  fl 
)

Definition at line 704 of file mod_thermal_conduction.t.

Here is the call graph for this function:

◆ sts_set_source_tc_mhd()

subroutine, public mod_thermal_conduction::sts_set_source_tc_mhd ( 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:nw), intent(inout)  wres,
logical, intent(in)  fix_conserve_at_step,
double precision, intent(in)  my_dt,
integer, intent(in)  igrid,
integer, intent(in)  nflux,
type(tc_fluid), intent(in)  fl 
)

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

Definition at line 259 of file mod_thermal_conduction.t.

Here is the call graph for this function:

◆ tc_get_hd_params()

subroutine, public mod_thermal_conduction::tc_get_hd_params ( type(tc_fluid), intent(inout)  fl,
  read_hd_params 
)

Read tc module parameters from par file: MHD case.

Read tc parameters from par file: HD case

Definition at line 163 of file mod_thermal_conduction.t.

◆ tc_get_mhd_params()

subroutine, public mod_thermal_conduction::tc_get_mhd_params ( type(tc_fluid), intent(inout)  fl,
  read_mhd_params 
)

Init TC coeffiecients: MHD case.

Definition at line 115 of file mod_thermal_conduction.t.

◆ tc_init_params()

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

Definition at line 106 of file mod_thermal_conduction.t.

Variable Documentation

◆ tc_gamma_1

double precision mod_thermal_conduction::tc_gamma_1

The adiabatic index.

Definition at line 46 of file mod_thermal_conduction.t.