Simulation does not run successfully when using the TELAPY module

Hello [name removed]!

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.

[name removed]



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()

[name removed]

Hello [name removed],

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.

[name removed]

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.

1 Like

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, [name removed], 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()

source_6m_userq.cas (10.7 KB)
bc_icm_source_6m.cli (248 KB)

1 Like

Hi

What is the result is you indicate 358 in MAXIMUM NUMBER OF SOURCES instead of 1000?

Hello [name removed],

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

[name removed]