Skill 详情

ansys-simulation

Simulation engineering specialty.

匹配类型可能匹配已针对 工程 审核
来源soljourner/claude-engineering-skills外部来源
报告安装量29仅表示受欢迎程度

使用前先检查

自动化审核只检查相关性,不代表安全审查或推荐。使用前请阅读来源中的说明。

已保存的来源预览

SKILL.md

这段内容是审核时保存的快照。外部来源才是完整且最新的版本。

---
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
在 GitHub 阅读完整来源 (打开外部页面)
相关上下文

相关工作