Welcome, Guest
Username: Password: Remember me

TOPIC: Simulation does not run successfully when using the TELAPY module

Simulation does not run successfully when using the TELAPY module 1 year 7 months ago #42659

  • wsy9208
  • wsy9208's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 37
  • Thank you received: 3
Hello everyone!

Recently, I have been attempting to use TELAPY to control TELEMAC2D simulations (v8p4-Linux). I have been able to successfully run the "breach" example provided in the telapy notebooks. However, when I try to run my own case, the simulation does not progress beyond the initialization stage after telapy is successfully initiated (The code is shown in Figure 1). It gets stuck at the position shown in Figure 2. Interestingly, the same case runs smoothly without using telapy (as shown in Figure 3).

I have been unable to identify the source of this issue. I would greatly appreciate any suggestions or advice you can provide.

Kind regards,

WSY
Attachments:
The administrator has disabled public write access.

Simulation does not run successfully when using the TELAPY module 1 year 7 months ago #42671

  • jtravert
  • jtravert's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 36
  • Thank you received: 23
Hello!

Have you tried to run your code with one time-step at a time instead of simulating all the time steps at once with the command you have used?

Is the behavior the same when doing:
for i in range(number_of_time_steps):
    my_case.run_one_time_step()

Best regards,
Jean-Paul
The administrator has disabled public write access.

Simulation does not run successfully when using the TELAPY module 1 year 7 months ago #42672

  • wsy9208
  • wsy9208's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 37
  • Thank you received: 3
Hello Paul,

Thank you for your reply!

I also tried the one time-step simulation, but it showed the same problem. Even the same code applied to the "breach" case works fine, so I'm confused as to why.

Best regards,
WSY
The administrator has disabled public write access.

Simulation does not run successfully when using the TELAPY module 1 year 7 months ago #42673

  • jtravert
  • jtravert's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 36
  • Thank you received: 23
One solution may be not use DEBUGGER=1 in your .cas file to see where the computation is stopping. You can also link your files to run the case (if possible), and I can have a quick look at it.
The administrator has disabled public write access.
The following user(s) said Thank You: wsy9208

Simulation does not run successfully when using the TELAPY module 1 year 7 months ago #42674

  • wsy9208
  • wsy9208's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 37
  • Thank you received: 3
I would be grateful if you could help me check what the problem is. I have attached all my files and my complete code is as follows:
import os
import sys
import numpy as np
from mpi4py import MPI

from telapy.api.t2d import Telemac2d

os.chdir('/opt/data/private/install/telemac/telemac-mascaret-v8p4r0/examples/nanjing/api')
my_case = Telemac2d('source_6m_userq.cas', comm=MPI.COMM_WORLD)
my_case.set_case()
my_case.init_state_default()
number_of_time_steps = my_case.get('MODEL.NTIMESTEPS')
[n_sources, dim2, dim3] = my_case.get_var_size('MODEL.DSCE')
print(number_of_time_steps)
print(n_sources)
my_case.run_all_time_steps()
my_case.finalize()
Attachments:
The administrator has disabled public write access.
The following user(s) said Thank You: jtravert

Simulation does not run successfully when using the TELAPY module 1 year 7 months ago #42675

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3729
  • Thank you received: 1032
Hi
What is the result is you indicate 358 in MAXIMUM NUMBER OF SOURCES instead of 1000?
Christophe
The administrator has disabled public write access.

Simulation does not run successfully when using the TELAPY module 1 year 7 months ago #42676

  • wsy9208
  • wsy9208's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 37
  • Thank you received: 3
Hello coulet,

Thank you for your reply! After I modified the MAXIMUM NUMBER OF SOURCES in the cas file as you suggested, the result showed that the variable n_sources became 358 after initialization but the problem was still not solved

Best regards,
WSY
The administrator has disabled public write access.

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.