fluidsim

Runs pseudospectral CFD simulations of Navier-Stokes, shallow water, and stratified flows in Python.

Updated Sep 2, 2026
One-click install
npx skills add https://github.com/ricfulop/cba-agentic-engineering-bootstrap --skill fluidsim-ricfulop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fluidsim
Source: https://github.com/ricfulop/cba-agentic-engineering-bootstrap/tree/main/skills/fluidsim
Command: npx skills add https://github.com/ricfulop/cba-agentic-engineering-bootstrap --skill fluidsim-ricfulop

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires fluidsim, and includes references (resource) components.

What problem does it solve? Setting up computational fluid dynamics simulations typically requires writing low-level Fortran or C++ code and managing complex solver infrastructure. This Skill provides a complete Python workflow for configuring, running, and analyzing pseudospectral fluid dynamics simulations with performance comparable to compiled languages. ## Core Features & Use Cases - Multiple Solvers: 2D/3D Navier-Stokes, stratified flows, shallow water equations, and elastic plate dynamics on periodic domains using FFT-based pseudospectral methods. - HPC Support: MPI parallelization for large-scale simulations, Pythran/Transonic compilation, and cluster job submission for parametric studies. - Complete Analysis Pipeline: Automatic saving of physical fields (HDF5), spatial means, energy spectra, and spectral energy budgets with built-in plotting and post-processing. - Use Case: A researcher studying 2D turbulence can configure a 512x512 Navier-Stokes simulation with random forcing, run it with adaptive time stepping, and plot the energy cascade spectrum to verify the expected power law. ## Quick Start Use the fluidsim skill to set up and run a 2D Navier-Stokes turbulence simulation with 256x256 resolution and plot the vorticity field.

Frequently Asked Questions about fluidsim

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a 2D Navier-Stokes simulation in Python?

Import Simul from fluidsim.solvers.ns2d.solver, create default parameters, set resolution and viscosity, then call sim.time_stepping.start(). FluidSim handles FFT operators, time stepping, and output saving automatically.

How to run fluidsim simulations in parallel with MPI?

Install fluidsim with the mpi extra using uv pip install "fluidsim[fft,mpi]", then launch your script with mpirun -np 8 python script.py. FluidSim automatically detects MPI and distributes the computation across processors.

Which fluidsim solver should I use for stratified flows?

Use ns2d.strat or ns3d.strat solvers for density-stratified flows like oceanic or atmospheric simulations. Set the Brunt-Väisälä frequency via params.N to control stratification strength under the Boussinesq approximation.

Does fluidsim require API keys or authentication?

No, FluidSim requires no API keys or authentication. It is an open-source Python framework installed via pip or uv, with optional environment variables only for controlling output directories and FFT library selection.

How do I restart a fluidsim simulation from a saved state?

Set params.init_fields.type to "from_file" and point params.init_fields.from_file.path to a saved state_phys HDF5 file. You can extend t_end to continue the simulation from the checkpoint.

What are the limitations of fluidsim pseudospectral solvers?

FluidSim solvers work only on periodic domains, so they cannot directly handle solid walls or complex geometries. Very high resolution 3D runs also demand significant memory and typically require MPI clusters.