Skill detail

ansys-simulation

Simulation engineering specialty.

MatchPossibleReviewed for engineering
Sourcesoljourner/claude-engineering-skillsExternal source
Reported installs29Popularity signal only

Inspect before use

Automated review checks relevance, not safety or endorsement. Read the source instructions before using this skill.

Saved source preview

SKILL.md

The saved excerpt is a snapshot from review. The external source remains the complete and most current version.

---
name: ansys-simulation
description: "Automate ANSYS Fluent CFD simulations via Python scripting and journal files"
category: integrations
domain: fluids
complexity: advanced
dependencies: []
---

# ANSYS Simulation Integration

Comprehensive guide for automating ANSYS Fluent CFD (Computational Fluid Dynamics) simulations using Python scripting, journal files, and the PyAnsys ecosystem.

## Overview

ANSYS Fluent is a leading commercial CFD solver used for simulating fluid flow, heat transfer, and related phenomena in complex geometries. This skill covers automation approaches for:

- **ANSYS Workbench**: Unified platform for CAD integration, meshing, and workflow management
- **ANSYS Fluent**: Advanced CFD solver with extensive physics models
- **PyAnsys**: Python API ecosystem for programmatic control
- **Journal Files**: Text-based scripting for batch operations

## ANSYS Workbench and Fluent Architecture

### ANSYS Workbench
- Project-based workflow environment
- Integrates multiple ANSYS tools (Fluent, CFX, Mechanical, etc.)
- Supports parametric studies and design optimization
- Provides geometry and meshing tools (DesignModeler, SpaceClaim, Meshing)

### ANSYS Fluent
- Finite volume-based CFD solver
- Extensive turbulence models (k-epsilon, k-omega SST, LES, DES)
- Multiphase flow capabilities
- Heat transfer and combustion modeling
- User-defined functions (UDFs) in C
- Text User Interface (TUI) for scripting

## Licensing Requirements

### Commercial Licensing
ANSYS products require commercial licenses managed through the ANSYS License Manager:

- **Fluent License Types**:
  - HPC licenses for parallel computing
  - Solver licenses (increment-based)
  - PrepPost licenses for pre/post-processing

- **License Server Setup**:
  ```bash
  # Set license server environment variable
  export [email protected]

  # Or in Windows
  set [email protected]
  ```

- **License Checkout**: Licenses are checked out when starting Fluent and returned on exit
- **HPC Licensing**: Additional licenses required for parallel runs (typically cores/4)

### Academic Licensing
- Student/teaching licenses available with limitations
- Typically limited mesh size and solver capabilities
- Separate license file required

### Important Notes
- Always verify license availability before batch runs
- Consider license usage in automated workflows
- Use `-t` flag to specify number of processors for HPC licensing

## PyAnsys - Python API Introduction

PyAnsys provides a Pythonic interface to ANSYS products, enabling:
- Remote or local session management
- Programmatic control of simulation setup
- Data extraction and post-processing
- Integration with Python data science stack

### Installation
```bash
# Install PyFluent (for Fluent automation)
pip install ansys-fluent-core

# Install other PyAnsys packages as needed
pip install ansys-mapdl-core      # For Mechanical
pip install ansys-dpf-core        # For post-processing
pip install ansys-geometry        # For geometry operations
```

### Basic PyFluent Usage
```python
from ansys.fluent.core import launch_fluent

# Launch Fluent session
session = launch_fluent(precision='double', processor_count=4, mode='solver')

# Access TUI commands
session.tui.file.read_case('case_file.cas')

# Execute commands
session.tui.solve.iterate(100)

# Clean exit
session.exit()
```

### Key PyAnsys Components
- **ansys-fluent-core**: Main Fluent automation package
- **ansys-fluent-visualization**: Post-processing and visualization
- **ansys-geometry**: CAD operations and geometry manipulation
- **ansys-meshing**: Automated meshing workflows

## Journal File Scripting

Journal files are text-based scripts containing TUI commands executed sequentially by Fluent.

### Journal File Format
```scheme
; Comments start with semicolon
; Commands follow TUI menu structure

/file/read-case case_file.cas

/solve/initialize/initialize-flow
/solve/iterate 1000

/fi
Read the full source on GitHub (opens external page)
Context

Related work