Download Manual of the Shell-Atm code
Transcript
44 4. Programming the code Determination of density as a function of altitude function rho_det (r, p) Determination of logarithmic derivative of density as a function of altitude function rhodl_det (r, p) Determination of flux tube expansion as a function of altitude: A = r^2*f function aexp_det(r, p) use fexpand Determination of flux tube expansion logarithmic derivative A’/A as a function of altitude: A = r^2*f function aexpdl_det (r, p) use fexpand Determination sound speed for normalisation (if needed) function cs_det (p) Print parameters specific to atmosphere subroutine atmosphere_print_parameters(p) src/atmosphere-stratin.f90 for atmosphere whose Alfvén speed profile is read in in_va and mass density profile is read in in_rho. The expansion factor profile is then deduced from the conservation of the magnetic flux in the flux tube. Note that the nominal width of the flux tube (i.e. the point vers the expansion factor is 1) is taken at the middle of the length of the flux tube. Module atmosphere-stratin Variables and routines for a stratified cartesian atmosphere where the profiles for density and Alfven speed are read in files (in_rho and in_va) Authors: AV Andrea Verdini EB Eric Buchlin Modifications history: 22 Mar 2006: EB Created module atmosphere use types Allocate variables for the atmosphere subroutine atmosphere_allocate(p) Deallocate variables for the atmosphere subroutine atmosphere_deallocate Assign values for Alfven speed, Alfven speed gradient and mass density to the grid points. These values are computed by the xxx_det routines (different alternatives according to geometry) MPI: need to check subroutine grid_assign (p) use mpi Print parameters specific to atmosphere