entropy_const

Module

Description

$Id$

This module is for systems with spatially fixed entropy distribution. This implies Ds/Dt=u.grads only, which is used in Ds/Dt=(1/gamma)*Dlnp/Dt-Dlnrho/Dt, for example. This procedure has been used in the context of accretion discs (see von Rekowski et al., 2003, A&A 398, 825). The shock jump relations are modified (see Sect 9.3.6 of Brandenburg 2003, in “Computational aspects…”, ed. Ferriz-Mas & Nunez, Taylor & Francis, or astro-ph/0109497.

This current implementation has temporarily been used to imitate a corona in solar context.

** 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 = .true. CPARAM logical, parameter :: ltemperature = .false. CPARAM logical, parameter :: lthermal_energy = .false.

MVAR CONTRIBUTION 0 MAUX CONTRIBUTION 0

PENCILS PROVIDED Ma2; fpres(3); sglnTT(3); advec_cs2

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/beta_glnrho_global (3) [real,optional/default=0.]
  • energy/chi [real,optional/default=impossible]
  • energy/dprofxss (nx) [real]
  • energy/dummy [real]
  • energy/fbot [real,optional/default=impossible]
  • energy/fbotkbot [real,optional/default=impossible]
  • energy/ftop [real,optional/default=impossible]
  • energy/ftopktop [real,optional/default=impossible]
  • energy/hcond0 [real,optional/default=0.0]
  • energy/hcond1 [real,optional/default=impossible]
  • energy/idiag_dtc [integer,optional/default=0]
  • energy/idiag_dtchi [integer,optional/default=0]
  • energy/idiag_ethdivum [integer,optional/default=0]
  • energy/idiag_ethm [integer,optional/default=0]
  • energy/idiag_ethtot [integer,optional/default=0]
  • energy/idiag_ssm [integer,optional/default=0]
  • energy/idiag_ssmphi [integer,optional/default=0]
  • energy/idiag_ugradpm [integer,optional/default=0]
  • energy/initss (ninit) [character,optional/default='nothing']
  • energy/iss_profile [character,optional/default='nothing']
  • energy/kbot [real,optional/default=impossible]
  • energy/lcalc_heatcond_constchi [logical,optional/default=.false.]
  • energy/lenergy_slope_limited [logical,optional/default=.false.]
  • energy/lmultilayer [logical,optional/default=.true.]
  • energy/profxss (nx) [real]
  • energy/ss_const [real,optional/default=1.0]
  • energy/ss_corona [real]
  • energy/wss_corona [real]
  • energy/xss_corona [real]

Subroutines and functions

subroutine  energy/register_energy()

initialise variables which should know that we solve an energy equation: iss, etc; increase nvar accordingly

6-nov-01/wolf: coded

identify version number

Use :

sharedvariables (put_shared_variable())

Call to:

svn_id(), not_implemented(), calc_diagnostics_energy(), max_mn_name(), dot_mn()

subroutine  energy/initialize_energy(f)

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

21-jul-2002/wolf: coded

Parameters:

f (mx,my,mz,mfarray) [real]

Use :

cdata

Call to:

not_implemented(), calc_diagnostics_energy(), max_mn_name(), dot_mn()

subroutine  energy/init_energy(f)

initialise energy; called from start.f90 07-nov-2001/wolf: coded 24-nov-2002/tony: renamed for consistancy (i.e. init_[variable name])

Parameters:

f (mx,my,mz,mfarray) [real]

Call to:

not_implemented(), calc_diagnostics_energy(), max_mn_name(), dot_mn()

subroutine  energy/energy_before_boundary(f)
Parameters:

f (mx,my,mz,mfarray) [real,inout]

Call to:

not_implemented(), calc_diagnostics_energy(), max_mn_name(), dot_mn()

subroutine  energy/energy_after_boundary(f)
Parameters:

f (mx,my,mz,mfarray) [real,inout]

Call to:

not_implemented(), calc_diagnostics_energy(), max_mn_name(), dot_mn()

subroutine  energy/pencil_criteria_energy()
Call to:

calc_diagnostics_energy(), max_mn_name(), dot_mn()

subroutine  energy/pencil_interdep_energy(lpencil_in)

Interdependency among pencils from the Energy module is specified here.

Parameters:

lpencil_in (npencils) [logical]

Call to:

calc_diagnostics_energy(), max_mn_name(), dot_mn()

subroutine  energy/calc_pencils_energy(f, p)

Calculate Energy pencils. Most basic pencils should come first, as others may depend on them.

Parameters:
Call to:

calc_diagnostics_energy(), max_mn_name(), dot_mn()

subroutine  energy/denergy_dt(f, df, p)

28-mar-02/axel: dummy routine, adapted from entropy.f90 of 6-nov-01. 19-may-02/axel: added isothermal pressure gradient

9-jun-02/axel: pressure gradient added to du/dt already here

Parameters:
Use :

densitymethods (getlnrho()), equationofstate (pressure_gradient())

Call to:

calc_diagnostics_energy(), max_mn_name(), dot_mn()

subroutine  energy/calc_diagnostics_energy(f, p)
Parameters:
Use :

diagnostics, sub (dot_mn())

Call to:

max_mn_name(), dot_mn()

subroutine  energy/update_char_vel_energy(f)

Updates characteristic velocity for slope-limited diffusion.

Parameters:

f (mx,my,mz,mfarray) [real]

subroutine  energy/rprint_energy(lreset[, lwrite])

reads and registers print parameters relevant to energy

1-jun-02/axel: adapted from magnetic fields

Parameters:
  • lreset [logical]

  • lwrite [logical]

Use :

cdata, diagnostics, farraymanager (farray_index_append())