-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented GR BH-NS ejecta setup and r-process heating function #74
base: master
Are you sure you want to change the base?
Conversation
…tup and analysis files for BH-NS tidal ejecta
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall the code looks good. Obviously the build failures in the pipeline will block a merge at the moment but the code all looks fine to me. Thanks for submitting the PR, very helpful to check and review the code here.
@@ -272,6 +272,23 @@ ifeq ($(SETUP), grtde) | |||
ANALYSIS=analysis_tde.f90 | |||
endif | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me, feel free to delete the commented-out lines
#Cori (NERSC machine) | ||
FC= ftn | ||
# FFLAGS= -O3 -inline-factor=500 -mcmodel=medium -shared-intel -warn uninitialized -warn unused -warn truncated_source | ||
FFLAGS= -O3 -inline-factor=500 -shared-intel -warn uninitialized -warn unused -warn truncated_source |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here just use "include Makefile_defaults_ifort" and then include only any lines which differ from the default settings from the ifort compiler (e.g. FC). Please delete the lines which don't change (e.g. DBLFLAG, DEBUGFLAG, ENDIANFLAG etc)
real, intent(in), optional :: Trad, mu_in, K2, kappa ! in cgs!!! | ||
real, intent(in), optional :: t ! in code units | ||
real, intent(inout) :: dudt | ||
|
||
select case (icooling) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
src/main/rprocess_heating.f90
Outdated
@@ -0,0 +1,179 @@ | |||
!--------------------------------------------------------------------------! | |||
! The Phantom Smoothed Particle Hydrodynamics code, by Daniel Price et al. ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this module looks beautiful
@@ -812,6 +826,23 @@ subroutine step_extern_gr(npart,ntypes,dtsph,dtextforce,xyzh,vxyzu,pxyzu,dens,me | |||
|
|||
pxyz = pxyz + hdt*fexti | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this also seems ok, by analogy with the non-relativistic version. However, I think the call here could just be general, i.e. if (icooling > 0). There is no reason why the other cooling prescriptions could not also be used in the relativistic code
|
||
|
||
particle_file_name = trim(dumpfile)//'.dat' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would suggest using open(newunit=iunit) here rather than hardwiring unit 1, just declare iunit as an integer
src/utils/analysis_bhnsejecta.f90
Outdated
|
||
open(1, file=particle_file_name, action='write', status='replace') | ||
|
||
write(1,'(A)',IOSTAT=iostatus) '# Particle data' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
house formatting is no SHOUTING, so "(a)" and "iostat" here
build failures can be checked e.g. with "make testkd" on your own machine, or by looking at the logs for the actions above |
In this branch, I implemented (1) the setup for a BH-NS tidal ejecta in GR and (2) an r-process heating function. The aim of this pull request is to compare the code, not to actually merge the branch.