Skip to content

Commit

Permalink
Updated ray model so that the longest ray is set to the truncation ra…
Browse files Browse the repository at this point in the history
…dius
  • Loading branch information
daminton committed Apr 25, 2024
1 parent 156518f commit 0bdaa68
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/ray-generation-test-environment/ctem.in
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Kd1 0.00312669649143281
psi 2.000
fe 10.0
dorays T
ejecta_truncation 10.0
ejecta_truncation 50.0

! Testing input. These are used to perform non-Monte Carlo tests.
testflag T ! Set to T to create a single crater with user-defined impactor properties
Expand Down
5 changes: 2 additions & 3 deletions src/ejecta/ejecta_emplace.f90
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,8 @@ subroutine ejecta_emplace(user,surf,crater,domain,ejb,ejtble,deltaMtot,cumulativ
real(DP) :: l1


rray = (11.95_DP*(crater%frad/1000)**1.32)/(crater%frad/1000)
l1 = (5.32_DP*(crater%frad/1000)**1.27)/(crater%frad/1000)

rray = user%ejecta_truncation

! Executable code

Expand Down Expand Up @@ -179,7 +178,7 @@ subroutine ejecta_emplace(user,surf,crater,domain,ejb,ejtble,deltaMtot,cumulativ
if (inc >= user%gridsize / 2) then
if (user%testflag) then
write(*,*) 'Big ejecta: fcrat =',crater%fcrat, ' Ej/S =',(crater%ejdispx*user%pix)/domain%side, ' Ejrim =', crater%ejrim
write(*,*) 'L16 = ', rray, 'L1 = ', l1
write(*,*) 'Rray = ', rray, 'L1 = ', l1
else
write(message,'("Ejb: Dc=",ES9.2," Ej/S=",F0.3)') crater%fcrat,(crater%ejdispx*user%pix)/domain%side
call io_updatePbar(message)
Expand Down
1 change: 0 additions & 1 deletion src/ejecta/ejecta_ray_pattern.f90
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ subroutine ejecta_ray_pattern(user,surf,crater,inc,xi,xf,yi,yf,rray,Nraymax,fpea
xbar = xp - crater%xl
ybar = yp - crater%yl

!areafrac = util_area_intersection(user%ejecta_truncation * crater%frad,xbar,ybar,user%pix)
areafrac = util_area_intersection(rray * crater%frad,xbar,ybar,user%pix)
r = sqrt(xbar**2 + ybar**2) / crater%frad
theta = mod(atan2(ybar,xbar) + pi + rn * 2 * pi,2 * pi)
Expand Down

0 comments on commit 0bdaa68

Please sign in to comment.