[UP] [TOP] [HOME]

Example of calculating user-defined cell properties in the CELLPROP plugin

In this modified version of calculating Clay Smear Potential (CSP), the effect of the clay layers are weighted by their Vshale values to illustrate the method of building a FSP measure using User-defined keywords and the CELLPROP plugin.

NOTE:- This is a non-standard FSP measure and its use is NOT necessarily recommended.


1. Add User-defined keywords

On the User-defined keywords page of WizGen Heavy, type in two new Cell Properties, e.g. binary_shale to be used to define the shale cells of the model and evs1 to be used to define their fractional shale content.



Click on Save at the bottom of the screen to update the TGDATA run file with the TGNEWKEY  which will contain the 2 keywords as shown below:-

TGNEWKEY
'evs1' 1 /
'binary_shale' 1/
/

In the current example, there is no data which can be loaded for these 2 user-defined keywords. Instead, their properties will be calculated in the CELLPROP plugin.


2. Update Fault Seal Potential Variables

On the Fault Seal Potential Variables page of WizGen Heavy, create a new FSP name, e.g. csp_fulljames2.
Set variables to calculate CSP as per Fulljames et al. 1997 and in addition:-

  • Set Equation constant p (evshale) to 1.0.

  • Set Effective vshale to be Based on User property: evs1.

  • Set Shale definition to be Based on user-property: binary_shale.


  • The WizGen Fault Seal Potential Variable page looks like this:-



    Click on Save to add the new CSP measure to the TGFSP string(s) in the TGDATA run file:-

    TGFSP
    'sgr' -1 1 0 1 4 ' ' 1 6 1 ' ' 1 /
    'csp_fulljames2'  0 2 -1 1 3 'binary_shale' 2 2 4 'evs1' 1 /
    /

    where the string is:-
    'name' l m n p  shale_switch  shale_ string  distance_switch  combine_switch  evshale_switch  evshale_string  plunge_correction /


    3. Create a User-defined CELLPROP plugin

    On the User-defined plugins page of WizGen, select the CELLPROP function and input code to calculate values for evs1 and binary_shale from the Net-to-Gross data already included in the model.

    For example, evs1 is set to (1 - NTG) and binary_shale to 1.0 if the NTG is less than 0.5 and to 0.0 if the NTG is more than 0.5.

    Click on Build to compile the plugin and check for any errors.
    If, as in this case, the build is successful, click on Return to code to re-display code, then click on the Save As, File option and save it as e.g. cellprop1.cpp.

    HINT:- The "cell." prefix in front of the Cell Properties (cell.evs1, cell.ntg and cell.binary_shale) is the only permitted prefix in a CELLPROP plugin - see Prefixes for Cell Properties in the section on Prefix and Property options for plugins.



    Click on Save to add the new CELLPROP to the TGPLUGIN string in the TGDATA run file, for example:-

    --<PLUGINS+>
    TGPLUGIN
    'THICK=/home/TGprojects/<project_name>/<project_name>_INPUT/.plugins/<project_name>_THICK.cpp'
    'PERM=/home/TGprojects/<project_name>/<project_name>_INPUT/.plugins/<project_name>_PERM.cpp'
    `CELLPROP=//home/TGprojects/<project_name>/<project_name>_INPUT/.plugins/<project_name>_CELLPROP.cpp'
    /
    --<PLUGINS->


    4. Check the PERM plugin

    Check the PERM plugin is set correctly and if necessary edit and re-build.
    In the current example, the vertex permeability is set to the harmonic average of the two grid-block permeabilities unless the calculated value for the newly created FSP measure (i.e. csp_fulljames2) is either greater than 0.5 or is an undefined_value in which cases the permeability is set to zero.




    5. Run ViewGen

    Click on ViewGen to run the model with the new Vshale-weighted CSP measure.

    HINT:- If the model run fails for any reason, click on the Goto... button for Inspect the log generated by last TransGen calculation on the WizGen Contents page to see the error message(s).



    [UP] [TOP] [HOME]