GithubHelp home page GithubHelp logo

cselab / aphros Goto Github PK

View Code? Open in Web Editor NEW
371.0 18.0 41.0 210.04 MB

Finite volume solver for incompressible multiphase flows with surface tension. Foaming flows in complex geometries.

License: MIT License

Shell 1.42% Makefile 0.24% C 1.63% C++ 83.32% CMake 2.70% Python 10.48% Awk 0.13% Gnuplot 0.02% Dockerfile 0.05% Batchfile 0.01%
multiphase-flow surface-tension cfd chemical-engineering high-performance-computing fluid paraview simulation

aphros's Introduction

Aphros

Finite volume solver for incompressible multiphase flows with surface tension.

Key features:

  • implementation in C++14
  • scalability to thousands of compute nodes
  • fluid solver based on SIMPLE or Bell-Colella-Glaz methods
  • advection with PLIC volume-of-fluid
  • particle method for curvature estimation accurate at low resolutions [demo] [4]
  • Multi-VOF for scalable coalescence prevention [demo] [8] [11]
Gallery wiki Curvature Multi-VOF Electrochemistry Parser

Documentation

Online documentation and PDF generated by doc/sphinx.

Default parameters are listed in deploy/scripts/sim_base.conf.

Requirements

C++14, CMake

Optional dependencies: MPI, parallel HDF5, python3, python3-numpy

Bundled optional dependencies: hypre, overlap, fpzip

Clone and build

git clone https://github.com/cselab/aphros.git

First, follow deploy/README.md to prepare environment and install dependencies. Then build with

cd src
make

Code Ocean

The Code Ocean platform hosts the following compute capsule

which builds Aphros in a Linux environment, runs a set of examples, and visualizes the results.

Docker

Instead of building the code in your system, you can build a Docker container and run a simulation example

docker build github.com/cselab/aphros --tag aphros
cd examples/202_coalescence/standalone
./conf
docker run -v `pwd`:`pwd` -w `pwd` aphros

Minimal build without CMake

Build without dependencies and tests on Unix-like systems (APHROS_PREFIX is the installation directory, with USE_MPI=1, USE_HDF=1, USE_OPENCL=1, USE_AVX=1 builds with MPI, parallel HDF5 library, OpenCL, and AVX extensions):

cd src
../make/bootstrap
make -f Makefile_legacy install APHROS_PREFIX=$HOME/.local USE_MPI=0 USE_HDF=0 USE_OPENCL=0 USE_AVX=0

on Windows using Microsoft C++ toolset (NMAKE, LINK, and CL):

cd src
../make/bootstrap # Requires sh and awk.
nmake /f NMakefile

Videos

Examples of simulations visualized using ParaView and OSPRay. Links [conf] lead to the solver configuration.

Coalescence of bubbles [conf] [4] Taylor-Green vortex with bubbles [2] [5]
Bubble jump-off [1] Electrochemical reactor [conf] [9]
Bubble trapped by vortex ring [5] Plunging jet [2]
Clustering of bubbles [conf] [6] [7] [11] Foaming waterfall [conf] [8] [11]
Bidisperse foam [conf] [11] Microfluidic crystals [conf] [11]
LAMMPS polymers in Taylor-Green vortex [conf] Bubble pipe optimization [10]
Bubbles through mesh
APS Gallery of Fluid Motion 2019 award winner
Breaking waves: to foam or not to foam? [6]
Collaboration with Jean M. Favre at CSCS.

Developers

Aphros is developed by researchers at ETH Zurich and Harvard University

advised by

Other contributors are: Fabian Wermelinger (Cubism backend)

Publications

  1. Hashemi SMH, Karnakov P, Hadikhani P, Chinello E, Litvinov S, Moser C, Koumoutsakos P, Psaltis D. A versatile and membrane-less electrochemical reactor for the electrolysis of water and brine. Energy & environmental science. 2019 10.1039/C9EE00219G
  2. Karnakov P, Wermelinger F, Chatzimanolakis M, Litvinov S, Koumoutsakos P. A high performance computing framework for multiphase, turbulent flows on structured grids. Proceedings of the platform for advanced scientific computing conference on – PASC ’19. 2019 10.1145/3324989.3325727 [pdf]
  3. Karnakov P, Litvinov S, Koumoutsakos P. Coalescence and transport of bubbles and drops. 10th International Conference on Multiphase Flow (ICMF). 2019 [pdf]
  4. Karnakov P, Litvinov S, and Koumoutsakos P. A hybrid particle volume-of-fluid method for curvature estimation in multiphase flows. International journal of multiphase flow. 2020 10.1016/j.ijmultiphaseflow.2020.103209 arXiv:1906.00314
  5. Wan Z, Karnakov P, Koumoutsakos P, Sapsis T. Bubbles in Turbulent Flows: Data-driven, kinematic models with history terms. International journal of multiphase flow. 2020 10.1016/j.ijmultiphaseflow.2020.103286 arXiv:1910.02068
  6. Karnakov P, Litvinov S, Favre JM, Koumoutsakos P. V0018: Breaking waves: to foam or not to foam? Gallery of Fluid Motion Award video article
  7. Annual report 2019 of the Swiss National Supercomputing Centre (cover page) [link]
  8. Karnakov P, Wermelinger F, Litvinov S, Koumoutsakos P. Aphros: High Performance Software for Multiphase Flows with Large Scale Bubble and Drop Clusters. Proceedings of the platform for advanced scientific computing conference on – PASC ’20. 2020 10.1145/3394277.3401856 [pdf]
  9. Karnakov P. The multilayer volume-of-fluid method for multiphase flows across scales: breaking waves, microfluidics, and membrane-less electrolyzers. PhD thesis. ETH Zurich. 2021 10.3929/ethz-b-000547518
  10. Martin SM, Wälchli D, Arampatzis G, Economides AE, Karnakov P, Koumoutsakos P. Korali: Efficient and scalable software framework for Bayesian uncertainty quantification and stochastic optimization. Computer Methods in Applied Mechanics and Engineering. 2021 10.1016/j.cma.2021.114264
  11. Karnakov P, Litvinov S, Koumoutsakos P. Computing foaming flows across scales: from breaking waves to microfluidics. Science Advances. 2022 10.1126/sciadv.abm0590

Citing

If you use Aphros in your work, please consider using the following

@article{aphros2022,
  author = {Petr Karnakov  and Sergey Litvinov  and Petros Koumoutsakos},
  title = {Computing foaming flows across scales: From breaking waves to microfluidics},
  journal = {Science Advances},
  volume = {8},
  number = {5},
  pages = {eabm0590},
  year = {2022},
  doi = {10.1126/sciadv.abm0590},
  URL = {https://www.science.org/doi/abs/10.1126/sciadv.abm0590},
  eprint = {https://www.science.org/doi/pdf/10.1126/sciadv.abm0590},
}

aphros's People

Contributors

pkarnakov avatar slitvinov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aphros's Issues

Changing simulation parameters and conditions

Greetings Aphros team!
I was trying out the example 205_multivof/clustering and could successfully run it in its default configuration (except for changing the number of processors and mesh resolution). I was trying to change some simulation parameters and conditions and have some queries regarding the same.

  1. How to change the size of the box in which the bubbles are rising, without changing the mesh resolution and other parameters? For example, if I wish to increase the height of the box by 3 times how to do it?
  2. How to change the size of the bubbles? Also, is there a way to change the number of bubble sources?
  3. If we wish to change the boundary conditions from no slip to periodic, how to do the same?
  4. How to change the fluid properties to Non-Newtonian fluid?
  5. If we wish to dump the information like velocity field, volume fraction etc into the output files (.vtk) so that we can visualize using tools like Paraview, how to do the same? (Some of these data are present in the traj.csv files, but not in the .vtk files which are generated)
  6. Is it possible to directly calculate time-averaged RMS quantities and turbulent energy budget using aphros? If yes, how to do it?
    It would be really nice if you could respond to the above queries.
    Thank you.

Is it possible to integrate this solver into other software like OpenFOAM?

Dr. Karnakov, first appreciate the nice work you had done!
This solver make it easier to simulate foam behavior, with useful examples.
And I think maybe it could be intergrated as a solver into OpenFOAM, for it's also bulit in C++, with many of useful interface such as Geometry segmentation,Parallel computing,and Mesh generation. Also it a popular CFD open source software. So it may be Easier for researchers to use and develop

Output parameters

Greetings Aphros team!
We are using Aphros to research foam. We encountered some problems and hope you can help us.

  1. We would like to know which parameters of the foam can be obtained if the foam is studied. For example, the size or distribution of the foam over time. We would appreciate it if you could tell us in detail what foam parameters are available or how to set up to access the parameters that are available
  2. We have run some examples and imported the resulting .vtk file into paraview, and we found that only the information with the names cl, l and c could be visualized, and we wanted to know what each of these three parameters meant. And we found that not all examples have the three parameters in the output files (.vtk) and . We would like to know how these parameters are set up for export to .vtk files, are they defined in a file? Please explain in more detail
    We look forward to your response!
    Thank you

Does anynone have plunging jet demo file?

Hello, Aphros team and the users,

I am gong to do a similar simulation case like plunging jet using Aphros, but I did not see any examples files in the example folder. I am a little contused about the set-ups in aphros, sorry for it.

feature requests

  • Strict mode in configuration: command set requires that the variable is already defined and only updates the value. Helpful to avoid misspellings of variables.

simulation crashing 201_Taylor_couette

Dear Aphros team,

Greetings. Recently, I started exploring Aphros simulations and found an example 201_Taylor_couette crashing while outputting the data. The std.conf file consists of the following dump information. It is neither dumping such data for further visualization using paraview or other software. Could you kindly respond. And also, how to understand these dumpbc, dumplist, 1e10 etc variable. Any manual which clearly explain these examples. Thank you.

dump

set int dumpbc 1
set string dumplist vx vy p div
set double dump_field_dt 1e10
set double dump_field_t0 1e10
set int report_step_every 1
set int stat_step_every 1
set double dump_trep_t0 1e10
set int verbose_stages 0
set int dumplast 1

How do I setup Liquid drops impact simulations?

I am exploring the aphros for drop and bubble dynamics. I find the "https://cselab.github.io/aphros/wasm/hydro.html" as good starting point. Example "107_wasm" is the right one to start? I see each example has different way to setting up the basic simulation.

To get the basic of the aphros, if I start with simple simulation like lid-driven or flow-over cylinder, as in aphros-explorer' , to drop impact. Is there any full detailed test case is available?

How to change geometry in code ocean

Hello Dr Karnakov, I am using the case you provided under the examples/205_multivof/bidisperse path for my simulation. I tried to change some of the model geometry and fluid property parameters, and some of the problems could not be solved.

  1. I want to connect a converging channel followed by a diverging channel in the examples/205_multivof/bidisperse/gen file. I made the following modifications: change lx = Lwide + Lnarrow + H * 0.5 to lx = 2 * Lwide +2 * Lnarrow + H * 0.5 *2.
    image
    After performing a "reproducible run," the generated files still follow the calculations from the original gen file, and the geometric structure has not changed.
  2. I couldn't find the exact meaning of "invert" and "intersect" with a value of 1 in the Geometry class.
  3. If I want to simulate the flow of a droplet cluster, can I directly modify the density and viscosity of the dispersed phase in the gen file?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.