|
<< Click to Display Table of Contents >> Navigation: Editing Case Data > Fiscal Models > Cash Formulas > Special PHDwin Functions (Cash Formulas) |
Navigation: Editing Case Data > Fiscal Models > Cash Formulas >
When writing cash formulas, users can grab certain elements and attach one or more 'modifiers' or 'parameters' to them in order to generate the values needed. For example, to grab the depreciation for income tax purposes it might look like: GetDepr(Income Tax, All, Tan, Monthly)
This section lists the special PHDwin functions and formulas. Use these in combination with the standard functions and tokens and modifiers in order to write cash formula models.
Basic syntax for cash formula functions
All functions will require the function name followed by a set of parameters entered in parenthesis (), like this:
Function(Parameters)
Most functions require that all of the parameters listed are included in the parenthesis in order for the function to work. Parameters that are optional are noted.
Purpose Adds a specified amount to a balance pool on a specified date, returns the amount added. Syntax AddBalPool(pool ID, amount, date) Parameters •pool ID - a unique number chosen by the user for the pool. No two pools should have the same number. It is possible to create a static variable and give it that unique number and just reference the static variable name. •amount - the amount that should be added to the pool •date - optional input - the date that the amount is added to the pool. If date is omitted, the amount is added in the current period. Examples AddBalPool(CostRecoveryPool, GetInv(All, Total, Grs, Monthly)) |
Purpose Compares a text input field in PHDwin to see if it is a certain value. Use this function to compare what the current qualifier is. If it is a match, it will return a 1 for true, it returns a zero for false. Syntax Compare(text field, "text string") Parameters •text field - the text input field in PHDwin that you'd like to compare it to. This could be something like Reserve Class, Reservoir, Country, etc. •text string - the string of text that must match the 'text field' to be considered a match. Must be in double quotes(" ").
Examples Compare(Country, "United States") Compare(OwnQual, "Government") |
Purpose Deducts a specified amount from a balance pool in the current period and returns the amount deducted. You cannot deduct a value greater than the pool balance. Syntax DeductBalPool(pool ID, amount) Parameters •pool ID - a unique number chosen by the user for the pool. No two pools should have the same number. It is possible to create a static variable and give it that unique number and just reference the static variable name. •amount - the amount that should be deducted from the pool |
Purpose Returns the energy factor for the specified product. Syntax EnergyFactor(Product[ID]) Parameters •Product - specify the name of the product to use, followed by the modifier [ID] - see examples
Examples EnergyFactor(Gas[ID]) |
Purpose Gets the current balance of the pool. Syntax GetBalPool(pool ID) Parameters •pool ID - a unique number chosen by the user for the pool. No two pools should have the same number. Users can also create a static variable and give it that unique number and just reference the static variable name. Examples GetBalPool(CostRecovery) |
Purpose Gathers the depreciated values of investments for the chosen purpose. Depreciation categories for each purpose are set up in the database settings. Syntax GetDepr("depr purpose", "inv category", tangibility, interest, timing, scope) Parameters •depr purpose - the depreciation purpose that you'd like to gather depreciation values for. There is no All purpose; each purpose must be specifically entered. Must be in double quotes (). •inv category - the investment category of investments you want to gather. You can choose from any investment category in the database or also use "All" for all investments. Must be in double quotes("). •tangibility - choose from: otan - tangible amount ointan - intangible amount ototal - combined tangible and intangible •interest - choose from: ogrs - the gross, 8/8ths value of the investment, as entered oWI - the working interest value of the investment, regardless of custom interest oNet - the net value of the investment •timing - choose from: oAnnual - the value for current year. The value will be presented on the first month of the fiscal year and will not repeat. oCum - the cumulative value up until the current date. oECLRem - the remaining value from the current date until the economic limit. oMonthly - the value for the current month. oPrior - the value from the prior month. oPrior12 - the value for the prior 12 months from the current month - not necessarily the calendar year. oQuarterly - the value for the current quarter. The value will be presented on the first month of the quarter and will not repeat. oStartToECL - the value from the case start date to the economic limit. oTechEUR - the value from the case start date up until the technical EUR. oTechRem - the remaining value from the current date until the technical EUR. •scope - optional input - you can enter "child" to gather investments from child cases
Examples GetDepr(Income Tax, Completion, Total, Net, Monthly) |
Purpose Gathers the expensed values of investments for the chosen purpose. Depreciation categories(or which investments should be expensed) for each purpose are set up in the database settings. Syntax GetExpensed("depr purpose", "inv category", tangibility, interest, timing, scope) Parameters •depr purpose - the depreciation purpose that you'd like to gather depreciation values for. There is no All purpose; each purpose must be specifically entered. Must be in double quotes (). •inv category - the investment category of investments you want to gather. You can choose from any investment category in the database or also use "All" for all investments. Must be in double quotes("). •tangibility - choose from: otan - tangible amount ointan - intangible amount ototal - combined tangible and intangible •interest - choose from: ogrs - the gross, 8/8ths value of the investment, as entered oWI - the working interest value of the investment, regardless of custom interest oNet - the net value of the investment •timing - choose from: oAnnual - the value for current year. The value will be presented on the first month of the fiscal year and will not repeat. oCum - the cumulative value up until the current date. oECLRem - the remaining value from the current date until the economic limit. oMonthly - the value for the current month. oPrior - the value from the prior month. oPrior12 - the value for the prior 12 months from the current month - not necessarily the calendar year. oQuarterly - the value for the current quarter. The value will be presented on the first month of the quarter and will not repeat. oStartToECL - the value from the case start date to the economic limit. oTechEUR - the value from the case start date up until the technical EUR. oTechRem - the remaining value from the current date until the technical EUR. •scope - optional input - you can enter "child" to gather investments from child cases
Examples GetExpensed(Cost Recovery, All, Intan, WI, Annual) GetExpensed(Income Tax, Abandonment, Intan, Grs, Annual, Child) |
Purpose Gathers investment values. Syntax GetInv("inv category", tangibility, interest, timing, scope) Parameters •inv category - the investment category of investments you want to gather. You can choose from any investment category in the database or also use "All" for all investments. Must be in double quotes("). •tangibility - choose from: otan - tangible amount ointan - intangible amount ototal - combined tangible and intangible •interest - choose from: ogrs - the gross, 8/8ths value of the investment, as entered oWI - the working interest value of the investment, regardless of custom interest oNet - the net value of the investment •timing - choose from: oAnnual - the value for current year. The value will be presented on the first month of the fiscal year and will not repeat. oCum - the cumulative value up until the current date. oECLRem - the remaining value from the current date until the economic limit. oMonthly - the value for the current month. oPrior - the value from the prior month. oPrior12 - the value for the prior 12 months from the current month - not necessarily the calendar year. oQuarterly - the value for the current quarter. The value will be presented on the first month of the quarter and will not repeat. oStartToECL - the value from the case start date to the economic limit. oTechEUR - the value from the case start date up until the technical EUR. oTechRem - the remaining value from the current date until the technical EUR. •scope - optional input - you can enter "child" to gather investments from child cases
Examples GetInv(Completion, Total, Net, Monthly) GetInv(All, Tan, WI, Annual) GetInv(Abandonment, Intan, Grs, Annual, Child) |
Purpose Returns the start date of the the specified segment. Syntax MajSeg(Segment number) Parameters •Segment number -The number for the segment whose start date is desired. Examples •MajSeg(1) •If(CurrentDate>MajSeg(1), oneResult, anotherResult)
*MinSeg() is an alternate function that retrieves information based on the minor phase. |
Purpose Returns the oil equivalent volume(in BOE) for the product volume that you enter. It will always be a monthly value. Syntax OilEqVol(Product Name[ID], product volume) Parameters •product Name [ID] - specifies the conversion rate to use. Should be the product name with an ID modifier. See examples. •product volume - specifies what volume to convert to BOE.
Examples OilEqVol(Gas[ID], Gas[Monthly, Grs]) OilEqVol(NGL[ID], NGL[Annual]) |
Purpose You can create a set of thresholds and return factors(values) as a sliding scale. This function will return the appropriate factor based on where the input value falls in the sliding scale. Syntax SlidingScaleFactor(sliding scale name, input value) Parameters •sliding scale name - the name of the sliding scale that you created •input value - the input value that you'd like to test to see where it falls in the sliding scale
Examples SlidingScaleFactor(RfactorScale, Rfactor) |
After creating a set of inputs and return values with a 'SlidingScaleName', this function will find the appropriate return value(sliding scale factor) based on the 'InputValue' specified here. It will then multiply the sliding scale factor by the 'Value' to get the SlidingScaleValue. Purpose You can create a set of inputs and return factors(values) as a sliding scale. The function will take the input value, see where it falls in the sliding scale, and multiply the return factor by the input value. Syntax SlidingScaleValue(sliding scale name, input value) Parameters •sliding scale name - the name of the sliding scale that you created •input value - the input value that you'd like to test to see where it falls in the sliding scale
Examples SlidingScaleValue(RfactorScale, Rfactor) |
Purpose You can create a set of thresholds and return factors(values) as a tranche. This function will return the appropriate weighted tranche factor based on where the input value falls in the tranche. Syntax TrancheFactor(tranche name, input value) Parameters •tranche name - the name of the tranche that you created •input value - the input value that you'd like to test to see where it falls in the tranche
Examples TrancheFactor(RoyaltyRateScale, DailyOilRate) |
Purpose You can create a set of inputs and return factors(values) as a tranche. The function will take the input value, see where it falls in the tranche, find the weighted tranche factor, and multiply it by the input value. Syntax TrancheValue(tranche name, input value) Parameters •tranche name - the name of the tranche that you created •input value - the input value that you'd like to test to see where it falls in the tranche
Examples TrancheValue(RoyaltyRateScale, DailyOilRate) |
Functions that require no parameters
You also have access to the following functions which do not require any parameters or modifiers after them. You might use them in combination with the standard functions. For example: •If(Country = United States, 1, 0) - or - •If(CurrentDate>FirstProduction, oneResult, anotherResult)
|
Related topics: