Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marker in the Model is not readable in the final result #752

Closed
tonapawilliam opened this issue Jul 18, 2024 · 2 comments
Closed

Marker in the Model is not readable in the final result #752

tonapawilliam opened this issue Jul 18, 2024 · 2 comments
Assignees

Comments

@tonapawilliam
Copy link

Excuse me sir, when I want to create a fault model with several broken layers, why is the model that I marked with F with markers 2 - 5 not readable in the final result? Why does it merge with the World model?

import pygimli as pg
import pygimli.meshtools as mt
from pygimli.physics import ert
from pygimli.physics.ert.importData import importAsciiColumns 
from pygimli.physics.ert.importData import importRes2dInv
import numpy as np
import matplotlib.pyplot as plt
world  = mt.createWorld(start = [0, 0], end = [100, -20], layers = None)
F = mt.createPolygon(([(25,-20),(0,-20), (0,-3),(25, -3)]), 
                     isClosed=True, interpolate = 'linear', marker =1)
F2 = mt.createPolygon(([(50,-20), (25,-20),(25,-8) ,(50, -8)]), 
                     isClosed=True, interpolate = 'linear', marker =2)
F3 = mt.createPolygon(([(75,-20), (50,-20),(50,-6) ,(75, -6)]), 
                     isClosed=True, interpolate = 'linear', marker =3)
F4 = mt.createPolygon(([(100,-20), (75,-20),(75,-2) ,(100, -2)]), 
                     isClosed=True, interpolate = 'linear', marker =4)
P = mt.createPolygon(([(25,-20),(0,-20), (0,-5),(25, -5)]), 
                     isClosed=True, interpolate = 'linear', marker =5)
P2 = mt.createPolygon(([(50,-20), (25,-20),(25,-10) ,(50, -10)]), 
                     isClosed=True, interpolate = 'linear', marker =6)
P3 = mt.createPolygon(([(75,-20), (50,-20),(50,-8) ,(75, -8)]), 
                     isClosed=True, interpolate = 'linear', marker =7)
P4 = mt.createPolygon(([(100,-20), (75,-20),(75,-4) ,(100, -4)]), 
                     isClosed=True, interpolate = 'linear', marker =8)
model = world + F + F2 +F3 +F4 + P + P2 + P3 + P4
mesh = mt.createMesh(model, quality = 32, area = 0.1, verbose = True)
rhomap = [[0, 200],
          [1, 100], 
          [2, 100],
          [3, 100],
          [4, 100],
          [5, 300],
          [6, 300],
          [7, 300],
          [8, 300]]
pg.show(model)
pg.show(mesh, data = rhomap)

Figure_1
You can see, I have given markers to each pattern I created but the object is merged and read as marker 0.

@halbmy
Copy link
Contributor

halbmy commented Jul 22, 2024

The blocks are overlapping, as already seen on pg.show(P+F), and the region marker falls in the overlapping region. If you want F to sit on top of P, you should set its lower boundary to -5:

F = mt.createPolygon(([(25,-5),(0,-5), (0,-3),(25, -3)]),
                     isClosed=True, interpolate = 'linear', marker =1)
P = mt.createPolygon(([(25,-20),(0,-20), (0,-5),(25, -5)]),
                     isClosed=True, interpolate = 'linear', marker =5)
pg.show(F+P);

Note that mt.createRectangle is much easier to use and better suited here, but of course the mt.createPolygon allows for slopes.

@halbmy halbmy self-assigned this Jul 22, 2024
@tonapawilliam
Copy link
Author

Thank You Sir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants