Neural-network surrogate models for ANSYS Fluent simulations.
Project description
Build neural-network surrogate models from ANSYS Fluent simulations. Two interfaces, one pipeline:
- GUI — wizard-based desktop app: Setup → DOE → Simulate → Train → Analyze.
- API — Python library exposing the same pipeline as
cfdtwin.Projectmethods.
Docs: https://uark-ned3.github.io/CFDTwin/
GUI walkthrough (3-part video series):
- Introduction, Project Creation, Case File Assignment
- DOE Setup, Batch Simulation, NN Training
- Model Metrics and Inference Analysis
Install
Requires Python 3.10+ and a working ANSYS Fluent installation. Three install paths:
| Command | What you get |
|---|---|
pip install cfdtwin |
API only (no Qt) |
pip install cfdtwin[gui] |
API and desktop GUI |
git clone … && pip install -e .[dev] |
API, GUI, examples, and tests |
pip install cfdtwin # API only
pip install cfdtwin[gui] # adds the desktop GUI
git clone https://github.com/UARK-NED3/CFDTwin && cd CFDTwin && pip install -e .[dev]
Running cfdtwin-gui after an API-only install prints an instruction to
install the [gui] extra rather than raising ImportError.
Use the GUI
Installed via pip (pip install cfdtwin[gui]): launch from any terminal.
cfdtwin-gui
From a repo clone: run as a module, or double-click the launcher script on Windows for a click-to-launch experience without a terminal window.
python -m gui # any platform
double-click scripts/launch_gui.bat # Windows
To create a Desktop launcher on Windows: right-click scripts/launch_gui.bat
→ Copy, then right-click the Desktop → Paste shortcut. To set the
CFDTwin icon, right-click the shortcut → Properties → Change Icon → browse
to gui/assets/logo_icon.png. (scripts/launch_gui.bat ships only in the
repo; pip installs use the cfdtwin-gui command above.)
On launch, select or create a project. Sidebar steps unlock as their prerequisites are met:
- Setup — pick
.casfile, set Fluent options, define inputs and outputs - DOE — generate LHS/factorial samples
- Simulate — batch-run Fluent with live progress
- Train — transfer-list filter, live loss curves, per-output NN
- Analyze — metrics dashboard, predictions, Fluent comparison with caching
Use the API
The same pipeline driven from a Python script, useful for automation and parameter sweeps:
import cfdtwin
project = cfdtwin.Project.create("./elbow_study", name="elbow_v1")
project.set_case_file("mixing_elbow.cas.h5")
project.set_inputs({
"cold-inlet|momentum > velocity_magnitude": (0.2, 0.6),
"hot-inlet|momentum > velocity_magnitude": (0.4, 1.2),
})
project.set_outputs([
{"name": "outlet", "category": "Surface",
"field_variables": ["temperature"]},
])
project.generate_doe(n=20, method="lhs")
project.connect_fluent(precision="single") # mixing_elbow is a single-precision case
project.run_simulations()
project.train(model_name="run1")
pred = project.predict("run1", {
"cold-inlet|momentum > velocity_magnitude": 0.4,
"hot-inlet|momentum > velocity_magnitude": 0.8,
})
print(pred.values.shape)
Runnable scripts live in docs/examples/: quickstart,
full workflow, training tuning, and a discovery script for unfamiliar case
files. Inlined online at
https://uark-ned3.github.io/CFDTwin/examples/.
License
MIT. See LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cfdtwin-0.2.2.tar.gz.
File metadata
- Download URL: cfdtwin-0.2.2.tar.gz
- Upload date:
- Size: 923.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f213efaaaaedf137d8f7853a1834b1d60c88e33195e6804e924b57dae97c14b9
|
|
| MD5 |
f8b67c0ae524b86af692b6a30eeeee50
|
|
| BLAKE2b-256 |
07d0c1fb84d92765223928801532aaac0c808025744b5efe5b46713331c7932b
|
Provenance
The following attestation bundles were made for cfdtwin-0.2.2.tar.gz:
Publisher:
publish.yml on UARK-NED3/CFDTwin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cfdtwin-0.2.2.tar.gz -
Subject digest:
f213efaaaaedf137d8f7853a1834b1d60c88e33195e6804e924b57dae97c14b9 - Sigstore transparency entry: 1563764453
- Sigstore integration time:
-
Permalink:
UARK-NED3/CFDTwin@dabe4d67d086c4a8a5d7e457acd75cd4af818d24 -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/UARK-NED3
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@dabe4d67d086c4a8a5d7e457acd75cd4af818d24 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cfdtwin-0.2.2-py3-none-any.whl.
File metadata
- Download URL: cfdtwin-0.2.2-py3-none-any.whl
- Upload date:
- Size: 519.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12a9bc63e14d2dbed61af567de050c1b49875f424934c87da99f81d3c8111540
|
|
| MD5 |
302962bd86977db0798b96738592d0e1
|
|
| BLAKE2b-256 |
6b9dd82be40610ea46c83c03009a803d1e2947366d9b6c7f27d1295d2a86ba10
|
Provenance
The following attestation bundles were made for cfdtwin-0.2.2-py3-none-any.whl:
Publisher:
publish.yml on UARK-NED3/CFDTwin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cfdtwin-0.2.2-py3-none-any.whl -
Subject digest:
12a9bc63e14d2dbed61af567de050c1b49875f424934c87da99f81d3c8111540 - Sigstore transparency entry: 1563764458
- Sigstore integration time:
-
Permalink:
UARK-NED3/CFDTwin@dabe4d67d086c4a8a5d7e457acd75cd4af818d24 -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/UARK-NED3
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@dabe4d67d086c4a8a5d7e457acd75cd4af818d24 -
Trigger Event:
push
-
Statement type: