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:
checksetup, damping, deriv, dim, dump_utils, energies, eos, externalforces, fileutils, infile_utils, initial, io, io_summary, memory, options, part, physcon, ptmass, readwrite_dumps, setstar_utils, sortutils, 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
,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/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, ierr[, npin[, label]])
- 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]
ierr [integer,out]
npin [integer,in,] :: starting position in particle array
label [character,in,]
- Use :
table_utils
(yinterp()
),deriv
(get_derivs_global()
),dim
(maxp()
,maxvxyzu()
,gr()
,gravity()
),part
(vxyzu()
,rad()
,eos_vars()
,massoftype()
,igas()
),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()
,init_readwrite_dumps()
),eos
(gamma()
,eos_outputs_mu()
),physcon
(pi()
),options
(iexternalforce()
),io_summary
(summary_initialise()
),setstar_utils
(set_star_thermalenergy()
,set_star_composition()
)- Call to:
- subroutine relaxstar/write_options_relax(iunit)
- Parameters:
iunit [integer,in]
- Use :