I encountered an issue while running the official examples of the 1D hydrodynamic model. My version is p8v5r0, and I wrote a script to run test26 and test27 to learn about the setting of the storage area. I didn't change any data or configuration in the examples, but when running test26, I encountered the error: b'CALCUL_MASCARET - REZO - Error with the linear solver DGBSV', and when running test27, I encountered the error: b'CALCUL_MASCARET - REZO - Cross Section # 22 is dry.'. Could you please help me understand what went wrong and what I should do? Below is my script code.
masc = Mascaret()
masc.create_mascaret(iprint=1)
HOMETEL = os.environ.get('HOMETEL')
os.chdir(HOMETEL + '/examples/python3/aaa/Test26')
# Mascaret files:
# - files_name : list of file names needed for the simulation
# - files_type : list of the extension of files (with same index)
# Warning : for listin file the extension is 'listing'
# Mascaret files & import for second instance
files_name = ['rezo.xcas', 'casier', 'geometrie', 'hydrogramme.loi',
'limnigramme.loi', 'output.lis', 'output.opt', 'rezo.cas_rub', 'rezo.liai_rub', 'rezo.cas_lis', 'rezo.liai_lis',
'init.lig']
files_type =
study_files_2 = [files_name, files_type]
# import model 2
masc.import_model(study_files_2[0], study_files_2[1])
# Initialization with init_hydro_from_file
masc.init_hydro_from_file('init.lig')
number_of_time_steps = masc.get('Model.MaxNbTimeStep', 1, 0, 0)
print("Number of time steps in model #1 :", number_of_time_steps)
# Steady state computation with one step
output_freq = 2000
T_init = 0
T_end = output_freq
npoin = masc.get_var_size('Model.X')[0]
X_1 = []
for i in range(npoin):
X_1.append(masc.get('Model.X', i, 1, 0))
long_profiles_Z = []
long_profiles_Q = []
times = []
for i in range(0, number_of_time_steps + 1, output_freq):
Z_profile = []
Q_profile = []
masc.compute(T_init, T_end, 1.)
for j in range(npoin):
Z_profile.append(masc.get('State.Z', j, 1, 0))
Q_profile.append(masc.get('State.Q', j, 1, 0))
T_init = T_end
T_end += output_freq
long_profiles_Z.append(Z_profile)
long_profiles_Q.append(Q_profile)
times.append(i)