MCPcopy Create free account
hub / github.com/cselab/aphros

github.com/cselab/aphros @v0.1.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.3 ↗ · + Follow
2,946 symbols 7,986 edges 414 files 209 documented · 7% updated 11mo agov0.1.3 · 2021-11-08★ 45714 open issues

Browse by type

Functions 2,397 Types & classes 549
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

!/usr/bin/env python3

import re import os

text = '''

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] [[ref:partstr]]
  • Multi-VOF for scalable coalescence prevention [demo] [[ref:pasc20]] [[ref:multivof]]

Gallery of interactive simulations

Gallery wiki Curvature Multi-VOF Electrochemistry

Documentation

Online version and PDF generated in doc/sphinx.

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

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 builds with MPI, parallel HDF5 library, and OpenCL):

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

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

cd src
nmake /f NMakefile

Videos

Examples of simulations visualized using ParaView and OSPRay in collaboration with Jean M. Favre at CSCS. Links [conf] lead to the solver configuration.

Coalescence of bubbles [conf] [[ref:partstr]] Taylor-Green vortex with bubbles [[ref:pasc19]] [[ref:datadriven]]
Bubble trapped by vortex ring [[ref:datadriven]] Plunging jet [[ref:pasc19]]
Electrochemical reactor [[ref:ees]] Bubbles through mesh
Clustering of bubbles [conf] [[ref:aps]] [[ref:cscs]] [[ref:multivof]] Foaming waterfall [conf] [[ref:pasc20]] [[ref:multivof]]
Bidisperse foam [conf] [[ref:multivof]] Microfluidic crystals [conf] [[ref:multivof]]
LAMMPS polymers in Taylor-Green vortex [conf]
APS Gallery of Fluid Motion 2019 award winner

Breaking waves: to foam or not to foam? [[ref:aps]]|

Developers

Aphros is developed and maintained by researchers at ETH Zurich

under the supervision of

Publications

[[item:ees]] S. M. H. Hashemi, P. Karnakov, P. Hadikhani, E. Chinello, S. Litvinov, C. Moser, P. Koumoutsakos, and D. Psaltis, "A versatile and membrane-less electrochemical reactor for the electrolysis of water and brine", Energy & environmental science, 2019 10.1039/C9EE00219G [[item:pasc19]] P. Karnakov, F. Wermelinger, M. Chatzimanolakis, S. Litvinov, and P. Koumoutsakos, "A high performance computing framework for multiphase, turbulent flows on structured grids" in Proceedings of the platform for advanced scientific computing conference on – PASC ’19, 2019 10.1145/3324989.3325727 [pdf] [[item:icmf]] P. Karnakov, S. Litvinov, P. Koumoutsakos "Coalescence and transport of bubbles and drops" 10th International Conference on Multiphase Flow (ICMF), 2019 [pdf] [[item:partstr]] P. Karnakov, S. Litvinov, and P. Koumoutsakos, "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 [[item:datadriven]] Z. Wan, P. Karnakov, P. Koumoutsakos, T. Sapsis, "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 [[item:aps]] P. Karnakov, S. Litvinov, J. M. Favre, P. Koumoutsakos "V0018: Breaking waves: to foam or not to foam?" Gallery of Fluid Motion Award video article [[item:cscs]] Annual report 2019 of the Swiss National Supercomputing Centre (cover page) [link] [[item:pasc20]] P. Karnakov, F. Wermelinger, S. Litvinov, and P. Koumoutsakos, "Aphros: High Performance Software for Multiphase Flows with Large Scale Bubble and Drop Clusters" in Proceedings of the platform for advanced scientific computing conference on – PASC ’20, 2020 10.1145/3394277.3401856 [pdf] [[item:multivof]] P. Karnakov, S. Litvinov, P. Koumoutsakos "Computing foaming flows across scales: from breaking waves to microfluidics", 2021 arXiv:2103.01513 '''

m_refs = list(re.finditer("[[ref:[^]]]]", text)) m_items = list(re.finditer("[[item:[^]]]]", text)) refs = [m_ref.group(0) for m_ref in m_refs]

gen = text gen = gen.replace('[[GEN]]', os.path.basename(file)) gen = gen.replace('[[VIDEOS]]', "https://cselab.github.io/aphros/videos") gen = gen.replace('[[VIDTHUMB]]', "https://cselab.github.io/aphros/videos/preview/thumb") gen = gen.replace('[[IMAGES]]', "https://cselab.github.io/aphros/images") gen = gen.replace('[[PDF]]', "https://cselab.github.io/aphros/pdf") found_refs = set() for i, m_item in enumerate(m_items): item = m_item.group(0) name = re.match("[[item:([^]])]]", item).group(1) start = m_item.start(0) end = m_items[i + 1].start(0) if i + 1 < len(m_items) else len(text) m_url = re.search("((http[^)]))", text[start:end]) ref = "[[ref:{}]]".format(name) found_refs.add(ref)

gen = gen.replace(item, "{:}.".format(i + 1))

if m_url:
    url = m_url.group(1)
    gen = gen.replace(ref, "[[{:}]]({})".format(i + 1, url))
else:
    if ref in refs:
        print("Warning: no URL found for '{}'".format(item))
    gen = gen.replace(ref, "[{:}]".format(i + 1))

unknown_refs = set(refs) - found_refs if len(unknown_refs): for ref in unknown_refs: print("Warning: item not found for '{}'".format(ref))

with open("README.md", 'w') as f: f.write(gen)

Core symbols most depended-on inside this repo

Shape

Method 1,373
Function 1,024
Class 523
Enum 26

Languages

C++81%
Python13%
C3%
TypeScript3%

Modules by API surface

src/geom/mesh.h121 symbols
src/test/benchmark/main.cpp112 symbols
deploy/scripts/aphros/plot.py83 symbols
src/test/approx/main.cpp81 symbols
src/solver/embed.h81 symbols
src/distr/reduce.h68 symbols
src/geom/notation.h62 symbols
deploy/scripts/aphros/confgen.py62 symbols
src/geom/vect.h59 symbols
src/util/stat.h45 symbols
src/linear/hypresub.cpp45 symbols
src/linear/amgx.h44 symbols

For agents

$ claude mcp add aphros \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page