semvec/pypi-packages huggingface dataset:
foamscript 0.1.0
A scripting library to configure and automate OpenFOAM CFD simulations
License: MIT
Requires Python: >=3.9

# FOAMScript

![License: MIT](docs/assets/license.png)
![Python: 3.9+](docs/assets/python_version.png)
![Status: Planning](docs/assets/status.png)


**FOAMScript** is a Python-driven abstraction layer for OpenFOAM® designed to transform CFD from a manual directory-shuffling exercise into a versionable, "Simulation as Code" workflow.

## The Goal
To execute a complete CFD study—from raw CAD to final aerodynamic plots—using a single, human-readable configuration file. 

## The "Single Source of Truth" Workflow
FOAMScript eliminates the "cloning" of existing cases. Instead, it reads a master JSON configuration to:
1. **Locate Infrastructure**: Pathing for specific OpenFOAM versions and CAD utilities.
2. **Setup Workspace**: Automatic generation of case directories from a blank slate.
3. **Execute Pipeline**: Automated meshing and solving with strict environment validation.
4. **Insight Generation**: Integrated post-processing to generate comparison plots (e.g., $C_d$, $C_l$, $C_m$ vs AoA) directly from simulation residuals and force coefficients.

## Key Features
*   **JSON-Defined Physics**: Specify your engineering intent (fluid properties, boundary conditions) in one file.
*   **Integrated Post-Processing**: Automated extraction and plotting of aerodynamic coefficients.
*   **Environment Guardrails**: Validates solver and mesher paths before execution to ensure reproducibility.

## Getting Started
> **Note:** FOAMScript is currently in the architectural phase.
>