Please wait...
×

Error

Posted Mon, 09 Oct 2023 02:50:37 GMT by salman sharifazari UNSW
Hi everyone, I'm trying to write an IFM plugin to make the hydraulic head boundary of my model time-dependent based on sea level data. My python code to this does not work. Although it runs the program and gets the value of boundary condition at each time step for the selected nodes, it doesn't change the boundary condition. I use the doc.setParamValue() function to change the boundaries and I tried both preTimeStep and postTimeStep callbacks. I wonder if anyone can help with this or if there is any other way to introduce the time-dependent hydraulic head boundary condition to a feflow model. With many thanks, Salman
Posted Tue, 10 Oct 2023 11:22:59 GMT by Carlos Andres Rivera Villarreyes Global Product Specialist - FEFLOW
Hi Salman, You may want to take a look on our free self-paced course "FEFLOW – Getting started with FEFLOW Python Interface", where exactly this task is explained through a working example. Registration link is below: https://www.theacademybydhi.com/course-sessions/feflow---getting-started-with-feflow-python-interface-11600061-104 Cheers Carlos Rivera
Posted Sun, 15 Oct 2023 00:10:43 GMT by salman sharifazari UNSW
Hi Carlos, Thank you for your reply. I'd been through the course and completed it. However, what I need is to take control the boundary conditions during the transient simulation time. Based on the course examples, I could change the boundaries for the beginning (t=0) of the simulation. For my case and at each time step, I need to check if I reached the time for which I have new sea level measurements or not. If yes, I should compare the elevation of my boundary nodes to the new measurements and if it is below sea level, I have to change my hydraulic head boundaries for that time step onwards up to the next sea level measurement time. I'd appreciate it if you could give some direct hints for this case. Is there a specific callback function to do this or should I write the function in a specific way? Cheers, Salman
Posted Thu, 19 Oct 2023 00:02:10 GMT by salman sharifazari UNSW
Hi again Carlos, I'd really appreciate it if you could answer my question. Using the piece of code I attached to this reply I can change the boundary condition. But it only works for first time step and then it crashes. I've searched a lot for this and tried to resolve it with no success. Here is the exact error I get after running the code: " Windows fatal exception: access violation Thread 0xWindows fatal exception: access violation00003a1c (most recent call first): Windows fatal exception: access violation   File "C:\ProgramData\anaconda3\Lib\site-packages\zmq\utils\garbage.py", line 47 in run   File "C:\ProgramData\anaconda3\Lib\threading.py"Windows fatal exception: access violation, line  1038 in _bootstrap_inner   File "C:\ProgramData\anaconda3\Lib\threading.py", line 995 in _bootstrap Main thread: Thread 0x00005594 (most recent call first):   File "c:\users\z5288539\onedrive - unsw\documents\phd\06-modelling\rottnest island gw modeling\feflow model\femdata\firsttry.py", line 40 in   File "C:\ProgramData\anaconda3\Lib\site-packages\spyder_kernels\py3compat.py", line 356 in compat_exec   File "C:\ProgramData\anaconda3\Lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 473 in exec_code   File "C:\ProgramData\anaconda3\Lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 615 in _exec_file   File "C:\ProgramData\anaconda3\Lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 528 in runfile   File "C:\Users\z5288539\AppData\Local\Temp\ipykernel_26108\3130878243.py", line 1 in Main thread: Thread 0x00005594 (most recent call first):   File "c:\users\z5288539\onedrive - unsw\documents\phd\06-modelling\rottnest island gw modeling\feflow model\femdata\firsttry.py", line 40 in   File "C:\ProgramData\anaconda3\Lib\site-packages\spyder_kernels\py3compat.py", line 356 in compat_exec   File "C:\ProgramData\anaconda3\Lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 473 in exec_code   File "C:\ProgramData\anaconda3\Lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 615 in _exec_file   File "C:\ProgramData\anaconda3\Lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 528 in runfile   File "C:\Users\z5288539\AppData\Local\Temp\ipykernel_26108\3130878243.py", line 1 in Restarting kernel..."  
Posted Wed, 18 Dec 2024 15:01:12 GMT by Cédric Schmidt
Hi, I wonder if this request was solved. I'm trying to do something similar for a co-simulation project. I want to modify BC conditions for wells during simulation via the preStep callback or by running the simulation step by step using runTo(day) --> change the BC --> run again. Can someone advise on the best way to achieve this? Thanks,

You must be signed in to post in this forum.