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

Abnormal Head Values in Extended Model Area with Head Line Sink #84

Open
ArtemisRo opened this issue Sep 21, 2023 · 2 comments
Open

Abnormal Head Values in Extended Model Area with Head Line Sink #84

ArtemisRo opened this issue Sep 21, 2023 · 2 comments
Labels

Comments

@ArtemisRo
Copy link

I have created a groundwater model using a Head Line Sink in QGIS-Timml, and I have successfully obtained reasonable head values for each layer within the initial model area. However, when I extend the model area and perform calculations, I am encountering excessively high and unrealistic head values.
Attached is a photo illustrating the issue.
Additionally, I've included the Python script used to define and execute the current model.

verlagingen in grote gebied

Model code to reproduce the error:

import numpy as np
import timml

model = timml.ModelMaq(
    kaq=[6.0, 2.5, 65.0],
    z=[-2.0, -2.0, -4.5, -10.0, -18.0, -19.0, -33.0],
    c=[700.0, 500.0, 50.0],
    topboundary="semi",
    npor=[None, None, None, None, None, None],
    hstar=0.0,
)
Riolering2_0 = timml.HeadLineSinkString(
    xy=[
        [81339.22502708525, 436686.6311739245],
        [81350.79144223033, 436681.7205188097],
        [81389.29293477698, 436681.8738948385],
    ],
    hls=-2.7,
    res=0.001,
    wh=4.0,
    order=7,
    layers=0,
    label=None,
    model=model,
)

model.solve()
head = model.headgrid(
    xg=np.arange(80540.0, 82170.0, 20.0), yg=np.arange(437350.0, 436220.0, -20.0)
)


print('max head: ', head.max())

@mbakker7
Copy link
Owner

I am afraid you found a bug. The line-sink doesn't go nicely to zero at larger distance when the order is large.
Simplified problem:

import timml as tml
ml = tml.ModelMaq(kaq=[6.0], z=[1, 0, -2], c=[700.0], topboundary="semi", hstar=0.0)
ls2 = tml.HeadLineSink(ml, x1=-20, y1=0, x2=20, y2=0, hls=2, order=7)
ml.solve()
ml.contour([-800, 800, -400, 400], ngr=50)

@mbakker7 mbakker7 added the bug label Sep 21, 2023
@dbrakenhoff
Copy link
Collaborator

Hi @ArtemisRo,

Thanks for posting your issue. I contoured the heads after running your script, and near the element, the solution seems pretty reasonable.

xg = np.arange(81_250, 81_475, 5) 
yg = np.arange(436_800, 436_550, -5)
head = model.headgrid(xg=xg, yg=yg)
plt.contour(xg, yg, head[0])
plt.axis("equal")
model.plot(newfig=False)

image

The solution "far away" becomes unstable, resulting in the extremely large heads you're seeing.
image

Lowering the order of the element helps in this case. With order=3:
image

The reason for this I'm not entirely sure about, but we'll look into it!

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

No branches or pull requests

3 participants