openfoam-41-error-message-format

Sub-skill of openfoam: 4.1 Error Message Format (+2).

5 stars

Best use case

openfoam-41-error-message-format is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Sub-skill of openfoam: 4.1 Error Message Format (+2).

Teams using openfoam-41-error-message-format should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/41-error-message-format/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/_archive/engineering/cfd/openfoam/41-error-message-format/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/41-error-message-format/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How openfoam-41-error-message-format Compares

Feature / Agentopenfoam-41-error-message-formatStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Sub-skill of openfoam: 4.1 Error Message Format (+2).

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 4.1 Error Message Format (+2)

## 4.1 Error Message Format


```
--> FOAM FATAL ERROR:
    <description>
    From function <Class>::<method>
    in file <source.C> at line <N>.
FOAM exiting
```


## 4.2 Common Failures and Fixes


**1. Floating Point Exception (exit code 136)**

| Cause | Diagnosis | Fix |
|-------|-----------|-----|
| Courant number too high | Check `Courant Number max:` in log | Enable `adjustTimeStep yes; maxCo 1;` or reduce `deltaT` |
| Poor mesh quality | Run `checkMesh -allTopology -allGeometry` | Fix cells with non-orthogonality > 70, negative volumes |
| Zero/negative k or epsilon | Check 0/ initial values | Set k > 0 and epsilon > 0 everywhere |
| Bad turbulence initialization | Residuals blow up immediately | Start laminar, then switch to turbulent |

**2. GAMG Solver Divergence**

Symptoms: p residuals stuck near 1.0, or oscillating without decreasing.

| Cause | Fix |
|-------|-----|
| Mesh too coarse | Refine mesh at critical regions |
| Bad relaxation factors | Reduce: p from 0.3 to 0.2, U from 0.7 to 0.5 |
| Non-orthogonal mesh | Increase `nNonOrthogonalCorrectors` to 1-3 |
| GAMG agglomeration failure | Switch to `solver PCG; preconditioner DIC;` for p |

**3. Missing Field/File**

```
FOAM FATAL IO ERROR: cannot find file ... /0/k
```

Fix: ensure all fields required by the turbulence model exist in 0/. See table in Section 1.6.

**4. Boundary Condition Mismatch**

```
FOAM FATAL ERROR: patch type 'xxx' not constraint type ... for patch yyy
```

Fix: patch types in 0/ files must match boundary types in `constant/polyMesh/boundary`. If mesh defines `empty`, all field files must use `empty` for that patch.

**5. Courant Number Blowup (transient)**

```
Courant Number mean: 0.5 max: 150.3
```

| Solver | Acceptable maxCo |
|--------|-------------------|
| icoFoam (PISO) | < 1 (strict) |
| interFoam (VOF) | maxCo < 1, maxAlphaCo < 1 |
| pimpleFoam (nOuterCorrectors > 1) | up to 5-10 |

**6. Convergence Stall (simpleFoam)**

Residuals plateau or oscillate without decreasing.

| Action | How |
|--------|-----|
| Reduce relaxation | U: 0.5-0.7, p: 0.2-0.3 |
| Enable consistent SIMPLE | `consistent yes;` in SIMPLE dict |
| Initialize with potentialFoam | `potentialFoam -writephi` before simpleFoam |
| Check BCs | Ensure mass balance (inlet flux = outlet flux) |

**7. Out of Memory (exit code 137)**

| Action | How |
|--------|-----|
| Reduce mesh | Coarsen or reduce refinement levels |
| Use parallel | `decomposePar` + `mpirun -np N` distributes memory |
| Use binary write | `writeFormat binary;` in controlDict |
| Increase swap | System-level: `sudo fallocate -l 8G /swapfile` |

**8. Parallel Decomposition Errors (exit code 255)**

| Symptom | Fix |
|---------|-----|
| `numberOfSubdomains` mismatch | Must match `-np N` in mpirun |
| Missing processor directories | Run `decomposePar` first |
| Inconsistent mesh across processors | Re-run `decomposePar` |

**9. snappyHexMesh Failures**

| Symptom | Fix |
|---------|-----|
| Empty mesh after castellated step | Check `locationInMesh` is inside domain, not inside geometry |
| Feature edge artifacts | Increase `nFeatureSnapIter` to 10-20 |
| Layer addition failure | Reduce `nSurfaceLayers`, increase `minThickness` |
| STL not found | Check path in `geometry {}` block, use `triSurfaceMesh` type |

**10. Dimension Mismatch**

```
FOAM FATAL ERROR: dimensions not compatible
```

Fix: check `dimensions` line in 0/ field files against the reference table (Section 1.8). Common mistake: using absolute pressure dimensions `[1 -1 -2 0 0 0 0]` instead of kinematic `[0 2 -2 0 0 0 0]` for incompressible solvers.


## 4.3 Mesh Quality Thresholds


| Metric | OK | Warning | Fail |
|--------|-----|---------|------|
| Non-orthogonality max | < 65 | 65-80 | > 80 |
| Skewness | < 4 | 4-10 | > 10 |
| Aspect ratio | < 100 | 100-1000 | > 1000 |
| Min volume | > 0 | near 0 | < 0 (inverted) |
| Min determinant | > 0.001 | 0.0001-0.001 | < 0 |

---

Related Skills

multi-format-transaction-parser

5
from vamseeachanta/workspace-hub

Parse and consolidate financial transaction data across multiple CSV formats and years

multi-format-csv-parser-with-deduplication

5
from vamseeachanta/workspace-hub

Parse brokerage CSV exports that exist in multiple formats with overlapping data across files

multi-format-csv-detection-and-deduplication

5
from vamseeachanta/workspace-hub

Detect and handle multiple CSV format versions from the same data source; deduplicate records across format variants

diagnose-venv-shebang-import-errors

5
from vamseeachanta/workspace-hub

Debugging pattern for ModuleNotFoundError when CLI entry points use wrong Python interpreter

diagnose-shebang-virtualenv-import-errors

5
from vamseeachanta/workspace-hub

Debugging pattern for ModuleNotFoundError when CLI entry points use wrong Python interpreter

diagnose-shebang-venv-import-errors

5
from vamseeachanta/workspace-hub

Troubleshoot ModuleNotFoundError in CLI tools by identifying shebang-venv mismatches

diagnose-dirty-ntfs-mount-errors

5
from vamseeachanta/workspace-hub

Troubleshoot NTFS mount failures by identifying dirty volume flags and driver type

debug-toml-section-scoping-errors

5
from vamseeachanta/workspace-hub

Diagnose and fix TOML configuration errors caused by misplaced key-value pairs in named sections

batch-syntax-repair-from-injection-errors

5
from vamseeachanta/workspace-hub

Detect and fix systematic syntax errors caused by line-injection scripts that split multiline constructs

bash-pipefail-grep-error-handling

5
from vamseeachanta/workspace-hub

Handle grep exit codes safely under set -eo pipefail by isolating pipeline failure scope

core-context-management-response-format-rules

5
from vamseeachanta/workspace-hub

Sub-skill of core-context-management: Response Format Rules (+3).

bash-cli-framework-5-error-handling

5
from vamseeachanta/workspace-hub

Sub-skill of bash-cli-framework: 5. Error Handling (+1).