Fluid2d
A versatile Python-Fortran CFD code that solves a large class of 2D flows
Install / Use
/learn @pvthinker/Fluid2dREADME
Fluid2d
Fluid2d is a versatile Python-Fortran CFD code that solves a large class of 2D flows. It is designed to be used easily by Students learning Fluid Mechanics or Geophysical Fluid Dynamics and by their professors willing to illustrate their course and to organize numerical practicals. The idea is to visualize flows on the fly, as they are computed. The effect of parameter changes can be seen immediately. The key quantity of fluid2D is the vorticity. If you feel weak on vorticity dynamics, this code is for you. You should rapidly become as expert as the experts.
You can learn how basic processes work because of the power of animations. It is quite easy to go beyond textbooks and to reach research questions.
Install
Fluid2d installation does not rely on the standard pip install Fluid2d. The procedure is a bit more convoluted
- git clone Fluid2d. To copy-paste from your computer to the virtual desktop, use the copy-paste interactive window on the left
git clone https://github.com/pvthinker/Fluid2d.git
- create the conda environment (this step may fail in that case, execute the next step). It takes a few minutes to download everything. It’s a bit a shame to have to download all these packages in your $HOME but that’s how it works.
cd Fluid2d
conda create --name fluid2d --file requirements.txt
if conda create fails
conda init bash
then close the terminal, reopen a new one, module load anaconda3 and repeat the conda
create --name fluid2d --file requirements.txt
That should work.
- activate this environment
conda activate fluid2d
- you can now build Fluid2d
./install.sh
- last step, make Python aware of where Fluid2d is
source ~/.fluid2d/activate.sh
you’re good to run Fluid2d
- run your first experiment
cd myexp/Vortex
python vortex.py
Run an experiment
Once the code is installed, you don't need to repeat stage 4).
What you need to do though, every time you run Fluid2d in a new terminal is to repeat stages 3) and 5), then do something like 6) but with another experiment.
Most frequent error
When trying to run an experiment you may get the following error message
ModuleNotFoundError: No module named 'fluid2d'
it is most likely because you forgot to activate Fluid2d. Fix it with
source ~/.fluid2d/activate.sh
and it should work
Related Skills
node-connect
347.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
108.0kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
108.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
347.2kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
