Skip to content
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

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

sdarbha
Copy link

@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
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.

@@ -272,6 +272,23 @@ ifeq ($(SETUP), grtde)
ANALYSIS=analysis_tde.f90
endif

Copy link
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

#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
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)

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)
Copy link
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

@@ -0,0 +1,179 @@
!--------------------------------------------------------------------------!
! The Phantom Smoothed Particle Hydrodynamics code, by Daniel Price et al. !
Copy link
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
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
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


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

write(1,'(A)',IOSTAT=iostatus) '# Particle data'
Copy link
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
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