Agent skill

FluidSim CFD Simulations

by davila7 in davila7/claude-code-templates

Runs computational fluid dynamics simulations with the FluidSim Python framework: 2D and 3D Navier-Stokes, shallow water and stratified flow solvers plus output analysis.

MITAuto-check passedResearch & Science

Install FluidSim CFD Simulations

skills CLI
$ npx skills add davila7/claude-code-templates --skill fluidsim -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install davila7/claude-code-templates fluidsim --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/davila7/claude-code-templates.git skills-src && mkdir -p .claude/skills && cp -r skills-src/cli-tool/components/skills/scientific/fluidsim .claude/skills/fluidsim && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
fluidsim
GitHub stars
32k
Used in
10 other repos
Token cost
~2.3k tokens
SKILL.md length
424 words
Files
7 (incl. references)
Skills in repo
477
Repo updated
First seen
Licence
MIT

At a glance

Runs computational fluid dynamics simulations with the FluidSim Python framework: 2D and 3D Navier-Stokes, shallow water and stratified flow solvers plus output analysis.

  • Works in 6 steps: Installation and Setup → Running Simulations → Available Solvers → …
  • Setting up a 2D turbulence run with the Navier-Stokes solver
  • SKILL.md covers Overview, Core Capabilities, Common Use Cases and Quick Reference, plus 1 more section
  • Calls uv

What it does

FluidSim is an object-oriented Python framework for periodic-domain fluid problems that uses pseudospectral methods with FFT. The skill walks the agent through a five-step run: import a solver, create default parameters and set the grid size and domain, build the simulation, start time stepping, then plot fields such as vorticity and spatial means.

Solver choices are `ns2d` for 2D turbulence and vortex dynamics, `ns3d` for 3D flows, `ns2d.strat` and `ns3d.strat` for stratified oceanic or atmospheric flows, and `sw1l` for shallow water on rotating systems. Reference files cover installation, parameters, solvers, output analysis, advanced features and the simulation workflow. Installation uses `uv pip install fluidsim` with optional environment variables for output folders, and no API keys are needed. Pythran or Transonic compilation and MPI parallelization are named as the speed options.

When your agent uses it

  • Setting up a 2D turbulence run with the Navier-Stokes solver
  • Simulating stratified or shallow-water flows for geophysical studies
  • Plotting vorticity and spatial means from a finished simulation
  • Restarting a simulation or moving it to a cluster

Example prompts

  • “Set up a 2D Navier-Stokes simulation on a 256 by 256 grid and plot the vorticity at the end.”
  • “Configure a stratified 3D flow with a Brunt-Vaisala frequency of 1 and write outputs to my scratch folder.”
  • “Show me how to restart yesterday's fluidsim run from its last saved state.”

Requirements

  • Python with `fluidsim` installed
  • MPI and Pythran or Transonic for faster parallel runs (optional)

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Installation and Setup
  2. Running Simulations
  3. Available Solvers
  4. Parameter Configuration
  5. Output and Analysis
  6. Advanced Features

What it can do on your machine

Read from SKILL.md and the folder at commit 14680ec. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • fluidsim.readthedocs.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

FluidSim CFD Simulations loads about 2.3k tokens when it runs, and up to ~9.2k if it reads all its reference files. Until then it costs about 92 tokens; SKILL.md has 424 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~92
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~9.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from davila7/claude-code-templates at commit 14680ec, republished under its MIT licence (© davila7). 424 words, ~2,326 tokens.

Download SKILL.mdSave it as .claude/skills/fluidsim/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
fluidsim
description
Framework for computational fluid dynamics simulations using Python. Use when running fluid dynamics simulations including Navier-Stokes equations (2D/3D), shallow water equations, stratified flows, or when analyzing turbulence, vortex dynamics, or geophysical flows. Provides pseudospectral methods with FFT, HPC support, and comprehensive output analysis.

FluidSim

Overview

FluidSim is an object-oriented Python framework for high-performance computational fluid dynamics (CFD) simulations. It provides solvers for periodic-domain equations using pseudospectral methods with FFT, delivering performance comparable to Fortran/C++ while maintaining Python's ease of use.

Key strengths:

  • Multiple solvers: 2D/3D Navier-Stokes, shallow water, stratified flows
  • High performance: Pythran/Transonic compilation, MPI parallelization
  • Complete workflow: Parameter configuration, simulation execution, output analysis
  • Interactive analysis: Python-based post-processing and visualization

Core Capabilities

1. Installation and Setup

Install fluidsim using uv with appropriate feature flags:

bash
# Basic installation
uv uv pip install fluidsim

# With FFT support (required for most solvers)
uv uv pip install "fluidsim[fft]"

# With MPI for parallel computing
uv uv pip install "fluidsim[fft,mpi]"

Set environment variables for output directories (optional):

bash
export FLUIDSIM_PATH=/path/to/simulation/outputs
export FLUIDDYN_PATH_SCRATCH=/path/to/working/directory

No API keys or authentication required.

See references/installation.md for complete installation instructions and environment configuration.

2. Running Simulations

Standard workflow consists of five steps:

Step 1: Import solver

python
from fluidsim.solvers.ns2d.solver import Simul

Step 2: Create and configure parameters

python
params = Simul.create_default_params()
params.oper.nx = params.oper.ny = 256
params.oper.Lx = params.oper.Ly = 2 * 3.14159
params.nu_2 = 1e-3
params.time_stepping.t_end = 10.0
params.init_fields.type = "noise"

Step 3: Instantiate simulation

python
sim = Simul(params)

Step 4: Execute

python
sim.time_stepping.start()

Step 5: Analyze results

python
sim.output.phys_fields.plot("vorticity")
sim.output.spatial_means.plot()

See references/simulation_workflow.md for complete examples, restarting simulations, and cluster deployment.

3. Available Solvers

Choose solver based on physical problem:

2D Navier-Stokes (ns2d): 2D turbulence, vortex dynamics

python
from fluidsim.solvers.ns2d.solver import Simul

3D Navier-Stokes (ns3d): 3D turbulence, realistic flows

python
from fluidsim.solvers.ns3d.solver import Simul

Stratified flows (ns2d.strat, ns3d.strat): Oceanic/atmospheric flows

python
from fluidsim.solvers.ns2d.strat.solver import Simul
params.N = 1.0  # Brunt-Väisälä frequency

Shallow water (sw1l): Geophysical flows, rotating systems

python
from fluidsim.solvers.sw1l.solver import Simul
params.f = 1.0  # Coriolis parameter

See references/solvers.md for complete solver list and selection guidance.

4. Parameter Configuration

Parameters are organized hierarchically and accessed via dot notation:

Domain and resolution:

python
params.oper.nx = 256  # grid points
params.oper.Lx = 2 * pi  # domain size

Physical parameters:

python
params.nu_2 = 1e-3  # viscosity
params.nu_4 = 0     # hyperviscosity (optional)

Time stepping:

python
params.time_stepping.t_end = 10.0
params.time_stepping.USE_CFL = True  # adaptive time step
params.time_stepping.CFL = 0.5

Initial conditions:

python
params.init_fields.type = "noise"  # or "dipole", "vortex", "from_file", "in_script"

Output settings:

python
params.output.periods_save.phys_fields = 1.0  # save every 1.0 time units
params.output.periods_save.spectra = 0.5
params.output.periods_save.spatial_means = 0.1

The Parameters object raises AttributeError for typos, preventing silent configuration errors.

See references/parameters.md for comprehensive parameter documentation.

Show full SKILL.md (196 more words)Show less
5. Output and Analysis

FluidSim produces multiple output types automatically saved during simulation:

Physical fields: Velocity, vorticity in HDF5 format

python
sim.output.phys_fields.plot("vorticity")
sim.output.phys_fields.plot("vx")

Spatial means: Time series of volume-averaged quantities

python
sim.output.spatial_means.plot()

Spectra: Energy and enstrophy spectra

python
sim.output.spectra.plot1d()
sim.output.spectra.plot2d()

Load previous simulations:

python
from fluidsim import load_sim_for_plot
sim = load_sim_for_plot("simulation_dir")
sim.output.phys_fields.plot()

Advanced visualization: Open .h5 files in ParaView or VisIt for 3D visualization.

See references/output_analysis.md for detailed analysis workflows, parametric study analysis, and data export.

6. Advanced Features

Custom forcing: Maintain turbulence or drive specific dynamics

python
params.forcing.enable = True
params.forcing.type = "tcrandom"  # time-correlated random forcing
params.forcing.forcing_rate = 1.0

Custom initial conditions: Define fields in script

python
params.init_fields.type = "in_script"
sim = Simul(params)
X, Y = sim.oper.get_XY_loc()
vx = sim.state.state_phys.get_var("vx")
vx[:] = sin(X) * cos(Y)
sim.time_stepping.start()

MPI parallelization: Run on multiple processors

bash
mpirun -np 8 python simulation_script.py

Parametric studies: Run multiple simulations with different parameters

python
for nu in [1e-3, 5e-4, 1e-4]:
    params = Simul.create_default_params()
    params.nu_2 = nu
    params.output.sub_directory = f"nu{nu}"
    sim = Simul(params)
    sim.time_stepping.start()

See references/advanced_features.md for forcing types, custom solvers, cluster submission, and performance optimization.

Common Use Cases

2D Turbulence Study
python
from fluidsim.solvers.ns2d.solver import Simul
from math import pi

params = Simul.create_default_params()
params.oper.nx = params.oper.ny = 512
params.oper.Lx = params.oper.Ly = 2 * pi
params.nu_2 = 1e-4
params.time_stepping.t_end = 50.0
params.time_stepping.USE_CFL = True
params.init_fields.type = "noise"
params.output.periods_save.phys_fields = 5.0
params.output.periods_save.spectra = 1.0

sim = Simul(params)
sim.time_stepping.start()

# Analyze energy cascade
sim.output.spectra.plot1d(tmin=30.0, tmax=50.0)
Stratified Flow Simulation
python
from fluidsim.solvers.ns2d.strat.solver import Simul

params = Simul.create_default_params()
params.oper.nx = params.oper.ny = 256
params.N = 2.0  # stratification strength
params.nu_2 = 5e-4
params.time_stepping.t_end = 20.0

# Initialize with dense layer
params.init_fields.type = "in_script"
sim = Simul(params)
X, Y = sim.oper.get_XY_loc()
b = sim.state.state_phys.get_var("b")
b[:] = exp(-((X - 3.14)**2 + (Y - 3.14)**2) / 0.5)
sim.state.statephys_from_statespect()

sim.time_stepping.start()
sim.output.phys_fields.plot("b")
High-Resolution 3D Simulation with MPI
python
from fluidsim.solvers.ns3d.solver import Simul

params = Simul.create_default_params()
params.oper.nx = params.oper.ny = params.oper.nz = 512
params.nu_2 = 1e-5
params.time_stepping.t_end = 10.0
params.init_fields.type = "noise"

sim = Simul(params)
sim.time_stepping.start()

Run with:

bash
mpirun -np 64 python script.py
Taylor-Green Vortex Validation
python
from fluidsim.solvers.ns2d.solver import Simul
import numpy as np
from math import pi

params = Simul.create_default_params()
params.oper.nx = params.oper.ny = 128
params.oper.Lx = params.oper.Ly = 2 * pi
params.nu_2 = 1e-3
params.time_stepping.t_end = 10.0
params.init_fields.type = "in_script"

sim = Simul(params)
X, Y = sim.oper.get_XY_loc()
vx = sim.state.state_phys.get_var("vx")
vy = sim.state.state_phys.get_var("vy")
vx[:] = np.sin(X) * np.cos(Y)
vy[:] = -np.cos(X) * np.sin(Y)
sim.state.statephys_from_statespect()

sim.time_stepping.start()

# Validate energy decay
df = sim.output.spatial_means.load()
# Compare with analytical solution

Quick Reference

Import solver: from fluidsim.solvers.ns2d.solver import Simul

Create parameters: params = Simul.create_default_params()

Set resolution: params.oper.nx = params.oper.ny = 256

Set viscosity: params.nu_2 = 1e-3

Set end time: params.time_stepping.t_end = 10.0

Run simulation: sim = Simul(params); sim.time_stepping.start()

Plot results: sim.output.phys_fields.plot("vorticity")

Load simulation: sim = load_sim_for_plot("path/to/sim")

Resources

Documentation: https://fluidsim.readthedocs.io/

Reference files:

  • references/installation.md: Complete installation instructions
  • references/solvers.md: Available solvers and selection guide
  • references/simulation_workflow.md: Detailed workflow examples
  • references/parameters.md: Comprehensive parameter documentation
  • references/output_analysis.md: Output types and analysis methods
  • references/advanced_features.md: Forcing, MPI, parametric studies, custom solvers

© davila7, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (references) in cli-tool/components/skills/scientific/fluidsim of davila7/claude-code-templates.

  • SKILL.md
  • references/advanced_features.md
  • references/installation.md
  • references/output_analysis.md
  • references/parameters.md
  • references/simulation_workflow.md
  • references/solvers.md

Open the folder on GitHubat commit 14680ec

Used in 10 other repositories

We found 25 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 10 other GitHub owners. This page covers the copy in davila7/claude-code-templates, which our catalogue first saw on October 7, 2026.

Compare with similar skills

FluidSim CFD Simulations next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

FluidSim CFD Simulations compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
FluidSim CFD Simulations this skilldavila7/claude-code-templates32k10 repos~2.3kAutomated safety check: PassMIT
Cantera Ignition DelayK-Dense-AI/scientific-agent-skills48k2 repos~2.2kAutomated safety check: PassMIT
AstropyzLanqing/codex-claude-academic-skills4.6k14 repos~2.9kAutomated safety check: PassBSD-3-Clause
Climate DsHongjian01/ClimWorkflow102—~1.2kAutomated safety check: PassCustom licence
Chemgraphargonne-lcf/ChemGraph162—~743Automated safety check: PassApache-2.0
RowanK-Dense-AI/scientific-agent-skills48k3 repos~4.3kAutomated safety check: PassProprietary

Similar skills

  • Cantera Ignition Delay

    K-Dense-AI/scientific-agent-skills

    Runs Cantera constant-volume or constant-pressure ignition simulations and reports temperature-based ignition delay with mechanism provenance and checks.

    48k GitHub starsUsed in 2 repos~2.2k tokens
    Research & ScienceAuto-check passed
  • Astropy

    zLanqing/codex-claude-academic-skills

    Comprehensive Python library for astronomy and astrophysics.

    4.6k GitHub starsUsed in 14 repos~2.9k tokens
    Research & ScienceAuto-check passed
  • Climate Ds

    Hongjian01/ClimWorkflow

    ClimWorkflow climate-data workflow: map a natural-language climate goal to Plan-Agent / Data-Agent / Coding-Agent roles, then call the 7-tool DAG (optional read-only validate after report).

    102 GitHub stars~1.2k tokensUpdated 19 days ago
    Research & ScienceAuto-check passed
  • Chemgraph

    argonne-lcf/ChemGraph

    Use ChemGraph Python and CLI workflows, agent-written batch scripts, and attached chemistry MCP tools.

    162 GitHub stars~743 tokensUpdated today
    Research & ScienceAuto-check passed
  • Rowan

    K-Dense-AI/scientific-agent-skills

    Rowan is a cloud-native molecular modeling and medicinal-chemistry workflow platform with a Python API.

    48k GitHub starsUsed in 3 repos~4.3k tokens
    Research & ScienceAuto-check passed
  • DP-GEN Simplify Workflow

    jinzhezenggroup/computational-chemistry-agent-skills

    Prepares, validates and runs DP-GEN simplify jobs that thin out repeated or redundant DeepMD datasets, generating param.json and machine.json for local or scheduler runs.

    148 GitHub stars~2.7k tokensUpdated 2 days ago
    Research & ScienceAuto-check passed

More from davila7/claude-code-templates

All 477 skills in this repo
  • Perplexity Web Search

    davila7/claude-code-templates

    Runs web-grounded searches through Perplexity's Sonar models over OpenRouter for current events, recent literature and cited facts beyond the model's training cutoff.

    32k GitHub starsUsed in 12 repos~3.5k tokens
    Auto-check: notes
  • Neuropixels Data Analysis

    davila7/claude-code-templates

    Analyzes Neuropixels recordings from SpikeGLX or Open Ephys through preprocessing, drift correction, Kilosort4 spike sorting, quality metrics and curation.

    32k GitHub starsUsed in 10 repos~2.8k tokens
    Auto-check passed
  • Scientific Venue Templates

    davila7/claude-code-templates

    Supplies LaTeX templates and formatting rules for journals, conferences, posters, and grant proposals, then can check a draft against them.

    32k GitHub starsUsed in 9 repos~5.1k tokens
    Auto-check: notes
  • Brand Voice Content Creator

    davila7/claude-code-templates

    Analyzes a brand's existing writing to lock in a consistent voice, then builds SEO blog posts and platform-specific social content around it.

    32k GitHub starsUsed in 3 repos~1.9k tokens
    Auto-check passed
  • CAPA Officer

    davila7/claude-code-templates

    Guides corrective and preventive action (CAPA) work in a quality management system, from initiation and root cause analysis through effectiveness verification.

    32k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Fda Consultant Specialist

    davila7/claude-code-templates

    Senior FDA consultant and specialist for medical device companies including HIPAA compliance and requirement management.

    32k GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed

Works with

Questions about FluidSim CFD Simulations

What does FluidSim CFD Simulations do?

Runs computational fluid dynamics simulations with the FluidSim Python framework: 2D and 3D Navier-Stokes, shallow water and stratified flow solvers plus output analysis. FluidSim is an object-oriented Python framework for periodic-domain fluid problems that uses pseudospectral methods with FFT. The skill walks the agent through a five-step run: import a solver, create default parameters and set the grid size and domain, build the simulation, start time stepping, then plot fields such as vorticity and spatial means.

When should I use FluidSim CFD Simulations?

FluidSim CFD Simulations fits situations like: setting up a 2D turbulence run with the Navier-Stokes solver; simulating stratified or shallow-water flows for geophysical studies; plotting vorticity and spatial means from a finished simulation; restarting a simulation or moving it to a cluster.

How do I install FluidSim CFD Simulations in Claude Code?

Run `npx skills add davila7/claude-code-templates --skill fluidsim -a claude-code`. Or copy the skill folder (cli-tool/components/skills/scientific/fluidsim in davila7/claude-code-templates) into .claude/skills/fluidsim in your project. Claude Code loads it when a task matches its description.

How do I install FluidSim CFD Simulations in Codex?

Run `npx skills add davila7/claude-code-templates --skill fluidsim -a codex`. Or copy the skill folder (cli-tool/components/skills/scientific/fluidsim in davila7/claude-code-templates) into .agents/skills/fluidsim in your project. Codex loads it when a task matches its description.

Can I use FluidSim CFD Simulations in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add davila7/claude-code-templates --skill fluidsim -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fluidsim, .gemini/skills/fluidsim, .github/skills/fluidsim and .opencode/skills/fluidsim in your project.

What does FluidSim CFD Simulations need to run?

Going by SKILL.md and its folder, FluidSim CFD Simulations needs the command-line tools its instructions call (uv). Our summary lists: Python with `fluidsim` installed; MPI and Pythran or Transonic for faster parallel runs (optional).

Does FluidSim CFD Simulations access the network?

SKILL.md names 1 domain. As links in the text: fluidsim.readthedocs.io. This is read from the text; nothing was executed.

Is FluidSim CFD Simulations safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does FluidSim CFD Simulations use?

FluidSim CFD Simulations is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does FluidSim CFD Simulations use?

About 2.3k tokens (SKILL.md is roughly 9.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6.9k tokens, read only when the agent opens those files.

What are the alternatives to FluidSim CFD Simulations?

Skills that share tags, products or a category with FluidSim CFD Simulations: Cantera Ignition Delay (K-Dense-AI/scientific-agent-skills, 48k stars), Astropy (zLanqing/codex-claude-academic-skills, 4.6k stars), Climate Ds (Hongjian01/ClimWorkflow, 102 stars) and Chemgraph (argonne-lcf/ChemGraph, 162 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains FluidSim CFD Simulations?

davila7 (a GitHub user) maintains it in davila7/claude-code-templates, which has 32,463 GitHub stars. The repository holds 477 skills in this directory. The repository was last updated on October 8, 2026.

Source: davila7/claude-code-templates on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.