MPI-AMRVAC
3.1
The MPI - Adaptive Mesh Refinement - Versatile Advection Code (development version)
|
Thermal conduction for HD and MHD or RHD and RMHD or twofl (plasma-neutral) module Adaptation of mod_thermal_conduction for the mod_supertimestepping. 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 coefficients: MHD case. More... | |
subroutine, public | tc_get_hd_params (fl, read_hd_params) |
Init TC coefficients: HD case. More... | |
subroutine, public | tc_get_ffhd_params (fl, read_ffhd_params) |
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, x, 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) |
Get the explicit timestep for the TC (hd implementation) More... | |
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) |
double precision function, public | get_tc_dt_ffhd (w, ixIL, ixOL, dxD, x, fl) |
Get the explicut timestep for the TC (ffhd implementation) More... | |
subroutine, public | sts_set_source_tc_ffhd (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_ffhd (ixIL, ixOL, w, x, fl, qvec, rho, Te, alpha) |
Variables | |
double precision | tc_gamma_1 |
The adiabatic index. More... | |
Thermal conduction for HD and MHD or RHD and RMHD or twofl (plasma-neutral) module Adaptation of mod_thermal_conduction for the mod_supertimestepping.
The TC is set by calling tc_init_params()
Organized such that it can call either isotropic (HD) or anisotropic (MHD) variants it adds a heat conduction source to each energy equation and can be recycled within a multi-fluid context (such as plasma-neutral twofl module)
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 adapted by Beatrice Popescu to twofluid settings 06.09.2024 cleaned up for use in rhd and rmhd modules (Nishant Narechania and Rony Keppens)
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:
double precision function, public mod_thermal_conduction::get_tc_dt_ffhd | ( | 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, | ||
double precision, 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 (ffhd implementation)
Definition at line 1157 of file mod_thermal_conduction.t.
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, | ||
double precision, intent(in) | D, | ||
double precision, dimension(ixi^s,1:ndim), intent(in) | x, | ||
type(tc_fluid), intent(in) | fl | ||
) |
Get the explicit timestep for the TC (hd implementation)
Definition at line 939 of file mod_thermal_conduction.t.
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 222 of file mod_thermal_conduction.t.
subroutine mod_thermal_conduction::gradientc | ( | double precision, dimension(ixi^s), intent(in) | q, |
double precision, dimension(ixi^s,1:ndim), intent(in) | x, | ||
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 900 of file mod_thermal_conduction.t.
subroutine mod_thermal_conduction::set_source_tc_ffhd | ( | 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 | ||
) |
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 | ||
) |
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 | ||
) |
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, | ||
integer, intent(in) | tc_slope_limiter | ||
) |
Definition at line 863 of file mod_thermal_conduction.t.
subroutine, public mod_thermal_conduction::sts_set_source_tc_ffhd | ( | 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 1227 of file mod_thermal_conduction.t.
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 | ||
) |
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 311 of file mod_thermal_conduction.t.
subroutine, public mod_thermal_conduction::tc_get_ffhd_params | ( | type(tc_fluid), intent(inout) | fl, |
read_ffhd_params | |||
) |
Read tc parameters from par file: ffHD case
Definition at line 191 of file mod_thermal_conduction.t.
subroutine, public mod_thermal_conduction::tc_get_hd_params | ( | type(tc_fluid), intent(inout) | fl, |
read_hd_params | |||
) |
Init TC coefficients: HD case.
Read tc parameters from par file: HD case
Definition at line 160 of file mod_thermal_conduction.t.
subroutine, public mod_thermal_conduction::tc_get_mhd_params | ( | type(tc_fluid), intent(inout) | fl, |
read_mhd_params | |||
) |
Init TC coefficients: MHD case.
Read tc module parameters from par file: MHD case
Definition at line 119 of file mod_thermal_conduction.t.
subroutine mod_thermal_conduction::tc_init_params | ( | double precision, intent(in) | phys_gamma | ) |
Definition at line 111 of file mod_thermal_conduction.t.
double precision mod_thermal_conduction::tc_gamma_1 |
The adiabatic index.
Definition at line 51 of file mod_thermal_conduction.t.