Convert a decline rate between nominal and effective
Turn a 15 %/yr nominal decline into its effective-annual, monthly and daily equivalents: the bookkeeping every forecast does before it starts.
A nominal decline is the continuous rate in the exponential q = qi·e^(−D·t); an effective one is the fraction lost over a period, 1 − q(t+1)/q(t). Reserves reports usually quote effective annual declines, while the Arps equations take nominal ones, so a forecast converts first.
The monthly and daily conversions keep the convention of what they are given: an effective annual decline converts to an effective monthly one. Convert to nominal before handing a rate to ArpsHyperbolicDecline.
Source
using Team76.Engineering.DCA.Utilities;
public class S : ICalcScript
{
public ScriptResult Run(ICalcContext ctx)
{
// A 15 %/yr nominal (continuous) decline, as the Arps equations take it.
double nominalAnnual = 0.15;
// The fraction lost per year, as a reserves report quotes it.
double effectiveAnnual = DeclineRateConversions.NominalToEffective(nominalAnnual);
// Monthly and daily conversions take an effective decline and give an effective one.
double effectiveMonthly = DeclineRateConversions.AnnualToMonthly(effectiveAnnual);
double effectiveDaily = DeclineRateConversions.AnnualToDaily(effectiveAnnual);
return ctx.Result()
.Set("nominalAnnual", nominalAnnual)
.Set("effectiveAnnual", effectiveAnnual)
.Set("effectiveMonthly", effectiveMonthly)
.Set("effectiveDaily", effectiveDaily);
}
}