thermal_energy

Module

Description

$Id$

This module can replace the energy module by using the thermal energy eth as dependent variable. For a perfect gas we have

deth/dt + div(u*eth) = -P*div(u)

** AUTOMATIC CPARAM.INC GENERATION ************************ Declare (for generation of cparam.inc) the number of f array variables and auxiliary variables added by this module

CPARAM logical, parameter :: lentropy = .false. CPARAM logical, parameter :: ltemperature = .false. CPARAM logical, parameter :: lthermal_energy = .true.

MVAR CONTRIBUTION 1

PENCILS PROVIDED Ma2; fpres(3); ugeths; transpeth; sglnTT(3)


Quick access

Variables:

allp, amp_patch, ampl_imp_ss, ampl_lntt, ampl_tt, ampltt1, ampltt2, apply_floor, arad_normal, b_1, b_2, beta_bouss, blob_radeq, borderss, calc_0d_diagnostics_energy, calc_1d_diagnostics_energy, calc_2d_diagnostics_energy, calc_energy_slope_limited, calc_heat_cool, calc_heat_cool_prestellar, calc_heat_cool_variable, calc_heat_split, calc_heatcond, calc_heatcond_arrays, calc_heatcond_chi_no_ddrsph, calc_heatcond_chit, calc_heatcond_constchi, calc_heatcond_constchi_arr, calc_heatcond_constk, calc_heatcond_constk_arrays, calc_heatcond_cspeed_chi, calc_heatcond_cubicstepchi, calc_heatcond_hubeny, calc_heatcond_hyper3, calc_heatcond_hyper3_aniso, calc_heatcond_hyper3_mesh, calc_heatcond_hyper3_polar, calc_heatcond_kramers, calc_heatcond_ktherm, calc_heatcond_sfluct, calc_heatcond_shock, calc_heatcond_shock_profr, calc_heatcond_smagorinsky, calc_heatcond_sqrtrhochi, calc_heatcond_tensor, calc_heatcond_zprof, calc_ssmeanxy, center1_x, center1_y, center1_z, center2_x, center2_y, center2_z, chi, chi_cspeed, chi_hyper3, chi_hyper3_aniso, chi_hyper3_mesh, chi_jump, chi_jump_shock, chi_r_reduce, chi_rho, chi_shock, chi_shock2, chi_t1, chi_z0, chi_zwidth, chimax_kramers, chimin_kramers, chit_aniso, chit_aniso_prof, chit_aniso_prof1, chit_aniso_prof2, chit_aniso_profile, chit_fluct_prof1, chit_fluct_prof2, chit_prof, chit_prof1, chit_prof2, chit_prof_fluct, chit_prof_fluct_stored, chit_prof_fluct_stored_size, chit_prof_size, chit_prof_stored, chit_profile, chit_profile_fluct, coef_cs2, coef_lntt, const_cooling_time, cool, cool1, cool2, cool_ext, cool_fac, cool_int, cool_ki02_sd93, cool_newton, cool_sd93, cool_uniform, coolfac, cooling, cooling_profile, cp1, cs2_ext, cs2_int, cs2cool2, cs2cool_x, cs2mx, cs2mxy, cs2mz, cs2top_ini, cs_z, cv1, cv1_temp, cylind_layers, dchit_aniso_prof, dchit_prof_fluct_stored, dchit_prof_stored, dcs2top_ini, dee_dt, del2ssmx, del2ssmz, delta_tt, deltat, deltat_poleq, dheat_buffer1, diffus_chi, diffus_chi3, div_sld_ene, dlneth0dz, dlnhcond_prof, downflow_cs2cool_fac, dprofxss, energy_after_timestep, energy_floor, entropy_floor, entropy_flux, enum_borderss, enum_cooling_profile, enum_cooltype, enum_div_sld_ene, enum_heattype, eth_const, eth_left, eth_right, expand_shands_energy, fbot, feedback, ferriere, ferriere_hs, galactic_hs, gamma, gamma1, gamma_m1, get_aia_tab_resp, get_chit_prof_fluct, get_cool_general, get_delta_eth, get_gravx_heatcond, get_gravz_heatcond, get_heat_cool_corona, get_heat_cool_gravr, get_heat_cool_gravx_cartesian, get_heat_cool_gravx_spherical, get_heat_cool_gravz, get_prof_pencil, get_temperature, gradlogchit_profile, grads0_imposed, gradtt0, gss0, gss1, gssmx, gssmz, gttmz, h_sld_ene, hcond, hcond0, hcond0_kramers, hcond1, hcond2, hcond_kconst, hcond_prof, hcond_prof_size, heat_ceiling, heat_gaussianblob, heat_gaussianblob_r0, heat_gaussianblob_sigma, heat_gaussianz, heat_gaussianz_sigma, heat_int, heat_ki02, heat_source, heat_source_offset, heat_source_sigma, heat_thompson_fact, heat_uniform, heatcond_tt, heatcond_tt_0d, heatcond_tt_1d, heatcond_tt_2d, heattype, hmax, hole_slope, hole_width, hydrostatic_isentropic, ichit, idiag_cgam, idiag_chikrammax, idiag_chikrammin, idiag_cp, idiag_cs2mphi, idiag_csm, idiag_csmax, idiag_csmin, idiag_cv, idiag_dcoolmphi, idiag_dcoolx, idiag_dcoolxy, idiag_dcoolz, idiag_deltm, idiag_divcoolmphi, idiag_divheatmphi, idiag_dtc, idiag_dtchi, idiag_dth, idiag_eem, idiag_eemz, idiag_emaia131mxy, idiag_emaia131mxz, idiag_emaia171mxy, idiag_emaia171mxz, idiag_emaia193mxy, idiag_emaia193mxz, idiag_emaia211mxy, idiag_emaia211mxz, idiag_emaia304mxy, idiag_emaia304mxz, idiag_emaia335mxy, idiag_emaia335mxz, idiag_emaia94mxy, idiag_emaia94mxz, idiag_emxrtmxy, idiag_emxrtmxz, idiag_eruzmz, idiag_ethdivum, idiag_ethm, idiag_ethmax, idiag_ethmin, idiag_ethmz, idiag_ethtot, idiag_ethuxmx, idiag_ethuxmz, idiag_ethuymz, idiag_ethuzmz, idiag_etot, idiag_fconvm, idiag_fconvmz, idiag_fconvpsphmphi, idiag_fconvrsphmphi, idiag_fconvthsphmphi, idiag_fconvxmx, idiag_fconvxy, idiag_fconvyxy, idiag_fconvz, idiag_fconvzxy, idiag_fenthdownz, idiag_fenthupz, idiag_fenthz, idiag_ffakez, idiag_fpresxmz, idiag_fpresymz, idiag_fpreszmz, idiag_fracvph1mz, idiag_fracvph2mz, idiag_fracvph3mz, idiag_fradbot, idiag_fradmz, idiag_fradr_constchixy, idiag_fradrsphmphi_kconst, idiag_fradrsphmphi_kprof, idiag_fradrsphmphi_kramers, idiag_fradtop, idiag_fradx_constchi, idiag_fradx_kramers, idiag_fradxy_kramers, idiag_fradymxy_kprof, idiag_fradz, idiag_fradz_constchi, idiag_fradz_kramers, idiag_fturbfz, idiag_fturbmz, idiag_fturbrsphmphi, idiag_fturbtz, idiag_fturbymxy, idiag_fturbz, idiag_gradpxmz, idiag_gradpymz, idiag_gradpzmz, idiag_gsrms, idiag_gss2mz, idiag_gsxmxy, idiag_gsymxy, idiag_gszmxy, idiag_gt2m, idiag_gtmax, idiag_gtrms, idiag_gtt2mz, idiag_gtxgsom, idiag_gtxgsrms, idiag_gtxgsx2mxy, idiag_gtxgsx2mz, idiag_gtxgsxmxy, idiag_gtxgsxmz, idiag_gtxgsy2mxy, idiag_gtxgsy2mz, idiag_gtxgsymxy, idiag_gtxgsymz, idiag_gtxgsz2mxy, idiag_gtxgsz2mz, idiag_gtxgszmxy, idiag_gtxgszmz, idiag_gtxmxy, idiag_gtymxy, idiag_gtzmxy, idiag_guxgtm, idiag_guygtm, idiag_guzgtm, idiag_heatm, idiag_heatmz, idiag_heatthm, idiag_hmax, idiag_kkramersm, idiag_kkramersmx, idiag_kkramersmz, idiag_mum, idiag_mumz, idiag_pdivum, idiag_pdivumz, idiag_ppm, idiag_ppmax, idiag_ppmin, idiag_ppmphi, idiag_ppmx, idiag_ppmy, idiag_ppmz, idiag_ppuzmz, idiag_pr1mz, idiag_puzmz, idiag_ss2downmz, idiag_ss2m, idiag_ss2mphi, idiag_ss2mx, idiag_ss2mz, idiag_ss2upmz, idiag_ss_run_averm, idiag_ssbycpm, idiag_ssdownmz, idiag_ssf2downmz, idiag_ssf2mz, idiag_ssf2upmz, idiag_ssm, idiag_ssmax, idiag_ssmin, idiag_ssmphi, idiag_ssmr, idiag_ssmx, idiag_ssmxy, idiag_ssmxz, idiag_ssmy, idiag_ssmz, idiag_ssruzm, idiag_ssupmz, idiag_ssuzm, idiag_tauhmin, idiag_tdxpm, idiag_tdypm, idiag_tdzpm, idiag_thcool, idiag_thermalpressure, idiag_tppm, idiag_trms, idiag_tt2downmz, idiag_tt2m, idiag_tt2mx, idiag_tt2mz, idiag_tt2upmz, idiag_ttdownmz, idiag_ttf2downmz, idiag_ttf2mz, idiag_ttf2upmz, idiag_ttm, idiag_ttmax, idiag_ttmaxloc, idiag_ttmin, idiag_ttminloc, idiag_ttmphi, idiag_ttmr, idiag_ttmx, idiag_ttmxy, idiag_ttmxz, idiag_ttmy, idiag_ttmz, idiag_ttp, idiag_ttref, idiag_tttop, idiag_ttupmz, idiag_ttzmask, idiag_tugtm, idiag_tugux_uxugtm, idiag_tuguy_uyugtm, idiag_tuguz_uzugtm, idiag_ufpresm, idiag_ugradpmz, idiag_ursphttmphi, idiag_uxtm, idiag_uxtmz, idiag_uxttmx, idiag_uxttmxy, idiag_uxttmz, idiag_uytm, idiag_uytmz, idiag_uyttmx, idiag_uyttmxy, idiag_uyttmz, idiag_uztm, idiag_uztmz, idiag_uzttdownmz, idiag_uzttmx, idiag_uzttmxy, idiag_uzttmz, idiag_uzttupmz, idiag_yhm, idiag_yhmax, idiag_yhmin, iheatcond, iinit_str, init_cooling_sd93, init_ee, initeth, initialize_cooling_patches, initlntt, initss, intlnt_1, intlnt_2, ippaux, isothtop, iss_profile, ivid_pp, jeans_c0, jeans_floor, k_kramers, kappa_rosseland, kgpara, kgperp, ki_a0, ki_a1, ki_a2, ki_heat, ki_t1, ki_t2, ki_t3, ki_v1, ki_v2, kmax, kmin, kramers_get_k, ktop, kx_lntt, kx_ss, ky_lntt, ky_ss, kz_lntt, kz_ss, ladi_mixed, ladvection_energy, ladvection_entropy, ladvection_temperature, layer_ss, lborder_heat_variable, lcalc_cs2mean, lcalc_cs2mz_mean, lcalc_cs2mz_mean_diag, lcalc_heat_cool, lcalc_ss_volaverage, lcalc_ssmean, lcalc_ssmeanxy, lcalc_ttmean, lcheck_negative_energy, lchi_rosseland, lchi_shock_density_dep, lchi_t1_noprof, lchib_simplified, lchit_aniso_simplified, lchit_fluct, lchit_mean, lchit_not, lchit_total, lchromospheric_cooling, lconservative_pressure_on_rhs, lconst_cooling_time, lconvection_gravx, lcool_prof_as_var, lcooling_general, lcooling_patches, lcooling_to_cs2cool, lenergy_slope_limited, lfenth_as_aux, lffree, lfpres_from_pressure, lfreeze_lnttext, lfreeze_lnttint, lfreeze_sext, lfreeze_sint, lhcond0_density_dep, lhcond_global, lheat_cool_gravz, lheat_source, lheat_thompson, lheatc_chi_cspeed, lheatc_chi_reduce_ddr, lheatc_chiconst, lheatc_chiconst_accurate, lheatc_chicubicstep, lheatc_chit, lheatc_corona, lheatc_hubeny, lheatc_hyper3, lheatc_hyper3_mesh, lheatc_hyper3_polar, lheatc_hyper3ss, lheatc_hyper3ss_aniso, lheatc_hyper3ss_mesh, lheatc_hyper3ss_polar, lheatc_karctan, lheatc_kconst, lheatc_kprof, lheatc_kramers, lheatc_ktherm, lheatc_sfluct, lheatc_shock, lheatc_shock2, lheatc_shock_profr, lheatc_smagorinsky, lheatc_spitzer, lheatc_sqrtrhochiconst, lheatc_tensordiffusion, lhubble_energy, limpose_heat_ceiling, linclude_radpress, linitial_log, ljeans_floor, lki02, lmultilayer, lnew_cooling_patches, lnh_1, lnh_2, lntt_const, lntt_left, lntt_right, lphotoelectric_heating, lphotoelectric_heating_radius, lpressuregradient_gas, lprestellar_cool_iso, lrad_cool_heat, lread_hcond, lreduced_sound_speed, lscale_to_cs2top, lsd93, lsld_char_cslimit, lsld_char_rholimit, lsld_char_wprofr, lsmooth_ss_run_aver, lsplit_update, lss_flucz_as_aux, lss_running_aver, lss_running_aver_as_aux, lss_running_aver_as_var, ltau_cool_variable, lthdiff_hmax, ltt_flucz_as_aux, lturbulent_heat, luminosity, lupw_eth, lupw_lntt, lupw_ss, mixinglength, mixinglength_flux, mpoly, mpoly0, mpoly1, mpoly2, ncool_patch, ncool_patch_max, newton_cool, nheat_rho, nheat_tt, nheatc_max, njeans, nkramers, nlf_sld_ene, nsmooth_kramers, nu_z, opacity, patch_fac, pbackground, pclaw, peh_factor, penc_ones, pertss, piecew_poly, piecew_poly_cylind, polytropic_ss_disc, polytropic_ss_z, pp_const, pp_cool, pp_r, pp_xy, pp_xy2, pp_xy3, pp_xy4, pp_xz, pp_xz2, pp_yz, ppcool, pr_smag1, pres_cutoff, prof_lnt, prof_nz, prof_z, profr1_cool, profr2_cool, profr_cool, profr_heat, profx_ffree, profx_heat, profxss, profy_ffree, profz1_cool, profz_cool, profz_ffree, profz_heat, prra, pthresh, pthreshnorm, r_bcz, rad_temp_surr, radius_lntt, radius_ss_x, rcool, rcool1, rcool2, read_cooling_profile_x, read_hcond, reduce_cs2, reinitialize_ss, rescale_hcond, rescale_tt_in_ss, rescale_ttmeanxy, rheat, rho0hs, rho0z, rk_eps, rk_nmax, sd_a0, sd_loglambda, sd_logtt, sd_nt, set_border_entropy, shell_ss, shell_ss_layers, shell_ss_perturb, shock2d, single_polytrope, split_update_energy, ss_const, ss_corona, ss_mz, ss_volaverage, ssmask1_cgs, ssmask2_cgs, ssmx, ssmxy, ssmz, star_heat, strat_const_chit, strat_heat, strat_mlt, t0_cgs, tau1_cool, tau_cool, tau_cool2, tau_cool_pp, tau_cool_ss, tau_cor, tau_damp_cor, tau_heat_cor, tau_relax_ss, tauheat_buffer, tbump, tdown, temp_zaver_range, temp_zmask_count, temperature_floor, tt_const, tt_cor, tt_ext, tt_floor, tt_int, tt_powerlaw, ttbot_factor, ttheat_buffer, ttmz, ttref, ttref_cool, w_sldchar_ene, w_sldchar_ene2, w_sldchar_ene_p, w_sldchar_ene_r0, wcool, wcool1, wcool2, wheat, widthchi_shock, widtheth, widthlntt, widthss_ext, widthss_int, widthtt, wpatch, wpres, wss_corona, xbot, xbot_aniso, xbot_chit1, xchi_shock, xchit, xjump_mid, xpatch, xss_corona, xtop_aniso, xtop_chit1, yjump_mid, ypatch, z_cor, zbot, zcool, zcool1, zcool2, zcor, zheat_buffer, zheat_uniform_range, zjump_mid, zmask_temp, zmask_temp_global, ztop, zz1, zz1_fluct, zz2, zz2_fluct

Routines:

calc_diagnostics_energy(), calc_pencils_energy(), denergy_dt(), dynamical_thermal_diffusion(), energy_after_boundary(), energy_after_timestep(), energy_before_boundary(), expand_shands_energy(), fill_farray_pressure(), get_slices_energy(), impose_energy_floor(), init_energy(), initialize_energy(), pencil_criteria_energy(), pencil_interdep_energy(), read_energy_init_pars(), read_energy_run_pars(), register_energy(), rprint_energy(), split_update_energy(), update_char_vel_energy(), write_energy_init_pars(), write_energy_run_pars()

Needed modules

Variables

  • energy/calc_heat_split [private]
  • energy/chi [real,private/optional/default=0.0]
  • energy/chi_hyper3_mesh [real,private/optional/default=0.0]
  • energy/chi_shock [real,private/optional/default=0.0]
  • energy/const_cooling_time [private]
  • energy/cool_ki02_sd93 [private]
  • energy/cool_sd93 [private]
  • energy/cs_z [real,private/optional/default=0.0]
  • energy/cv1 [real,private/optional/default=0.0]
  • energy/cv1_temp [real,private/optional/default=0.0]
  • energy/diffus_chi (nx) [real,private]
  • energy/diffus_chi3 (nx) [real,private]
  • energy/dlneth0dz (mz) [real,private/optional/default=0.0]
  • energy/energy_floor [real,private/optional/default=0.0]
  • energy/eth0z (mz) [real,private/optional/default=0.0]
  • energy/eth_const [real,private/optional/default=1.0]
  • energy/eth_left [real,private]
  • energy/eth_right [real,private]
  • energy/feedback [character,private/optional/default='linear']
  • energy/gamma [real,private]
  • energy/gamma_m1 [real,private]
  • energy/get_delta_eth [private]
  • energy/get_temperature [private]
  • energy/heat_ki02 [private]
  • energy/heatcond_tt [public]
  • energy/idiag_eem [integer,private/optional/default=0]

    DIAG_DOC: $left< e right> =

  • energy/idiag_ethm [integer,private/optional/default=0]

    DIAG_DOC: $left< e_{text{th}}right> =

  • energy/idiag_ethmax [integer,private/optional/default=0]

    DIAG_DOC: $mathrm{max} e_text{th}$

  • energy/idiag_ethmin [integer,private/optional/default=0]

    DIAG_DOC: $mathrm{min} e_text{th}$

  • energy/idiag_ethtot [integer,private/optional/default=0]

    DIAG_DOC: $int_V e_{text{th}},dV$

  • energy/idiag_etot [integer,private/optional/default=0]

    DIAG_DOC: $langle e_textrm{th} + rho u^2 / 2rangle$

  • energy/idiag_pdivum [integer,private/optional/default=0]
  • energy/idiag_ppm [integer,private/optional/default=0]

    DIAG_DOC: $left< p right>$

  • energy/idiag_ppmx [integer,private/optional/default=0]

    YZAVG_DOC: $left<pright>_{yz}$

  • energy/idiag_ppmy [integer,private/optional/default=0]

    XZAVG_DOC: $left<pright>_{xz}$

  • energy/idiag_ppmz [integer,private/optional/default=0]

    XYAVG_DOC: $left<pright>_{xy}$

  • energy/idiag_ttm [integer,private/optional/default=0]

    DIAG_DOC: $left<Tright>$

  • energy/idiag_ttmax [integer,private/optional/default=0]

    DIAG_DOC: $max (T)$

  • energy/idiag_ttmin [integer,private/optional/default=0]

    DIAG_DOC: $min (T)$

  • energy/idiag_ttmx [integer,private/optional/default=0]

    YZAVG_DOC: $left<Tright>_{yz}$

  • energy/idiag_ttmxy [integer,private/optional/default=0]

    ZAVG_DOC: $left<Tright>_{z}$

  • energy/idiag_ttmxz [integer,private/optional/default=0]

    YAVG_DOC: $left<Tright>_{y}$

  • energy/idiag_ttmy [integer,private/optional/default=0]

    XZAVG_DOC: $left<Tright>_{xz}$

  • energy/idiag_ttmz [integer,private/optional/default=0]

    XYAVG_DOC: $left<Tright>_{xy}$

  • energy/init_cooling_sd93 [private]
  • energy/initeth (ninit) [character,private/optional/default='nothing']
  • energy/ivid_pp [integer,private/optional/default=0]
  • energy/jeans_c0 [real,private/optional/default=0.0]
  • energy/jeans_floor [private]
  • energy/kappa_rosseland [real,private/optional/default=1.0]
  • energy/ki_a0 [real,private/optional/default=0.0]
  • energy/ki_a1 [real,private/optional/default=0.0]
  • energy/ki_a2 [real,private/optional/default=0.0]
  • energy/ki_heat [real,private/parameter/optional/default=2e-26]

    heating rate [erg/s]

  • energy/ki_t1 [real,private/parameter/optional/default=118400.0]
  • energy/ki_t2 [real,private/parameter/optional/default=1000.0]
  • energy/ki_t3 [real,private/parameter/optional/default=92.0]

    coefficients for the temperatures [K]

  • energy/ki_v1 [real,private/parameter/optional/default=10000000.0]
  • energy/ki_v2 [real,private/parameter/optional/default=0.014]

    coefficients of the two terms in Lambda / Gamma [cm^3]

  • energy/lcheck_negative_energy [logical,private/optional/default=.false.]
  • energy/lchi_rosseland [logical,private/optional/default=.false.]
  • energy/lconst_cooling_time [logical,private/optional/default=.false.]
  • energy/lenergy_slope_limited [logical,private/optional/default=.false.]
  • energy/ljeans_floor [logical,private/optional/default=.false.]
  • energy/lki02 [logical,private/optional/default=.false.]
  • energy/lpressuregradient_gas [logical,private/pointer]
  • energy/lsd93 [logical,private/optional/default=.false.]
  • energy/lsplit_update [logical,private/optional/default=.false.]
  • energy/lupw_eth [logical,private/optional/default=.false.]
  • energy/lviscosity_heat [logical,private/optional/default=.true.]
  • energy/njeans [integer,private/optional/default=4]
  • energy/nu_z [real,private/optional/default=0.0]
  • energy/pp_r (*,*,*,*,*) [real,private/allocatable]
  • energy/pp_xy (*,*) [real,private/allocatable]
  • energy/pp_xy2 (*,*) [real,private/allocatable]
  • energy/pp_xy3 (*,*) [real,private/allocatable]
  • energy/pp_xy4 (*,*) [real,private/allocatable]
  • energy/pp_xz (*,*) [real,private/allocatable]
  • energy/pp_xz2 (*,*) [real,private/allocatable]
  • energy/pp_yz (*,*) [real,private/allocatable]
  • energy/rho0z (mz) [real,private/optional/default=0.0]
  • energy/rk_eps [real,private/optional/default=0.001]
  • energy/rk_nmax [integer,private/optional/default=100]
  • energy/sd_a0 [real,private/optional/default=0.0]
  • energy/sd_loglambda (*) [real,private/allocatable]
  • energy/sd_logtt (*) [real,private/allocatable]
  • energy/sd_nt [integer,private/optional/default=0]
  • energy/tau_cool [real,private/optional/default=1.0]
  • energy/temperature_floor [real,private/optional/default=0.0]
  • energy/ttref [real,private/optional/default=0.0]
  • energy/w_sldchar_ene [real,private/optional/default=0.1]
  • energy/widtheth [real,private]
  • energy/xjump_mid [real,private/optional/default=0.0]
  • energy/yjump_mid [real,private/optional/default=0.0]
  • energy/zjump_mid [real,private/optional/default=0.0]

Subroutines and functions

subroutine  energy/register_energy()

Initialise variables which should know that we solve an energy equation.

04-nov-10/anders+evghenii: adapted

Use :

farraymanager (farray_register_pde()), sharedvariables (put_shared_variable())

Called from:

register_modules()

Call to:

svn_id(), select_eos_variable(), fatal_error(), get_gamma_etc(), getmu(), not_implemented(), get_stratz(), jump(), initial_condition_ss(), weno_transp(), identify_bcs(), special_calc_energy(), calc_viscous_heat(), der6(), calc_diagnostics_energy(), max_mn_name(), integrate_mn_name(), yzsum_mn_name_x(), xzsum_mn_name_y(), xysum_mn_name_z(), ysum_mn_name_xz(), impose_density_floor(), impose_energy_floor(), update_ghosts(), warning(), get_soundspeed(), get_env_var()

subroutine  energy/initialize_energy(f)

Called by run.f90 after reading parameters, but before the time loop.

04-nov-10/anders+evghenii: adapted 03-oct-11/ccyang: add initialization for KI02

Parameters:

f (,,*,*) [real,inout,contiguous]

Use :

equationofstate (select_eos_variable(), get_stratz(), getmu(), cs0(), cs20(), get_gamma_etc()), sharedvariables (get_shared_variable()), slices_methods (alloc_slice_buffers())

Called from:

register_modules(), initialize_modules()

Call to:

select_eos_variable(), fatal_error(), get_gamma_etc(), getmu(), not_implemented(), get_stratz(), jump(), initial_condition_ss(), weno_transp(), identify_bcs(), special_calc_energy(), calc_viscous_heat(), der6(), calc_diagnostics_energy(), max_mn_name(), integrate_mn_name(), yzsum_mn_name_x(), xzsum_mn_name_y(), xysum_mn_name_z(), ysum_mn_name_xz(), impose_density_floor(), impose_energy_floor(), update_ghosts(), warning(), get_soundspeed(), get_env_var()

subroutine  energy/init_energy(f)

Initialise thermal energy.

04-nov-10/anders+evghenii: adapted

Parameters:

f (,,*,*) [real,inout,contiguous]

Use :

general (itoa()), initcond (jump()), equationofstate (rho0(), cs20()), initialcondition (initial_condition_ss())

Called from:

start

Call to:

jump(), fatal_error(), initial_condition_ss(), weno_transp(), not_implemented(), identify_bcs(), special_calc_energy(), calc_viscous_heat(), der6(), calc_diagnostics_energy(), max_mn_name(), integrate_mn_name(), yzsum_mn_name_x(), xzsum_mn_name_y(), xysum_mn_name_z(), ysum_mn_name_xz(), impose_density_floor(), impose_energy_floor(), update_ghosts(), warning(), get_soundspeed(), get_env_var(), getmu()

subroutine  energy/pencil_criteria_energy()

All pencils that the Energy module depends on are specified here.

04-nov-10/anders+evghenii: adapted

Called from:

register_modules(), initialize_modules(), finalize_modules(), choose_pencils()

Call to:

weno_transp(), not_implemented(), identify_bcs(), special_calc_energy(), calc_viscous_heat(), der6(), calc_diagnostics_energy(), max_mn_name(), integrate_mn_name(), yzsum_mn_name_x(), xzsum_mn_name_y(), xysum_mn_name_z(), ysum_mn_name_xz(), fatal_error(), impose_density_floor(), impose_energy_floor(), update_ghosts(), warning(), get_soundspeed(), get_env_var(), getmu()

subroutine  energy/pencil_interdep_energy(lpencil_in)

Interdependency among pencils from the Energy module is specified here.

04-nov-10/anders+evghenii: adapted

Parameters:

lpencil_in (npencils) [logical]

Called from:

register_modules(), initialize_modules(), finalize_modules(), choose_pencils()

Call to:

weno_transp(), not_implemented(), identify_bcs(), special_calc_energy(), calc_viscous_heat(), der6(), calc_diagnostics_energy(), max_mn_name(), integrate_mn_name(), yzsum_mn_name_x(), xzsum_mn_name_y(), xysum_mn_name_z(), ysum_mn_name_xz(), fatal_error(), impose_density_floor(), impose_energy_floor(), update_ghosts(), warning(), get_soundspeed(), get_env_var(), getmu()

subroutine  energy/calc_pencils_energy(f, p)

Calculate Energy pencils. This routine is called after calc_pencils_eos Most basic pencils should come first, as others may depend on them.

04-nov-10/anders+evghenii: adapted 14-feb-11/bing: moved eth dependend pecnils to eos_idealgas

Parameters:
  • f (,,*,*) [real,contiguous]

  • p [pencil_case]

Use :

equationofstate (cs20()), sub (u_dot_grad()), weno_transport (weno_transp())

Called from:

pde(), write_diagnostics(), calc_all_module_diagnostic_auxiliaries(), perform_diagnostics(), finalize_diagnostics()

Call to:

weno_transp(), not_implemented(), identify_bcs(), special_calc_energy(), calc_viscous_heat(), der6(), calc_diagnostics_energy(), max_mn_name(), integrate_mn_name(), yzsum_mn_name_x(), xzsum_mn_name_y(), xysum_mn_name_z(), ysum_mn_name_xz(), fatal_error(), impose_density_floor(), impose_energy_floor(), update_ghosts(), warning(), get_soundspeed(), get_env_var(), getmu()

subroutine  energy/denergy_dt(f, df, p)

Calculate right hand side of energy equation.

deth/dt + div(u*eth) = -P*div(u)

04-nov-10/anders+evghenii: coded 02-aug-11/ccyang: add mesh hyper-diffusion

Parameters:
  • f (,,*,*) [real,in,contiguous]

  • df (,,*,*) [real,inout,contiguous]

  • p [pencil_case,in]

Use :

special (special_calc_energy()), sub (identify_bcs(), u_dot_grad(), del2()), viscosity (calc_viscous_heat()), deriv (der6())

Called from:

pde(), write_diagnostics(), calc_all_module_diagnostic_auxiliaries(), perform_diagnostics(), finalize_diagnostics()

Call to:

identify_bcs(), special_calc_energy(), calc_viscous_heat(), der6(), calc_diagnostics_energy(), max_mn_name(), integrate_mn_name(), yzsum_mn_name_x(), xzsum_mn_name_y(), xysum_mn_name_z(), ysum_mn_name_xz(), fatal_error(), impose_density_floor(), impose_energy_floor(), update_ghosts(), warning(), get_soundspeed(), get_env_var(), getmu()

subroutine  energy/calc_diagnostics_energy(f, p)
Parameters:
  • f (,,*,*) [real,contiguous]

  • p [pencil_case]

Use :

diagnostics, slices_methods (store_slices())

Called from:

register_energy(), initialize_energy(), init_energy(), pencil_criteria_energy(), pencil_interdep_energy(), calc_pencils_energy(), denergy_dt(), pde(), write_diagnostics(), calc_all_module_diagnostic_auxiliaries()

Call to:

max_mn_name(), integrate_mn_name(), yzsum_mn_name_x(), xzsum_mn_name_y(), xysum_mn_name_z(), ysum_mn_name_xz(), fatal_error(), impose_density_floor(), impose_energy_floor(), update_ghosts(), warning(), get_soundspeed(), get_env_var(), getmu()

subroutine  energy/energy_before_boundary(f)

Actions to take before boundary conditions are set.

1-apr-20/joern: coded

Parameters:

f (,,*,*) [real,inout,contiguous]

Called from:

pde(), write_diagnostics(), calc_all_module_diagnostic_auxiliaries(), perform_diagnostics(), finalize_diagnostics()

Call to:

fatal_error(), impose_density_floor(), impose_energy_floor(), update_ghosts(), warning(), get_soundspeed(), get_env_var(), getmu()

subroutine  energy/read_energy_init_pars(iomsg)
Parameters:

iomsg [character,out]

Use :

file_io (parallel_unit())

Call to:

fatal_error(), impose_density_floor(), impose_energy_floor(), update_ghosts(), warning(), get_soundspeed(), get_env_var(), getmu()

subroutine  energy/write_energy_init_pars(unit)
Parameters:

unit [integer,in]

Called from:

get_datadir(), get_snapdir(), read_all_init_pars(), read_all_run_pars(), get_downpars()

Call to:

fatal_error(), impose_density_floor(), impose_energy_floor(), update_ghosts(), warning(), get_soundspeed(), get_env_var(), getmu()

subroutine  energy/read_energy_run_pars(iomsg)
Parameters:

iomsg [character,out]

Use :

file_io (parallel_unit())

Call to:

fatal_error(), impose_density_floor(), impose_energy_floor(), update_ghosts(), warning(), get_soundspeed(), get_env_var(), getmu()

subroutine  energy/write_energy_run_pars(unit)
Parameters:

unit [integer,in]

Called from:

get_datadir(), get_snapdir(), read_all_init_pars(), read_all_run_pars(), get_downpars()

Call to:

fatal_error(), impose_density_floor(), impose_energy_floor(), update_ghosts(), warning(), get_soundspeed(), get_env_var(), getmu()

subroutine  energy/rprint_energy(lreset[, lwrite])

Reads and registers print parameters relevant to entropy.

04-nov-10/anders+evghenii: adapted from temperature_idealgas.f90

Parameters:
  • lreset [logical]

  • lwrite [logical]

Use :

diagnostics (parse_name())

Called from:

register_modules(), initialize_modules(), finalize_modules(), choose_pencils(), rprint_list()

Call to:

fatal_error(), impose_density_floor(), impose_energy_floor(), update_ghosts(), warning(), get_soundspeed(), get_env_var(), getmu()

subroutine  energy/get_slices_energy(f, slices)

04-nov-10/anders+evghenii: adapted

Parameters:
Use :

slices_methods (assign_slices_scal(), process_slices(), exp2d()), equationofstate (eoscalc(), irho_eth(), ilnrho_eth())

Called from:

wvid_prepare(), wvid()

Call to:

fatal_error(), impose_density_floor(), impose_energy_floor(), update_ghosts(), warning(), get_soundspeed(), get_env_var(), getmu()

subroutine  energy/impose_energy_floor(f)

Trap any negative energy or impose a floor in minimum thermal energy.

29-aug-11/ccyang: coded

Parameters:

f (,,*,*) [real,contiguous]

Called from:

register_energy(), initialize_energy(), read_energy_init_pars(), write_energy_init_pars(), read_energy_run_pars(), write_energy_run_pars(), init_energy(), pencil_criteria_energy(), pencil_interdep_energy(), calc_pencils_energy(), denergy_dt(), calc_diagnostics_energy(), energy_before_boundary(), rprint_energy(), get_slices_energy(), impose_energy_floor(), dynamical_thermal_diffusion(), pde(), write_diagnostics(), calc_all_module_diagnostic_auxiliaries(), perform_diagnostics(), finalize_diagnostics(), debug_imn_arrays(), impose_floors_ceilings(), split_update_energy()

Call to:

fatal_error(), impose_density_floor(), impose_energy_floor(), update_ghosts(), warning(), get_soundspeed(), get_env_var(), getmu()

subroutine  energy/dynamical_thermal_diffusion(uc)

Dynamically set thermal diffusion coefficient given fixed mesh Reynolds number.

02-aug-11/ccyang: coded

Input Argument
uc

Characteristic velocity of the system.

Parameters:

uc [real,in]

Called from:

pde(), write_diagnostics(), calc_all_module_diagnostic_auxiliaries(), perform_diagnostics(), finalize_diagnostics(), debug_imn_arrays()

Call to:

impose_density_floor(), impose_energy_floor(), update_ghosts(), warning(), get_soundspeed(), get_env_var(), fatal_error(), getmu()

subroutine  energy/split_update_energy(f)

Update the thermal energy by integrating the operator split energy terms.

19-jan-13/ccyang: coded

Parameters:

f (,,*,*) [real,inout,contiguous]

Use :

boundcond (zero_ghosts(), update_ghosts()), density (impose_density_floor())

Call to:

impose_density_floor(), impose_energy_floor(), update_ghosts(), warning(), get_soundspeed(), get_env_var(), fatal_error(), getmu()

subroutine  energy/update_char_vel_energy(f)

TB implemented.

25-sep-15/MR+joern: coded

Parameters:

f (,,*,*) [real,in,contiguous]

Call to:

warning()