[UP]
[TOP]
[HOME]
Defining Two-phase flow plugins
Having selected the
Plugin option to calculate one or more
Two phase flow - Fault Rock Properties,
click on
Yes in the
Edit plugins? Pop-up window to return to the
User-defined plugins page (as shown below) to view/edit the default plugin(s).
HINT:- The default plugin for a particular fault-rock property uses the equation and constants as currently defined on the Two phase flow - FAULT ROCK PROPERTIES page of WizGen.

A new two-phase plugin is automatically added to the plugins page for each relationship specified. The following Two-phase plugin functions are dynamically added and removed from the drop-down list of
Functions available on the
User-defined plugin page and are used to generate plugin filenames (where required):-
PORO_FR - for calculating fault rock porosity
SWOR - for calculating water saturation at irreducible oil
SWC - for calculating irreducible (connate) water saturation
PC_D - for calculating the drainage Capillary Pressure curve
PC_I - for calculating the imbibition Capillary Pressure curve
KRW_D - for calculating the drainage water relative permeability curve
KRW_I - for calculating the imbibition water relative permeability curve
KRO_D - for calculating the drainage oil relative permeability curve
KRO_I - for calculating the imbibition oil relative permeability curve
For example, if Fault Porosity and Capillary Pressure are set to be calculated via
Plugins (rather than by the default
Equations) on the
Two phase flow - FAULT ROCK PROPERTIES page,
PORO_FR and
PC_D are added to the
Function list on the
User-defined plugins page of WizGen.

Initially the Two phase flow plugin is derived from the default equation and constant values in use immediately before the relationship was changed to be represented by a plugin. The new plugin is automatically written to a new file and the name of the file is linked to the plugin function. In effect, the invisible plugin that contained the equation code is copied to a new file and becomes editable by the user.
A two-phase plugin can be edited, built and saved like any other plugin. Also, like any other plugin, they can be loaded from the user's library of plugins.
The 2Phase drop-down list below the code window contains the names of the 3 variables which can be used within a two-phase plugin. These are:-
se (effective water saturation)
poro (fault porosity)
perm (fault permeability)
NOTE:- Two-phase plugins do not use variable prefixes.

At present, no other user or system-defined cell or fault properties can be used within two-phase plugins and the drop-down lists containing the names of these variables are greyed-out.
NOTE:- The other, very important, difference between a two-phase plugin and other plugin types is that a two-phase plugin
returns the result of the plugin calculation. The value calculated by the plugin for, say,
fault rock porosity must be sent back to the software using the `
return' statement followed by the value and a semi-colon. The property a two-phase plugin calculates can be based on the values of
se,
poro and/or
perm sent into the plugin by the software, but the property is sent back to the software via the last line of the plugin - the `return' statement.
It may be useful to always use the variable name
result to store the value of the calculated property. The name
result has no special meaning but it could be used to create a template for all two-phase plugins
e.g.
// my two-phase plugin
double result;
.
.
result = ...
return result;
A two-phase plugin is removed from the project by reselecting an equation to represent the particular fault property relationship on the
Two phase flow -FAULT ROCK PROPERTIES page of WizGen. The most recent constants associated with the equation are recalled and the text input fields become sensitive. If a constant was deleted, the default value is used.
If a two-phase plugin is removed using the
Remove,
File option on the
User-defined plugins page, a dialog box appears offering to transfer to the two-phase fault rock properties page so the relationship can be altered to equation (as shown below).

[UP]
[TOP]
[HOME]