From 8d9122cbdfd465a86144c21de352bd4a0801a532 Mon Sep 17 00:00:00 2001 From: Austin Blevins Date: Wed, 22 Feb 2023 17:46:40 -0500 Subject: [PATCH] Reverted back as the changes resulted in a large portion of SPA ejecta at the surface lol --- src/regolith/regolith_streamtube_head.f90 | 12 +++++------ src/regolith/regolith_streamtube_lineseg.f90 | 20 +++++++++---------- src/regolith/regolith_subpixel_streamtube.f90 | 12 +++++------ src/regolith/regolith_traverse_streamtube.f90 | 4 ++-- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/regolith/regolith_streamtube_head.f90 b/src/regolith/regolith_streamtube_head.f90 index 275beced..83cff8df 100644 --- a/src/regolith/regolith_streamtube_head.f90 +++ b/src/regolith/regolith_streamtube_head.f90 @@ -66,9 +66,9 @@ subroutine regolith_streamtube_head(user,surfi,deltar,totmare,tots,age_collector totmare = totmare + vsgly * current(M)%comp recyratio = vsgly / (user%pix**2) /current(M)%thickness age_collector(:) = age_collector(:) + current(M)%age(:) * recyratio - headmeltvol = current(M)%meltfrac * vsgly ! * recyratio + headmeltvol = current(M)%meltfrac * vsgly * recyratio meltinejecta = meltinejecta + headmeltvol - distvol(:) = distvol + (current(M)%meltdist(:)*vsgly) !*recyratio) + distvol(:) = distvol + (current(M)%meltdist(:)*vsgly*recyratio) totvol = totvol + vsgly else ! head is not intersected with layers. @@ -81,9 +81,9 @@ subroutine regolith_streamtube_head(user,surfi,deltar,totmare,tots,age_collector totmarehead = totmarehead + vhead * vratio * current(N)%comp recyratio = vhead * vratio / (user%pix**2) / current(N)%thickness age_collector(:) = age_collector(:) + current(N)%age(:) * recyratio - headmeltvol = current(N)%meltfrac * tothead !* recyratio + headmeltvol = current(N)%meltfrac * tothead * recyratio meltinejecta = meltinejecta + headmeltvol - distvol(:) = distvol + (current(N)%meltdist(:)*tothead) !*recyratio) + distvol(:) = distvol + (current(N)%meltdist(:)*tothead*recyratio) totvol = totvol + tothead !current => current%next !N = N - 1 @@ -95,9 +95,9 @@ subroutine regolith_streamtube_head(user,surfi,deltar,totmare,tots,age_collector tothead = vsgly recyratio = (vsgly - tothead) / (user%pix**2) / current(N)%thickness age_collector(:) = age_collector(:) + current(N)%age(:) * recyratio - headmeltvol = current(N)%meltfrac * tothead !*recyratio) + headmeltvol = current(N)%meltfrac * tothead*recyratio meltinejecta = meltinejecta + headmeltvol - distvol(:) = distvol + (current(N)%meltdist(:)*tothead) !*recyratio) + distvol(:) = distvol + (current(N)%meltdist(:)*tothead*recyratio) totvol = totvol + tothead exit end if diff --git a/src/regolith/regolith_streamtube_lineseg.f90 b/src/regolith/regolith_streamtube_lineseg.f90 index ac66f84b..2c690378 100644 --- a/src/regolith/regolith_streamtube_lineseg.f90 +++ b/src/regolith/regolith_streamtube_lineseg.f90 @@ -84,9 +84,9 @@ subroutine regolith_streamtube_lineseg(user,surfi,thetast,ri,rip1,zmin,zmax,erad recyratio = max(ebh_recyl,0.0_DP) / current(N-1)%thickness age_collector(:) = age_collector(:) + current(N-1)%age(:) * recyratio vol = vol + sum(current(N-1)%age(:)) * recyratio - linmelt = current(N-1)%meltfrac * vsgly! * recyratio + linmelt = current(N-1)%meltfrac * vsgly * recyratio meltinejecta = meltinejecta + linmelt - distvol(:) = distvol(:) + (current(N-1)%meltdist(:)*vsgly)!*recyratio) + distvol(:) = distvol(:) + (current(N-1)%meltdist(:)*vsgly*recyratio) totvol = totvol + vsgly else if (ri <= xmints .and. rip1 > xmints) then vseg = regolith_streamtube_volume_func(eradi,xmints,rip1,deltar) @@ -94,9 +94,9 @@ subroutine regolith_streamtube_lineseg(user,surfi,thetast,ri,rip1,zmin,zmax,erad recyratio = max((vseg-vsh),0.0_DP) / (user%pix**2) / current(N-1)%thickness age_collector(:) = age_collector(:) + current(N-1)%age(:) * recyratio vol = vol + sum(current(N-1)%age(:)) * recyratio - linmelt = current(N-1)%meltfrac * vseg! * recyratio + linmelt = current(N-1)%meltfrac * vseg * recyratio meltinejecta = meltinejecta + linmelt - distvol(:) = distvol(:) + (current(N-1)%meltdist(:)*vseg)!*recyratio) + distvol(:) = distvol(:) + (current(N-1)%meltdist(:)*vseg*recyratio) totvol = totvol + vseg end if exit @@ -124,9 +124,9 @@ subroutine regolith_streamtube_lineseg(user,surfi,thetast,ri,rip1,zmin,zmax,erad recyratio = max((vseg-vsh),0.0_DP) / (user%pix**2) / current(N)%thickness age_collector(:) = age_collector(:) + current(N)%age(:) * recyratio vol = vol + sum(current(N)%age(:)) * recyratio - linmelt = current(N)%meltfrac * vseg! * recyratio + linmelt = current(N)%meltfrac * vseg * recyratio meltinejecta = meltinejecta + linmelt - distvol(:) = distvol(:) + (current(N)%meltdist(:)*vseg)!*recyratio) + distvol(:) = distvol(:) + (current(N)%meltdist(:)*vseg*recyratio) totvol = totvol + vseg end if @@ -137,9 +137,9 @@ subroutine regolith_streamtube_lineseg(user,surfi,thetast,ri,rip1,zmin,zmax,erad recyratio = max((vseg-vsh),0.0_DP) / (user%pix**2) / current(N)%thickness age_collector(:) = age_collector(:) + current(N)%age(:) * recyratio vol = vol + sum(current(N)%age(:)) * recyratio - linmelt = current(N)%meltfrac * vseg! * recyratio + linmelt = current(N)%meltfrac * vseg * recyratio meltinejecta = meltinejecta + linmelt - distvol(:) = distvol(:) + (current(N)%meltdist(:)*vseg)!*recyratio) + distvol(:) = distvol(:) + (current(N)%meltdist(:)*vseg*recyratio) totvol = totvol + vseg end if !current => current%next @@ -162,9 +162,9 @@ subroutine regolith_streamtube_lineseg(user,surfi,thetast,ri,rip1,zmin,zmax,erad recyratio = max((vseg-vsh),0.0_DP) / (user%pix**2) / current(N)%thickness age_collector(:) = age_collector(:) + current(N)%age(:) * recyratio vol = vol + sum(current(N)%age(:)) * recyratio - linmelt = current(N)%meltfrac * vseg! * recyratio + linmelt = current(N)%meltfrac * vseg * recyratio meltinejecta = meltinejecta + linmelt - distvol(:) = distvol(:) + (current(N)%meltdist(:)*vseg)!*recyratio) + distvol(:) = distvol(:) + (current(N)%meltdist(:)*vseg*recyratio) totvol = totvol + vseg end if diff --git a/src/regolith/regolith_subpixel_streamtube.f90 b/src/regolith/regolith_subpixel_streamtube.f90 index 400d3317..3d37d5e1 100644 --- a/src/regolith/regolith_subpixel_streamtube.f90 +++ b/src/regolith/regolith_subpixel_streamtube.f90 @@ -113,8 +113,8 @@ subroutine regolith_subpixel_streamtube(user,surfi,deltar,ri,rip1,eradi,newlayer vseg = regolith_streamtube_volume_func(eradi,xmints,eradi,deltar) vsh = regolith_shock_damage(eradi,deltar,xmints,xsfints,0.0_DP,eradi) recyratio = max(vseg-vsh,0.0 )/ (user%pix**2) / (surfi%regolayer(M)%thickness) - meltinejecta = surfi%regolayer(M)%meltfrac * vseg! * recyratio - distvol = distvol + (surfi%regolayer(M)%meltdist(:)*vseg)!*recyratio) + meltinejecta = surfi%regolayer(M)%meltfrac * vseg * recyratio + distvol = distvol + (surfi%regolayer(M)%meltdist(:)*vseg*recyratio) totvol = vseg age_collector(:) = age_collector(:) + surfi%regolayer(M)%age(:) * recyratio vol = vol + sum(age_collector(:)) @@ -191,7 +191,7 @@ subroutine regolith_subpixel_streamtube(user,surfi,deltar,ri,rip1,eradi,newlayer recyratio = max((vsgly2 -vsh),0.0)/ (user%pix**2) / current(N)%thickness age_collector(:) = age_collector(:) + current(N)%age(:) * recyratio vol = vol + sum(current(N)%age(:)) * recyratio - mvr = vsgly2 * current(N)%meltfrac! * recyratio + mvr = vsgly2 * current(N)%meltfrac * recyratio recyratio2 = recyratio end if @@ -200,13 +200,13 @@ subroutine regolith_subpixel_streamtube(user,surfi,deltar,ri,rip1,eradi,newlayer recyratio = max((vsgly1-vsh),0.0) / (user%pix**2) / current(N)%thickness age_collector(:) = age_collector(:) + current(N)%age(:) * recyratio vol = vol + sum(current(N)%age(:)) * recyratio - mvl = vsgly1 * current(N)%meltfrac! * recyratio + mvl = vsgly1 * current(N)%meltfrac*recyratio end if !current => current%next meltinejecta = meltinejecta + mvl + mvr - !distvol = distvol + (current(N)%meltdist(:)*((vsgly1*recyratio)+(vsgly2*recyratio2))) - distvol = distvol + (current(N)%meltdist(:)*(vsgly1+vsgly2)) + distvol = distvol + (current(N)%meltdist(:)*((vsgly1*recyratio)+(vsgly2*recyratio2))) + !distvol = distvol + (current(N)%meltdist(:)*(vsgly1+vsgly2)) totvol = totvol + vsgly1 + vsgly2 !N = N - 1 z = z + current(N-1)%thickness diff --git a/src/regolith/regolith_traverse_streamtube.f90 b/src/regolith/regolith_traverse_streamtube.f90 index 0308acb5..f8ab86ac 100644 --- a/src/regolith/regolith_traverse_streamtube.f90 +++ b/src/regolith/regolith_traverse_streamtube.f90 @@ -89,8 +89,8 @@ subroutine regolith_traverse_streamtube(user,surfi,deltar,ri,rip1,eradi,erado,ne vsh = regolith_shock_damage(eradi,deltar,xmints,xsfints,ri,rip1) recyratio = max(vseg-vsh,0.0_DP) / (user%pix**2) / surfi%regolayer(N)%thickness age_collector(:) = age_collector(:) + surfi%regolayer(N)%age(:) * recyratio - meltinejecta = meltinejecta + surfi%regolayer(N)%meltfrac * vseg! * recyratio - distvol(:) = distvol(:) + (surfi%regolayer(N)%meltdist(:)*vseg)!*recyratio) + meltinejecta = meltinejecta + surfi%regolayer(N)%meltfrac * vseg*recyratio + distvol(:) = distvol(:) + (surfi%regolayer(N)%meltdist(:)*vseg*recyratio) totvol = totvol + vseg end if