Skip to content

comphy-lab/energy-budget-issues

Repository files navigation

Energy Budget Issues: High-Fidelity Simulations Using Basilisk C

Issues License Last Commit Basilisk Research CodeRabbit Pull Request Reviews

Repository for investigating energy budget issues in multiphase flow simulations using Basilisk C.

Project Description

This repository focuses on investigating energy budget issues in multiphase flow simulations using Basilisk C. The project examines energy conservation in various fluid dynamics scenarios including drop impact, bubble dynamics, and interface evolution with complex physics such as viscoelasticity and thermal effects.

Key Research Areas

  • Energy Conservation Analysis Tracking kinetic, surface, and dissipation energy components
  • Multiphase Flow Dynamics Drop impact, bubble bursting, and interface evolution
  • Complex Physics Implementation Viscoelastic fluids, thermal effects, and non-Newtonian rheology
  • High-Fidelity Simulations Using adaptive mesh refinement and conservative schemes
  • Validation and Benchmarking Comparison with experimental data and theoretical predictions

Prerequisites for Contributors

  • Experience with Basilisk C or similar CFD frameworks
  • Understanding of fluid mechanics particularly multiphase flows
  • Knowledge of energy conservation principles in continuum mechanics
  • Programming skills in C and familiarity with parallel computing

Repository Structure

├── .github/: Issue templates and docs/CI automation
├── postProcess/: Project-specific post-processing tools
├── simulationCases/: Simulation cases with energy budget analysis
├── src-local/: Project-specific Basilisk headers (optional)

Note: basilisk/ and .project_config are created locally by reset_install_requirements.sh and are gitignored.

Installation

Basilisk requires a C99-compliant compiler and GNU make. Installation can be done in two ways:

Global Installation

Using darcs (recommended)

sudo apt install darcs make gawk
darcs clone http://basilisk.fr/basilisk
cd basilisk/src

# For Linux/Ubuntu users (preferred mode of operation)
ln -s config.gcc config

# For Mac users
# ln -s config.osx config

make

Using a tarball

wget http://basilisk.fr/basilisk/basilisk.tar.gz
tar xzf basilisk.tar.gz
cd basilisk/src

# For Linux/Ubuntu users (preferred mode of operation)
ln -s config.gcc config

# For Mac users
# ln -s config.osx config

make

Add to your shell configuration (.bashrc or .zshrc)

echo "export BASILISK=$PWD" >> ~/.bashrc
echo 'export PATH=$PATH:$BASILISK' >> ~/.bashrc

Or for zsh users:

echo "export BASILISK=$PWD" >> ~/.zshrc
echo 'export PATH=$PATH:$BASILISK' >> ~/.zshrc

Repository Level Installation

For project-specific installations, you can use the provided reset_install_requirements.sh script which:

  • Installs Basilisk within your project directory
  • Sets up environment variables locally (in .project_config)
  • Automatically detects your OS (MacOS or Linux) and uses appropriate configuration
  • Verifies the installation

Basic usage:

# Run the script to install or use existing installation
./reset_install_requirements.sh

# For a fresh installation (removes existing one if present)
./reset_install_requirements.sh --hard

# Load the environment settings for your current shell session
source .project_config

The script will create a .project_config file in your project root with the necessary environment variables. This approach avoids modifying your global shell configuration and keeps the Basilisk installation contained within your project.

Windows Subsystem for Linux (WSL) Compatibility

Testing on WSL is currently incomplete. In principle, the Linux installation instructions should work for WSL environments. If you encounter any issues while installing or running Basilisk on WSL, please report them by opening a bug report.

Complete Installation Instructions

For more detailed installation instructions, including configuration for different systems, setting up environment variables, installing additional dependencies, and optional libraries, please refer to the official installation guide at http://basilisk.fr/src/INSTALL.

Running the codes

To use the make file do:

CFLAGS=-DDISPLAY=-1 make NAME-of-File.tst

Quick start (from repo root):

source .project_config
cd simulationCases
./runCases.sh 3-DropImpactOnPool

Post-processing

Post-processing utilities live in postProcess/ (Python and C), e.g. plot_energy.py and VideoAxi.py.

Reporting Issues and Feature Requests

We use GitHub Issues to track bugs, feature requests, and example requests for this course. When creating an issue, please select the appropriate template to help us address your needs efficiently.

Issue Templates

Bug Report:

Report here

  • For problems with installation, compilation, or running code. Please include:
  • Detailed description of the issue
  • Your environment (OS, compiler version)
  • Steps to reproduce
  • Expected vs. actual behavior
  • Error messages and logs
  • Code snippets or files that demonstrate the issue

Feature/Topic Request:

Report here

  • For requesting specific topics or functionality
  • Coverage of specific topics in the course
  • New examples or tutorials
  • Additional functionality in the codebase
  • Improvements to existing materials

Example Request:

Report here

  • For requesting specific examples that demonstrate:
  • Particular Basilisk features
  • Solutions to common problems
  • Implementation of specific physics or numerical methods

General Question:

Report here

  • For any other questions

How to Create an Issue

  1. Go to the "Issues" tab in the GitHub repository
  2. Click the "New Issue" button
  3. Select the appropriate template from the options
  4. Fill in the required information according to the template
  5. Add relevant labels if available
  6. Submit the issue

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors