Comments (9)
Dear colleague,
when raising an issue, there is a template that should be filled describing some background, what you did, what you expected and what actually happened. You are copying your code (not even into the part where it should go) along with chinese symbols, no images, but an error message that is clear: You do not have a region with marker 1.
from gimli.
You should use only one call of mt.createWorld()
. There you can specify layers by the layers
argument, see
https://www.pygimli.org/pygimliapi/_generated/pygimli.meshtools.html#pygimli.meshtools.createWorld
and the below linked examples (mostly 2D) using this function.
from gimli.
"Sorry, my explanation was not very clear."
"I want to generate a 3D layered model and set an anomaly in it to depict the vertical membrane structures in a landfill. During inversion, I want to keep the resistivity of the background model constant and only invert the central vertical membrane area. However, I'm not sure how to set up the 3D layered model, as it seems the 'layer' parameter can't be used in three dimensions. I'm encountering the following error messages in my code."
from gimli.
Have you tried mt.createWorld(start=[-10, -10, -40], end=[140, 10, 0], layers=[-10, -30])
?
Note that you will need a much larger mesh for accurate simulations.
from gimli.
"It displays an error like this,"
from gimli.
Yes, I am sorry, obviously this feature does not exist yet. I would suggest the following:
- creating a world as written but without layers (marker 1)
- adding a cube as a middle layer (marker 2)
- setting a region marker (marker 3) into the first layer
from gimli.
from pygimli.physics import ert
import pygimli as pg
import numpy as np
import matplotlib.pyplot as plt
import pygimli.meshtools as mt
world=mt.createWorld(start=[-10, -10,-40], end=[140, 10,0],worldMarker=True,marker=1)
cube3=mt.createCube(size=[128, 0.4, 40], pos=[128/2, 0, -40/2],marker=4)
start_model = world +cube3
pg.show(start_model,alpha=0.3,markers=True)
filename = "cc.shm"
shm = pg.DataContainerERT(filename)
data=ert.load(filename)
data['k']=ert.geometricFactors(data)
data['rhoa']=data['k']*data['u']/data['i']*1000
data.remove(data['rhoa']<0)
data['err'] = ert.estimateError(data,relativeError=0.02)
for s in shm.sensors():
start_model.createNode(s)
for s in shm.sensorPositions():
start_model.createNode(s - [0,0,1e-2/2])
inversion_mesh= mt.createMesh(start_model,quality=1.4)
pg.show(inversion_mesh, markers=True, showMesh=True)
mgr=ert.ERTManager()
mgr.setData(data)
mgr.setMesh(inversion_mesh)
mgr.inv.setRegularization(1, background=True)
mgr.inv.setRegularization(1,fix=200)
mgr.inv.setRegularization(2,startModel=1e4,limits=[100,1e4+20])
mgr.invert(lam=10,zWeight=0.1,verbose=True)
mgr.saveResult()
mgr.showMisfit()
I have created a model that includes an anomaly. In the inversion process, I want to constrain the resistivity of the background to remain constant, optimizing only the resistivity of the anomalous cube. Now, I want to change the uniform background model to a layered model, assigning different resistivities to each layer, and similarly constrain the resistivities of the layered background to remain unchanged during inversion
When I haven't established a layered structure, my forward modeling mesh is correct, as shown below
However, when I try to use a layered model, there is a problem with establishing the mesh; the mesh is not divided correctly
from gimli.
from gimli.
Please paste code and messages as text instead of screenshots.
In your case the layers (cubes) intersect with the vertical sheet. Whereas such things are automatically resolved in 2D, in 3D this needs to be solved by splitting every cube into two, one on either side of the sheet.
from gimli.
Related Issues (20)
- Exporting ERT data to RES2DINV format HOT 2
- cross-hole forward question HOT 12
- createworld 3D model layering HOT 4
- Challenges with ERT field data import - question HOT 10
- Simulate called with wrong resistivity array. HOT 9
- Problem Export Model ERT Inversion HOT 4
- Extended Model for Resistivity in Pygimli HOT 7
- ERTManager invert is zeroing the z (terrain) data in the input data container - issue HOT 4
- Removing columns for ERT data HOT 2
- Issue on importing the Res2dinv export module HOT 8
- question: How can we get the constraint matrix 'C' in inversion and which the inverse subproblem is used? HOT 5
- Reference of zWeight HOT 12
- Trying to generate synthetic data with custom mesh HOT 4
- Questions regarding the Res2dInv export format HOT 1
- Issue in the TDEM LCI Inversion HOT 2
- Problem with showing markers HOT 2
- Problem With ERT Sensor in Slope Model HOT 4
- Shared colorbar HOT 1
- Finite Element in ERT HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gimli.