relax_star
Module
Description
- Automated relaxation of stellar density profile,
iterating towards hydrostatic equilibrium
- References:
None
- Owner:
Daniel Price
- Runtime parameters:
maxits : maximum number of relaxation iterations
tol_ekin : tolerance on ekin/epot to stop relaxation
- Dependencies:
apr, checksetup, damping, deriv, dim, dump_utils, energies, eos, externalforces, fileutils, infile_utils, initial, io, io_summary, memory, neighkdtree, options, part, physcon, ptmass, readwrite_dumps, setstar_utils, step_lf_global, table_utils, units
Quick access
- Variables:
check_for_existing_file,gammaprev,get_mr,hfactprev,ieos_prev,ierr_no_pressure,ierr_notconverged,ierr_setup_errors,ierr_unbound,mass1prev,reset_u_and_get_errors,restore_original_options,set_options_for_relaxation,shift_particles,shift_star_origin,tol_ekin- Routines:
Variables
- relaxstar/check_for_existing_file [private]
- relaxstar/gammaprev [real,private]
- relaxstar/get_mr [private]
- relaxstar/hfactprev [real,private]
- relaxstar/ieos_prev [integer,private]
- relaxstar/ierr_no_pressure [integer,public/optional/default=2]
- relaxstar/ierr_notconverged [integer,public/optional/default=4]
- relaxstar/ierr_setup_errors [integer,public/optional/default=1]
- relaxstar/ierr_unbound [integer,public/optional/default=3]
- relaxstar/mass1prev [real,private]
- relaxstar/maxits [integer,private/optional/default=1000]
- relaxstar/reset_u_and_get_errors [private]
- relaxstar/restore_original_options [private]
- relaxstar/set_options_for_relaxation [private]
- relaxstar/shift_particles [private]
- relaxstar/shift_star_origin [private]
- relaxstar/tol_ekin [real,private/optional/default=1e-07]
criteria for being converged
Subroutines and functions
- subroutine relaxstar/relax_star(nt, rho, pr, r, npart, xyzh, use_var_comp, xfrac, yfrac, mu, iptmass_core, xyzmh_ptmass, ierr[, npin[, label[, write_dumps[, density_error[, energy_error[, mtab]]]]]])
- Parameters:
nt [integer,in,]
rho (nt) [real,in]
pr (nt) [real,in]
r (nt) [real,in]
npart [integer,inout]
xyzh (,) [real,inout]
use_var_comp [logical,in]
xfrac (*) [real,in,allocatable]
yfrac (*) [real,in,allocatable]
mu (*) [real,in,allocatable]
iptmass_core [integer,in]
xyzmh_ptmass (,) [real,inout] :: mtot is the total mass of the star
ierr [integer,out]
npin [integer,in,] :: starting position in particle array
label [character,in,]
write_dumps [logical,in,]
density_error [real,out,]
energy_error [real,out,]
mtab (nt) [real,in,]
- Use :
table_utils(yinterp()),deriv(get_derivs_global()),dim(maxp(),maxvxyzu(),gr(),gravity(),use_apr()),part(vxyzu(),rad(),eos_vars(),massoftype(),igas(),apr_level(),fxyzu()),step_lf_global(init_step(),step()),initial(initialise()),memory(allocate_memory()),energies(compute_energies(),ekin(),epot(),etherm()),checksetup(check_setup()),io(error(),warning(),fatal(),id(),master()),fileutils(getnextfilename()),readwrite_dumps(write_fulldump()),eos(gamma(),eos_outputs_mu(),ieos(),eos_has_pressure_without_u(),polyk()),physcon(pi()),options(iexternalforce()),io_summary(summary_initialise()),setstar_utils(set_star_thermalenergy(),set_star_composition()),apr(init_apr(),update_apr()),neighkdtree(allocate_neigh())- Call to:
- subroutine relaxstar/write_options_relax(iunit)
- Parameters:
iunit [integer,in]
- Use :