コード例 #1
0
ファイル: test_ots_velocity.py プロジェクト: oddvarlia/semeio
def test_create(setup_spec):
    spec = setup_spec
    vel = "TEST.segy"
    create_segy_file(vel, spec)
    grid = EclGridGenerator.createRectangular(dims=(2, 2, 2), dV=(100, 100, 100))
    res_surface = OTSResSurface(grid=grid, above=0)

    OTSVelSurface(res_surface, vel)
コード例 #2
0
def test_surface_above(tmpdir):
    grid = EclGridGenerator.createRectangular(dims=(2, 2, 2),
                                              dV=(100, 100, 100),
                                              actnum=[0, 0, 0, 0, 1, 1, 1, 1])

    surface = OTSResSurface(grid=grid, above=10)

    z = np.ones(4) * (100 - 10)
    assert np.all(z == surface.z)
コード例 #3
0
ファイル: test_ots_velocity.py プロジェクト: oddvarlia/semeio
def test_z3d(setup_spec):
    spec = setup_spec
    vel = "TEST.segy"
    int_val = [50, 150]
    create_segy_file(vel, spec, xl=int_val, il=int_val, cdp_x=int_val, cdp_y=int_val)
    grid = EclGridGenerator.createRectangular(dims=(2, 2, 2), dV=(100, 100, 100))
    res_surface = OTSResSurface(grid=grid, above=0)
    ots_s = OTSVelSurface(res_surface, vel)

    assert (4, 2) == ots_s.z3d.shape
コード例 #4
0
def test_res_surface(ots_tmpdir_enter):
    eclcase_dir = ots_tmpdir_enter
    grid_path = os.path.join(eclcase_dir, "NORNE_ATW2013.EGRID")
    grid = EclGrid(grid_path, apply_mapaxes=False)

    rec = OTSResSurface(grid=grid, above=100)

    assert rec.nx == 46
    assert rec.ny == 112

    assert 453210.38 == pytest.approx(np.min(rec.x))
    assert 465445.16 == pytest.approx(np.max(rec.x))

    assert 7316018.5 == pytest.approx(np.min(rec.y))
    assert 7330943.5 == pytest.approx(np.max(rec.y))

    assert 2177.6484 == pytest.approx(np.min(rec.z))
    assert 3389.567 == pytest.approx(np.max(rec.z))
コード例 #5
0
ファイル: ots.py プロジェクト: oddvarlia/semeio
    def __init__(
        self,
        eclbase,
        mapaxes,
        seabed,
        youngs,
        poisson,
        rfactor,
        convention,
        above,
        velocity_model,
    ):
        """
        The OTS class manages the information required to calculate
        overburden timeshift.

        The constructor will look for the Eclipse files INIT, EGRID
        and UNRST based on the input case, if some of the files are
        missing an exception will be raised. It will then instantiate
        a EclSubsidence object will be used to manage the rest of the
        overburden timeshift calculations.
        """
        case = os.path.splitext(eclbase)[0]
        self._init_file = EclFile("%s.INIT" % case)
        self._rst_file = EclFile("%s.UNRST" % case)
        self._grid = EclGrid("%s.EGRID" % case, apply_mapaxes=mapaxes)

        self.subsidence = EclSubsidence(self._grid, self._init_file)

        self._seabed = seabed
        self._youngs_modulus = youngs * 1e9
        self._poisson_ratio = poisson
        self._r_factor = rfactor
        self._convention = convention

        self._surface = res_surface = OTSResSurface(grid=self._grid,
                                                    above=above)
        if velocity_model is not None:
            self._surface = OTSVelSurface(res_surface=res_surface,
                                          vcube=velocity_model)

        self._restart_views = {}