Skip to content

Implemented GR BH-NS ejecta setup and r-process heating function#74

Draft
sdarbha wants to merge 17 commits into
danieljprice:mainfrom
sdarbha:grbhnsejecta
Draft

Implemented GR BH-NS ejecta setup and r-process heating function#74
sdarbha wants to merge 17 commits into
danieljprice:mainfrom
sdarbha:grbhnsejecta

Conversation

@sdarbha
Copy link
Copy Markdown

@sdarbha sdarbha commented Sep 22, 2020

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.

Copy link
Copy Markdown
Owner

@danieljprice danieljprice left a 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.

Comment thread build/Makefile
@@ -272,6 +272,23 @@ ifeq ($(SETUP), grtde)
ANALYSIS=analysis_tde.f90
endif

Copy link
Copy Markdown
Owner

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

Comment thread build/Makefile
#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
Copy link
Copy Markdown
Owner

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)

Comment thread src/main/cooling.F90
real, intent(in), optional :: t ! in code units
real, intent(inout) :: dudt

select case (icooling)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

Comment thread src/main/rprocess_heating.f90 Outdated
@@ -0,0 +1,179 @@
!--------------------------------------------------------------------------!
! The Phantom Smoothed Particle Hydrodynamics code, by Daniel Price et al. !
Copy link
Copy Markdown
Owner

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

Copy link
Copy Markdown
Owner

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'

Copy link
Copy Markdown
Owner

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

Comment thread src/utils/analysis_bhnsejecta.f90 Outdated

open(1, file=particle_file_name, action='write', status='replace')

write(1,'(A)',IOSTAT=iostatus) '# Particle data'
Copy link
Copy Markdown
Owner

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

@danieljprice
Copy link
Copy Markdown
Owner

build failures can be checked e.g. with "make testkd" on your own machine, or by looking at the logs for the actions above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants