Search code examples
oceanpetrel

How to generate a surface from other surfaces in Petrel


I have a task to create a new surface in Petrel. I am supposed to generate the average of two surfaces and create a new surface from it (like a mid surface) using Ocean for Petrel software.

Is this possible? and where do i start from? I would also appreciate links to resources that would be helpful to me.


Solution

  • Seslie,

    You can create surface from Collection be calling method CreateRegularHeightFieldSurface(string name, SpatialLatticeInfo lattice);

    To create property as RegularHeightFieldSurface.CreateProperty(Template template);

    Then you can access to nodes of surface and property by I and J indexes. X and Y for surface will be generated automatically from lattice.

    Point2[]  world = …
    var surf = c.CreateRegularHeightFieldSurface(name, oldSurf.SpatialLattice, PetrelProject.PrimaryProject.CoordinateReferenceSystem));
    SurfaceProperty prop = surf.CreateProperty(PetrelProject.WellKnownTemplates.PetrophysicalGroup.Pressure);
    prop.Name = " Pressure ";
    var sizeIj = surf.SpatialLattice.OriginalLattice.Arrays.SizeIJ;
    for (int i = 0; i < sizeIj.I; i++)
    {
        for (int j = 0; j < sizeIj.J; j++)
        {
            surf[i, j] = …;
            prop[i, j] = …;
        }
    }