FoundrySpatial / streamDepletr

R package for assessing streamflow depletion due to groundwater pumping.
Other
9 stars 3 forks source link

Infinite/zero erfc and exp terms #5

Closed samzipper closed 6 years ago

samzipper commented 6 years ago

Under some combinations of input parameters, erfc terms approach 0 and exp term approach infinity. These are multiplied by each other so theoretically things should cancel out, but the numbers get so large (small) that R can no longer keep track of them.

Have tried converting units of inputs (e.g. [m/d] --> [m/s]) but this does not help because of the structure of the erfc and exp inputs. Currently have a kludge to adjust inputs if this happens until model is stable.

This affects hantush.R and hunt.R

samzipper commented 6 years ago

Trying Rmpfr package to deal with huge numbers - Hunt == Glover in Rathfelder intermittent pumping test. Does Hunt simplify to Glover as stream conductance gets really high?

samzipper commented 6 years ago

Yes; at high stream conductance, Hunt==Glover. Also, at low stream leakance, Hantush==Glover.

This means the Rathfelder (2016) Figure must have some sort of conductance adjustment for Hunt results. Fixed with commit 8ffb430.