shock_perp
Module
Description
$Id$
This modules implements viscous heating and diffusion terms here for shock viscosity
nu_total = nu + nu_shock*dx^2*smooth(max5(-(div u))))
NOTE: this works and has been tested for periodic boundaries. With the current version, if your shock fronts reach a non-periodic boundary, unexpected things may happen, so you should monitor the behavior on the boundaries in this case.
** 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 :: lshock = .true.
MVAR CONTRIBUTION 0 MAUX CONTRIBUTION 2 COMMUNICATED AUXILIARIES 2
PENCILS PROVIDED shock; gshock(3); shock_perp; gshock_perp(3)
Quick access
- Variables:
con_bias,div_scaling,div_threshold,dt_div_pow,dtfactor,idiag_gshockmax,idiag_shockm,idiag_shockmax,idiag_shockmax_perp,idiag_shockmin,idiag_shockmx,idiag_shockmy,idiag_shockmz,ishock_max,ivel,ivelx,ively,ivelz,lcommunicate_uu,lconvergence_bias,lconvergence_only,lfix_re_mesh,lforce_periodic_shockviscosity,lgauss_integral,lgauss_integral_comm_uu,lgaussian_smooth,lmax_shock,lrewrite_shock_boundary,lshock_first,lshock_linear,lshock_max3_interp,lshock_max5,lshock_modulation_z,lwith_extreme_div,maximum_shock,shock_div_pow,shock_divu_perp,shock_linear,shock_max3,shock_max3_interp,shock_smooth,smooth_factor,smooth_shock,tmp,wave_speed,width_shock,z_shock- Routines:
bcshock_per_x(),bcshock_per_y(),bcshock_per_z(),calc_diagnostics_shock(),calc_pencils_shock(),calc_shock_profile(),calc_shock_profile_external(),calc_shock_profile_internal(),calc_shock_profile_simple(),get_slices_shock(),initialize_shock(),pencil_criteria_shock(),pencil_interdep_shock(),read_shock_run_pars(),register_shock(),rprint_shock(),scale_and_chop(),scale_and_chop_internalboundary(),shock_before_boundary(),shock_divu_farray(),shock_divu_pencil(),shock_divu_perp_pencil(),shock_max3_farray(),shock_max3_pencil(),shock_max3_pencil_interp(),shock_max5(),shock_max5_pencil(),shock_smooth_cube_diamond7(),shock_smooth_farray(),shock_smooth_octagon7(),shock_smooth_pencil(),write_shock_run_pars()
Needed modules
Variables
- shock/div_scaling [real,optional/default=1.0]
- shock/div_threshold [real,optional/default=0.0]
- shock/idiag_shockmax [integer,optional/default=0]
- shock/idiag_shockmax_perp [integer,optional/default=0]
- shock/lcommunicate_uu [logical,optional/default=.true.]
- shock/lforce_periodic_shockviscosity [logical,optional/default=.false.]
- shock/lgauss_integral [logical,optional/default=.false.]
- shock/lgauss_integral_comm_uu [logical,optional/default=.false.]
- shock/lshock_first [logical,optional/default=.true.]
- shock/lshock_max3_interp [logical,optional/default=.false.]
- shock/lshock_max5 [logical,optional/default=.false.]
- shock/lwith_extreme_div [logical,optional/default=.false.]
- shock/smooth_factor (3,3,3) [real]
Subroutines and functions
- subroutine shock/register_shock()
19-nov-02/tony: coded 24-jan-05/tony: modified from visc_shock.f90
- Use :
- Call to:
svn_id(),fatal_error(),max_mn_name(),shock_divu(),shock_max5(),bcshock_per_x(),initiate_isendrcv_bdry(),finalize_isendrcv_bdry(),bcshock_per_y(),bcshock_per_z(),boundconds_y(),boundconds_z(),boundconds_x(),calc_shock_profile_internal(),calc_shock_profile_external(),bb_unitvec_shock(),stop_it(),scale_and_chop()
- subroutine shock/initialize_shock(f)
20-nov-02/tony: coded
- Parameters:
- Use :
- Call to:
fatal_error(),max_mn_name(),shock_divu(),shock_max5(),bcshock_per_x(),initiate_isendrcv_bdry(),finalize_isendrcv_bdry(),bcshock_per_y(),bcshock_per_z(),boundconds_y(),boundconds_z(),boundconds_x(),calc_shock_profile_internal(),calc_shock_profile_external(),bb_unitvec_shock(),stop_it(),scale_and_chop()
- subroutine shock/read_shock_run_pars(iomsg)
- Parameters:
iomsg [character,out]
- Use :
- Call to:
max_mn_name(),shock_divu(),shock_max5(),bcshock_per_x(),initiate_isendrcv_bdry(),finalize_isendrcv_bdry(),bcshock_per_y(),bcshock_per_z(),boundconds_y(),boundconds_z(),boundconds_x(),calc_shock_profile_internal(),calc_shock_profile_external(),fatal_error(),bb_unitvec_shock(),stop_it(),scale_and_chop()
- subroutine shock/write_shock_run_pars(unit)
- Parameters:
unit [integer,in]
- Call to:
max_mn_name(),shock_divu(),shock_max5(),bcshock_per_x(),initiate_isendrcv_bdry(),finalize_isendrcv_bdry(),bcshock_per_y(),bcshock_per_z(),boundconds_y(),boundconds_z(),boundconds_x(),calc_shock_profile_internal(),calc_shock_profile_external(),fatal_error(),bb_unitvec_shock(),stop_it(),scale_and_chop()
- subroutine shock/rprint_shock(lreset[, lwrite])
Writes ishock to index.pro file
24-nov-03/tony: adapted from rprint_ionization
- Parameters:
lreset [logical]
lwrite [logical]
- Use :
- Call to:
max_mn_name(),shock_divu(),shock_max5(),bcshock_per_x(),initiate_isendrcv_bdry(),finalize_isendrcv_bdry(),bcshock_per_y(),bcshock_per_z(),boundconds_y(),boundconds_z(),boundconds_x(),calc_shock_profile_internal(),calc_shock_profile_external(),fatal_error(),bb_unitvec_shock(),stop_it(),scale_and_chop()
- subroutine shock/get_slices_shock(f, slices)
Write slices for animation of shock variable.
26-jul-06/tony: coded
- Parameters:
slices [slice_data]
- Use :
- Call to:
max_mn_name(),shock_divu(),shock_max5(),bcshock_per_x(),initiate_isendrcv_bdry(),finalize_isendrcv_bdry(),bcshock_per_y(),bcshock_per_z(),boundconds_y(),boundconds_z(),boundconds_x(),calc_shock_profile_internal(),calc_shock_profile_external(),fatal_error(),bb_unitvec_shock(),stop_it(),scale_and_chop()
- subroutine shock/pencil_criteria_shock()
All pencils that the Viscosity module depends on are specified here.
20-11-04/anders: coded
dummy
- Call to:
max_mn_name(),shock_divu(),shock_max5(),bcshock_per_x(),initiate_isendrcv_bdry(),finalize_isendrcv_bdry(),bcshock_per_y(),bcshock_per_z(),boundconds_y(),boundconds_z(),boundconds_x(),calc_shock_profile_internal(),calc_shock_profile_external(),fatal_error(),bb_unitvec_shock(),stop_it(),scale_and_chop()
- subroutine shock/pencil_interdep_shock(lpencil_in)
Interdependency among pencils from the Viscosity module is specified here.
20-11-04/anders: coded
- Parameters:
lpencil_in (npencils) [logical]
- Use :
- Call to:
max_mn_name(),shock_divu(),shock_max5(),bcshock_per_x(),initiate_isendrcv_bdry(),finalize_isendrcv_bdry(),bcshock_per_y(),bcshock_per_z(),boundconds_y(),boundconds_z(),boundconds_x(),calc_shock_profile_internal(),calc_shock_profile_external(),fatal_error(),bb_unitvec_shock(),stop_it(),scale_and_chop()
- subroutine shock/calc_pencils_shock(f, p)
Calculate Viscosity pencils. Most basic pencils should come first, as others may depend on them.
20-11-04/anders: coded
- Parameters:
- Use :
- Call to:
max_mn_name(),shock_divu(),shock_max5(),bcshock_per_x(),initiate_isendrcv_bdry(),finalize_isendrcv_bdry(),bcshock_per_y(),bcshock_per_z(),boundconds_y(),boundconds_z(),boundconds_x(),calc_shock_profile_internal(),calc_shock_profile_external(),fatal_error(),bb_unitvec_shock(),stop_it(),scale_and_chop()
- subroutine shock/calc_shock_profile_simple(f)
Calculate divu based shock profile to be used in viscosity and diffusion type terms.
23-nov-02/tony: coded
for debug use IO
- Parameters:
- Use :
- Call to:
shock_divu(),shock_max5(),bcshock_per_x(),initiate_isendrcv_bdry(),finalize_isendrcv_bdry(),bcshock_per_y(),bcshock_per_z(),boundconds_y(),boundconds_z(),boundconds_x(),calc_shock_profile_internal(),calc_shock_profile_external(),fatal_error(),bb_unitvec_shock(),stop_it(),scale_and_chop()
- subroutine shock/calc_shock_profile(f)
Calculate divu based shock profile to be used in viscosity and diffusion type terms.
12-apr-05/tony: coded
- Parameters:
- Use :
- Call to:
bcshock_per_x(),initiate_isendrcv_bdry(),finalize_isendrcv_bdry(),bcshock_per_y(),bcshock_per_z(),boundconds_y(),boundconds_z(),boundconds_x(),calc_shock_profile_internal(),calc_shock_profile_external(),shock_divu(),fatal_error(),bb_unitvec_shock(),stop_it(),scale_and_chop()
- subroutine shock/calc_shock_profile_internal(f, j, tmp, lperp)
- Parameters:
- Use :
interstellar(calc_snr_unshock())- Call to:
shock_divu(),fatal_error(),bb_unitvec_shock(),stop_it(),scale_and_chop()
- subroutine shock/calc_shock_profile_external(f, j, tmp, lperp)
- Parameters:
- Use :
interstellar(calc_snr_unshock())- Call to:
shock_divu(),fatal_error(),bb_unitvec_shock(),stop_it(),scale_and_chop()
- subroutine shock/shock_max5(f, maxf)
return array maxed with by 2 points either way skipping 1 data point all round
23-nov-02/tony: coded - from sub.f90 - nearmax 26-may-03/axel: maxf and f where interchanged in y-chunk
- Parameters:
- Use :
- Call to:
fatal_error(),bb_unitvec_shock(),stop_it(),scale_and_chop()
- subroutine shock/shock_max3_farray(f, maxf)
return array maxed with by 2 points either way skipping 1 data point all round
29-nov-03/axel: adapted from shock_max5
- Parameters:
- Use :
- Call to:
fatal_error(),bb_unitvec_shock(),stop_it(),scale_and_chop()
- subroutine shock/shock_max3_pencil(f, j, maxf)
return array maxed with by 2 points either way skipping 1 data point all round
27-apr-03/tony: adapted from shock_max3
- Parameters:
- Use :
- Call to:
fatal_error(),bb_unitvec_shock(),stop_it(),scale_and_chop()
- subroutine shock/shock_max3_pencil_interp(f, j, maxf)
return array maxed with by 2 points either way skipping 1 data point all round
14-aug-06/tony: adapted from shock_max3
- Parameters:
- Use :
- Call to:
fatal_error(),bb_unitvec_shock(),stop_it(),scale_and_chop()
- subroutine shock/shock_max5_pencil(f, j, maxf)
return array maxed with by 2 points either way skipping 1 data point all round
27-apr-03/tony: adapted from shock_max3
- Parameters:
- Use :
- Call to:
- subroutine shock/shock_smooth_farray(f, smoothf)
return array smoothed with by 2 points either way skipping 3 data point all round i.e. result valid ()
23-nov-02/tony: coded
- Parameters:
- Use :
cdata(mx(),my(),mz())- Call to:
- subroutine shock/shock_smooth_pencil(f, smoothf)
return array smoothed with by 2 points either way skipping 3 data point all round i.e. result valid ()
23-nov-02/tony: coded
- Parameters:
- Use :
- Call to:
- subroutine shock/shock_divu_farray(f, df)
calculate divergence of a vector U, get scalar accurate to 2nd order, explicit, centred an left and right biased
23-nov-02/tony: coded
- subroutine shock/shock_divu_pencil(f, df)
calculate divergence of a vector U, get scalar accurate to 2nd order, explicit, centred an left and right biased
23-nov-02/tony: coded
- Parameters:
- Use :
- Call to:
- subroutine shock/shock_divu_perp_pencil(f, df)
Calculate `perpendicular divergence’ of u. nabla_perp.uu = nabla.uu - (1/b2)*bb.(bb.nabla)*uu
16-aug-06/tobi: coded
- Parameters:
- Use :
- Call to:
- subroutine shock/shock_smooth_cube_diamond7(f, df)
calculate divergence of a vector U smoothed over a 7x7x7 cube by using avergaging by a volume integral and transforming to a surface flux integral using Gauss’ Theorm
01-apr-05/tony: coded
- function shock/scale_and_chop(value)
- Parameters:
value [real]
- Return:
scale_and_chop [real]
- Called from:
calc_shock_profile_internal(),calc_shock_profile_external(),shock_max5(),shock_max3_farray(),shock_max3_pencil(),shock_max3_pencil_interp(),shock_max5_pencil(),shock_smooth_farray(),shock_smooth_pencil(),shock_divu_farray(),shock_divu_pencil(),shock_divu_perp_pencil(),shock_smooth_cube_diamond7(),scale_and_chop(),scale_and_chop_internalboundary(),shock_smooth_octagon7()- Call to:
- subroutine shock/scale_and_chop_internalboundary(f)
- subroutine shock/shock_smooth_octagon7(f, df)
calculate divergence of a vector U smoothed over a 7x7x7 cube by using avergaging by a volume integral and transforming to a surface flux integral using Gauss’ Theorm
01-apr-05/tony: coded
- subroutine shock/bcshock_per_x(f)
periodic boundary condition 11-nov-02/tony: coded
- subroutine shock/bcshock_per_y(f)
periodic boundary condition 11-nov-02/tony: coded