User Forum of Software BASEMENT

BASEMENT
Basic Simulation Environment for computation of environmental flow and natural hazard simulation
Laboratory of Hydraulics, Hydrology and Glaciology (VAW)
ETH Zurich
Basement_Logo

You are not logged in.

#1 2025-11-11 12:17:24

Matteo Facchini
Developer
From: Trento
Registered: 2014-09-05
Posts: 297

flood tracking and re-run

Dear BASE-Team,
I have a question concerning the rerun of simulations: I use it to insert a wall_internal at a certain time step. The idea is to have a cross-section where an obstacle is "active" from a certain time step on, e.g. a bridge that at a certain point is obstructed. To do this I have to re-run also the setup, otherwise basement does not account for the wall_internal condition.

My point is: if I do the following (under windows, but the same applies to ubuntu, I guess)

"C:\Program Files\BASEMENT 4.2.0\bin\BMv4_BASEHPC_setup.exe" -f model.json -o run.h5
"C:\Program Files\BASEMENT 4.2.0\bin\BMv4_BASEHPC_cudaC_single.exe" -f simulation.json -r run.h5 -o results.h5 -p
"C:\Program Files\BASEMENT 4.2.0\bin\BMv4_BASEHPC_setup.exe" -f model2nd.json -o run2.h5
"C:\Program Files\BASEMENT 4.2.0\bin\BMv4_BASEHPC_cudaC_single.exe" -f simulation2nd.json -r run2.h5 -o results.h5 -p
"C:\Program Files\BASEMENT 4.2.0\bin\BMv4_BASEHPC_results.exe" -f results.json -r results.h5 -o output

where simulation.json has "start"=0 and "end"=t*, while simulation2nd.json has "start"=t* and "end"=t_end, will the flood_tracking consider all the time steps, also the ones of the first part of the simulation? Or will it just reset and consider the time step from the second part? To me, it could be the second option, since the flood tracking module seems to be updated on a step-by-step basis.

Offline

#2 2025-11-11 12:40:20

Lukas Vonwiller
Developer
Registered: 2014-09-04
Posts: 156

Re: flood tracking and re-run

Hi Matteo

Note that you run the setup again (modified parameters in the command file model2nd.json). Therefore it will be a restart (not re-run) using initial conditions from the first run. Since the flood_tracking is a result, I am quite sure that it will not be considered in the second (restart) simulation. But you could do a post-processing taking the max FloodVar of both simulations (in the results.h5: RESULTS/CellsAll/FloodVar/0000000).

Hope this helps!
Cheers, Lukas

Offline

#3 2025-11-11 16:16:26

Matteo Facchini
Developer
From: Trento
Registered: 2014-09-05
Posts: 297

Re: flood tracking and re-run

Hey Lukas,
thanks.
Yes, you're right: it's a restart.
However, since the results.h5 file is the same it behaves like a re-run somehow, thus I do not have 2 results, and I cannot take the max FloodVar of both simulations.
But since the first part of the simulation is a repetition of other scenarios that I have (basically my initial simulation with no obstructions), I guess I am taking into account every possibility.

Thanks for the hint, however!

Best
Matteo

Offline

#4 2025-11-11 16:31:16

Lukas Vonwiller
Developer
Registered: 2014-09-04
Posts: 156

Re: flood tracking and re-run

Hi Matteo

You don't have to 2 results because you overwrite the first one. How about replacing the second last line to

"C:\Program Files\BASEMENT 4.2.0\bin\BMv4_BASEHPC_cudaC_single.exe" -f simulation2nd.json -r run2.h5 -o results2.h5 -p

Now you could take the max FloodVar of both simulations (results.h5 and results2.h5)

Best, Lukas

Offline

#5 2025-11-13 12:57:00

Matteo Facchini
Developer
From: Trento
Registered: 2014-09-05
Posts: 297

Re: flood tracking and re-run

yes ant that's made on purpose to visualize and post process the results, e.g. the water depth, all in the same file

Offline

#6 2025-11-14 10:04:54

Lukas Vonwiller
Developer
Registered: 2014-09-04
Posts: 156

Re: flood tracking and re-run

Does the second simulation not overwrite the output file results.h5 from the first simulation completely?

Offline

#7 2025-11-14 12:48:01

Matteo Facchini
Developer
From: Trento
Registered: 2014-09-05
Posts: 297

Re: flood tracking and re-run

Nope, it just adds the new ones to the old ones!

Offline

Board footer

Powered by FluxBB