Menu

ElastoFlow: 2D/3D Viscoelastic Fluid Simulation Framework

DOI Website Status GitHub


πŸš€ ElastoFlow is a state-of-the-art, open-source framework for simulating viscoelastic fluid flows in 2D and 3D, built as an extension to the Basilisk C CFD library. It implements the log-conformation method for robust, high-Weissenberg number simulations, with a focus on clarity, extensibility, and scientific rigor.

✨ Key Features

  • Full 3D Log-Conformation Method: Complete scalar implementation for 3D viscoelastic fluids (log-conform-viscoelastic-scalar-3D.h)
  • Robust 2D/Axi Support: Scalar and tensor-based log-conformation for 2D and axisymmetric cases (log-conform-viscoelastic-scalar-2D.h, log-conform-viscoelastic.h)
  • Optimized Matrix Algebra: Efficient, stable eigenvalue and tensor operations (eigen_decomposition.h)
  • Advanced Initialization: Functions for pseudo vectors/tensors in 2D/3D
  • Error Handling: Negative eigenvalue checks, eigenvalue clamping, and detailed diagnostics
  • Performance: Simplified acceleration term calculations and optimized tensor operations
  • Documentation: Extensive inline documentation, mathematical background, and verification notes
  • Compatibility: GPLv3 license, fully compatible with Basilisk and previous ElastoFlow versions

πŸ› Bug Fixes (v2.5/v2.6)

  • Corrected matrix algebra in 3D
  • Fixed rotation tensor and eigenvalue edge cases
  • Improved error reporting and diagnostics
  • Enhanced axisymmetric and 2D/3D compatibility

πŸ—‚οΈ Repository Structure

πŸ“š Documentation

  • docs/ β€” Full HTML documentation, mathematical background, and API
  • Inline documentation in all major headers (see src-local/)
  • Example simulation and post-processing scripts in simulationCases/

πŸš€ Quick Start

1. Prerequisites

  • Basilisk C (included as submodule in basilisk/)
  • C compiler (e.g., gcc)
  • Python 3 (for post-processing)
  • Optional: Jupyter for notebooks

2. Compiling & Running Simulations

A. Vanilla Basilisk method:

qcc -O2 -Wall -I./src-local -disable-dimensions simulationCases/{CaseName}.c -o {CaseName} -lm 
./{CaseName}

B. Using the Makefile (with bview browser):

CFLAGS=-DDISPLAY=-1 make simulationCases/{CaseName}.tst
  • For interactive visualization, open the generated display.html in your browser (see Basilisk bview).

3. Post-Processing & Analysis

  • Python scripts and Jupyter notebooks for data extraction and visualization are in simulationCases/ (e.g., VideoAxi.py, verifyWtihPlots.ipynb).
  • Example utilities: getData-elastic-scalar2D.c, getFacet2D.c.

πŸ“ Example: Running a 3D Drop Atomisation Simulation

qcc -O2 -Wall -I./src-local -disable-dimensions simulationCases/dropAtomisation.c -o dropAtomisation -lm
./dropAtomisation

πŸ” Technical Details

πŸ§‘β€πŸ’» Contributing

  • See CLAUDE.md for code style and development guidelines.
  • Issue templates and feature requests: GitHub Issue Templates
  • Pull requests are welcome! Please document your changes and update relevant tests/examples.

πŸ“‹ License

This project is licensed under the GNU GPLv3, in line with the Basilisk codebase.

πŸ™ Acknowledgments

  • Thanks to all contributors and the Basilisk community

πŸ”— References

  • Fattal & Kupferman (2004, 2005): Log-conformation method
  • Comminal et al.Β (2015): Constitutive model functions
  • Hao & Pan (2007): Split scheme implementation
  • Basilisk C

For detailed documentation, see the docs/ folder or open docs/index.html in your browser.

Generated Documentation

Root Directory

postProcess

simulationCases

src-local