The constructor of TYPE particles is supposed to set up a particle distribution by assigning the particle positions, their baryon numbers nu and first guesses for their smoothing lengths h. It also sets up the unit system and the kernel.
After the particle distribution is set up, it assigns the \(\mathrm{ID}\) to the particles. It does not compute the \(\mathrm{SPH}\) variables and it does not set up the neighbors' tree. The latter two things are delegated to the other methods of TYPE particles.
FT 17.10.2020
Last updated: FT 27.10.2022
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(idbase), | intent(inout) | :: | id |
idbase object representing the BNS for which we want to place particles |
||
integer, | intent(in) | :: | dist |
Identifier of the desired particle distribution:
|
Constructed particles object
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private | :: | a | ||||
logical, | private | :: | adapt_ghosts | ||||
logical, | private, | DIMENSION(max_length) | :: | apm_iterate | |||
integer, | private | :: | apm_max_it | ||||
double precision, | private, | DIMENSION(id% get_n_matter(),3) | :: | barycenter | |||
double precision, | private, | DIMENSION(id% get_n_matter(),3) | :: | center | |||
double precision, | private, | DIMENSION(id% get_n_matter()) | :: | central_density | |||
integer, | private | :: | column_nu | ||||
integer, | private, | DIMENSION(3) | :: | columns | |||
logical, | private | :: | compose_eos | ||||
character(len=max_length), | private | :: | compose_filename | ||||
character(len=max_length), | private | :: | compose_path | ||||
logical, | private | :: | correct_nu | ||||
integer, | private, | SAVE | :: | counter | = | 1 | |
logical, | private, | parameter | :: | debug | = | .FALSE. | |
logical, | private | :: | exist | ||||
logical, | private | :: | file_exists | ||||
character(len=max_length), | private | :: | filename_apm_pos | ||||
character(len=max_length), | private | :: | filename_apm_pos_id | ||||
character(len=max_length), | private | :: | filename_apm_results | ||||
character(len=max_length), | private | :: | filename_mass_profile | ||||
character(len=max_length), | private | :: | filename_shells_pos | ||||
character(len=max_length), | private | :: | filename_shells_radii | ||||
double precision, | private, | DIMENSION(id% get_n_matter()) | :: | g00_lengthscales | |||
double precision, | private | :: | ghost_dist | ||||
double precision, | private, | DIMENSION(id% get_n_matter()) | :: | ghost_dists | |||
integer, | private | :: | header_lines | ||||
integer, | private | :: | i_matter | ||||
double precision, | private, | DIMENSION(id% get_n_matter()) | :: | lapse_lengthscales | |||
double precision, | private | :: | last_r | ||||
double precision, | private | :: | lower_bound | ||||
double precision, | private | :: | lower_factor | ||||
logical, | private | :: | mass_it | ||||
integer, | private | :: | max_inc | ||||
integer, | private, | parameter | :: | max_length | = | 50 | |
double precision, | private | :: | max_mass | ||||
integer, | private | :: | max_steps | ||||
double precision, | private | :: | min_eps | ||||
double precision, | private | :: | min_g00_abs | ||||
double precision, | private | :: | min_lapse | ||||
double precision, | private | :: | min_vel | ||||
logical, | private | :: | move_away_ghosts | ||||
integer, | private | :: | n_cols | ||||
integer, | private | :: | n_matter_tmp | ||||
integer, | private | :: | nlines | ||||
integer, | private | :: | npart_des | ||||
integer, | private, | DIMENSION(id% get_n_matter()) | :: | npart_des_i | |||
integer, | private, | DIMENSION(:), ALLOCATABLE | :: | npart_i_tmp | |||
integer, | private | :: | npart_tmp | ||||
double precision, | private | :: | nu_ratio_des | ||||
double precision, | private | :: | nuratio_des | ||||
double precision, | private | :: | nuratio_thres | ||||
integer, | private | :: | nx_gh | ||||
integer, | private | :: | ny_gh | ||||
integer, | private | :: | nz_gh | ||||
type(parts_i), | private, | DIMENSION(id% get_n_matter()) | :: | parts_all | |||
character(len=:), | private, | ALLOCATABLE | :: | parts_out_namefile |
Name for the file to print the final particle distribution and nu |
||
character(len=max_length), | private | :: | parts_pos | ||||
character(len=:), | private, | ALLOCATABLE | :: | parts_pos_namefile | |||
character(len=max_length), | private | :: | parts_pos_path | ||||
double precision, | private | :: | phi_a | ||||
integer, | private | :: | print_step | ||||
double precision, | private | :: | r_a | ||||
logical, | private | :: | randomize_phi | ||||
logical, | private | :: | randomize_r | ||||
logical, | private | :: | randomize_theta | ||||
logical, | private | :: | read_nu | ||||
logical, | private | :: | redistribute_nu | ||||
logical, | private | :: | reflect_particles_x | ||||
logical, | private, | DIMENSION(max_length) | :: | remove_atmosphere | |||
double precision, | private | :: | shift_norm | ||||
double precision, | private, | DIMENSION(id% get_n_matter(),6) | :: | sizes | |||
character(len=3), | private | :: | str_i | ||||
double precision, | private | :: | stretch | ||||
double precision, | private | :: | theta_a | ||||
double precision, | private | :: | thres | ||||
integer, | private | :: | tmp | ||||
double precision, | private, | parameter | :: | tol_equal_mass | = | 5.0D-3 | |
double precision, | private | :: | total_mass | ||||
integer, | private, | parameter | :: | unit_pos | = | 2289 | |
integer, | private, | parameter | :: | unit_pos_out | = | 8754 | |
double precision, | private | :: | upper_bound | ||||
double precision, | private | :: | upper_factor | ||||
logical, | private, | DIMENSION(max_length) | :: | use_atmosphere | |||
logical, | private | :: | use_pressure | ||||
logical, | private | :: | use_thres | ||||
double precision, | private | :: | xmax | ||||
double precision, | private | :: | xmin | ||||
double precision, | private | :: | ymax | ||||
double precision, | private | :: | ymin | ||||
double precision, | private | :: | zmax | ||||
double precision, | private | :: | zmin |
Wrapper function to read the baryon mass density from the \(\mathrm{ID}\)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | x | |||
double precision, | intent(in) | :: | y | |||
double precision, | intent(in) | :: | z |
Wrapper function to read the pressure from the \(\mathrm{ID}\)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | x | |||
double precision, | intent(in) | :: | y | |||
double precision, | intent(in) | :: | z |
Wrapper function to validate a position
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | x | |||
double precision, | intent(in) | :: | y | |||
double precision, | intent(in) | :: | z |
Check that the supplied \(\mathrm{EOS}\) parameters are consistent with the \(\mathrm{EOS}\) used to compute the \(\mathrm{ID}\)
FT xx.09.2022
Compute nstar_eul_id, the relativistic baryon mass density seen by the Eulerian observer, given the \(\mathrm{ID}\)
FT 31.08.2021
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | npart | |||
double precision, | intent(in), | DIMENSION(npart) | :: | v_euler_x | ||
double precision, | intent(in), | DIMENSION(npart) | :: | v_euler_y | ||
double precision, | intent(in), | DIMENSION(npart) | :: | v_euler_z | ||
double precision, | intent(in), | DIMENSION(npart) | :: | g_xx | ||
double precision, | intent(in), | DIMENSION(npart) | :: | g_xy | ||
double precision, | intent(in), | DIMENSION(npart) | :: | g_xz | ||
double precision, | intent(in), | DIMENSION(npart) | :: | g_yy | ||
double precision, | intent(in), | DIMENSION(npart) | :: | g_yz | ||
double precision, | intent(in), | DIMENSION(npart) | :: | g_zz | ||
double precision, | intent(in), | DIMENSION(npart) | :: | baryon_density | ||
double precision, | intent(out), | DIMENSION(npart) | :: | nstar_eul_id |
Compute nstar_id, the relativistic baryon mass density, given the required \(\mathrm{ID}\) as input
FT 31.08.2021
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | npart | |||
double precision, | intent(in), | DIMENSION(npart) | :: | lapse | ||
double precision, | intent(in), | DIMENSION(npart) | :: | shift_x | ||
double precision, | intent(in), | DIMENSION(npart) | :: | shift_y | ||
double precision, | intent(in), | DIMENSION(npart) | :: | shift_z | ||
double precision, | intent(in), | DIMENSION(npart) | :: | v_euler_x | ||
double precision, | intent(in), | DIMENSION(npart) | :: | v_euler_y | ||
double precision, | intent(in), | DIMENSION(npart) | :: | v_euler_z | ||
double precision, | intent(in), | DIMENSION(npart) | :: | g_xx | ||
double precision, | intent(in), | DIMENSION(npart) | :: | g_xy | ||
double precision, | intent(in), | DIMENSION(npart) | :: | g_xz | ||
double precision, | intent(in), | DIMENSION(npart) | :: | g_yy | ||
double precision, | intent(in), | DIMENSION(npart) | :: | g_yz | ||
double precision, | intent(in), | DIMENSION(npart) | :: | g_zz | ||
double precision, | intent(in), | DIMENSION(npart) | :: | baryon_density | ||
double precision, | intent(in), | DIMENSION(npart) | :: | nstar_sph | ||
double precision, | intent(out), | DIMENSION(npart) | :: | nstar_id | ||
double precision, | intent(out), | DIMENSION(npart) | :: | nlrf_sph | ||
double precision, | intent(out), | DIMENSION(npart) | :: | sqg |
Wrapper function to compute the pressure from the given input
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | npart |
Returns the baryon mass density at the desired point |
||
double precision, | intent(in) | :: | x(npart) |
coordinate of the desired point |
||
double precision, | intent(in) | :: | y(npart) |
coordinate of the desired point |
||
double precision, | intent(in) | :: | z(npart) |
coordinate of the desired point |
||
double precision, | intent(in) | :: | nlrf(npart) |
Baryon mass density in the local rest frame |
||
type(eos), | intent(in) | :: | eqos |
\(\mathrm{EOS}\) to use |
||
double precision, | intent(inout) | :: | pressure(npart) |
Pressure at |
||
logical, | intent(in), | optional | :: | verbose |
Set the of the system to com_system
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | npart | |||
double precision, | intent(inout) | :: | pos(3,npart) | |||
double precision, | intent(inout) | :: | nu(npart) | |||
double precision, | intent(in) | :: | com_system(3) |
Wrapper function to compute the relativistic baryon mass density
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | npart | |||
double precision, | intent(in) | :: | x(npart) | |||
double precision, | intent(in) | :: | y(npart) | |||
double precision, | intent(in) | :: | z(npart) | |||
double precision, | intent(in) | :: | nstar_sph(npart) | |||
double precision, | intent(out) | :: | nstar_id(npart) | |||
double precision, | intent(out) | :: | nlrf_sph(npart) | |||
double precision, | intent(out) | :: | sqg(npart) |
Wrapper function to read the ID necessary to compute the relativistic baryonic mass
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | x | |||
double precision, | intent(in) | :: | y | |||
double precision, | intent(in) | :: | z | |||
double precision, | intent(out) | :: | sqdetg | |||
double precision, | intent(out) | :: | baryon_density | |||
double precision, | intent(out) | :: | gamma_euler |
Wrapper function to integrate the relativistic baryonic mass density
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in), | DIMENSION(3) | :: | center |
Center of the star |
|
double precision, | intent(in) | :: | radius |
Radius of the star |
||
double precision, | intent(in) | :: | central_density |
Central density of the star |
||
double precision, | intent(in) | :: | dr |
Integration steps |
||
double precision, | intent(in) | :: | dth |
Integration steps |
||
double precision, | intent(in) | :: | dphi |
Integration steps |
||
double precision, | intent(inout) | :: | mass |
Integrated mass of the star |
||
double precision, | intent(out), | DIMENSION(3,0:NINT(radius/dr)) | :: | mass_profile |
Array storing the radial mass profile of the star |
|
integer, | intent(out), | DIMENSION(0:NINT(radius/dr)) | :: | mass_profile_idx |
Array to store the indices for array mass_profile, sorted so that mass_profile[mass_profile_idx] is in increasing order INTEGER, DIMENSION(:), ALLOCATABLE, INTENT(INOUT):: mass_profile_idx |
|
double precision, | intent(in), | optional, | DIMENSION(2) | :: | radii | |
type(surface), | intent(in), | optional | :: | surf |
Surface of the matter object |
Place particles on ellipsoidal surfaces, and reflect particles with respect to the yz plane in the case of equal-mass binaries
FT 24.10.2022
Place particles on lattices, one per matter object, and reflect particles with respect to the yz plane in the case of equal-mass binaries
FT 24.10.2022
Read particles from formatted file, and reflect particles with respect to the yz plane in the case of equal-mass binaries
FT 21.10.2022
Read the parameters in the file sphincs_id_particles.dat
FT 2022
Reflect particles of star 1 with respect to the plane and place them on star 2
FT 07.02.2022
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in), | DIMENSION(:,:) | :: | pos_star1 |
Array where to store the particle positions for star 1 |
|
double precision, | intent(in), | DIMENSION(:) | :: | pvol_star1 |
Array where to store the particle volumes for star 1 |
|
double precision, | intent(in), | DIMENSION(:) | :: | nu_star1 |
Array where to store the particle baryon number for star 1 |
|
double precision, | intent(in), | DIMENSION(:) | :: | h_star1 |
Array where to store the particle smoothing lengths for star 1 |
|
integer, | intent(in) | :: | npart_star1 |
Variable where to store the particle number for star 1 |
||
double precision, | intent(inout), | DIMENSION(:,:), ALLOCATABLE | :: | pos_star2 |
Array where to store the particle positions for star 2 |
|
double precision, | intent(inout), | DIMENSION(:), ALLOCATABLE | :: | pvol_star2 |
Array where to store the particle volumes for star 2 |
|
double precision, | intent(inout), | DIMENSION(:), ALLOCATABLE | :: | nu_star2 |
Array where to store the particle baryon number for star 2 |
|
double precision, | intent(inout), | DIMENSION(:), ALLOCATABLE | :: | h_star2 |
Array where to store the particle smoothing lengths for star 2 |
|
integer, | intent(inout) | :: | npart_star2 |
Variable where to store the particle number for star 2 |