Skip to content

hpc-maths/2025_09_two_fluid_all_topology

Repository files navigation

This repository contains a numerical solver for the novel model presented in ``An all-topology two-fluid model for two-phase flows derived through Hamilton's Stationary Action Principle'' (https://hal.science/hal-05249139). The implementation is carried out in the framework of samurai. The spatial discretization is based on the finite volume method using a non-conservative Rusanov flux.

In order to build the executable, please first install samurai folliwing the instructions at https://github.com/hpc-maths/samurai. Then, move into the directory with the test case of interest and run

source configure.sh

Finally, to run the program, execute

./build/all_topology_test

The parameters declared in input.json will be used to solve the corresponding Riemann problem. More specifically, 1D_RIEMANN simulates a 1D Riemann problem, whereas 2D_RIEMANN simulates a 2D Riemann problem. The solver is dimension-independent. The main difference regards only the initial and boundary conditions, which are obviously test-case dependent. This is the reason of the two different All_topology_solver.hpp, i.e. to handle initial conditions (also through containers.hpp) and boundary conditions (see user_bc.hpp for the 2D Riemann problem). Moreover, the spatial dimension is a template parameter, hence to be known at compile-time (it is fixed in .cpp file). If you take into account these constraints, you can easily design you own test case to simulate the all-topology model.

If one is interested in the results only, you can find them into the subfolders RESULTS for the 1D test case. The results are in .h5 format. For 2D problems, due to its size, the data is not provided. However, compiling and executing the code yields .xdmf and .h5 files. Placing them in RESULTS folder and executing export_data.py with pvpython will generate the video.

In order to further facilitate the experiences for the visualization for 1D problems, one can execute the jupyter notebook post_process_1D_Riemann .ipnyb where the routine plot_1D_Riemann_results provides visualization tools. It is sufficient to pass in input the base filename of the output, the file with the time saving (both given by the code), and the name of the fields for which post-processing is desired (up to 2 simultaneously)

For the reference Riemann problems already available in the repository, one can play around with data at

https://hpc-maths.github.io/2025_09_two_fluid_all_topology/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •