Neural-network surrogate models for ANSYS Fluent simulations.
Project description
Build neural-network surrogate models from ANSYS Fluent simulations. Two ways to drive the same pipeline:
- GUI — wizard-based desktop app, click through Setup → DOE → Simulate → Train → Analyze.
- API — Python library, the same pipeline as ten method calls in a script.
Docs: https://uark-ned3.github.io/CFDTwin/
GUI walkthrough (4-part video series):
- Introduction and Case Assignment
- Case Input and Output Setup
- DOE Setup and Batch Simulation
- NN Training and Model Validation
Install
Requires Python 3.10+ and a working ANSYS Fluent installation. Three paths depending on what you want:
| Command | What you get | Best for |
|---|---|---|
pip install cfdtwin |
API only (no Qt; ~80 MB smaller) | Headless / HPC / scripted surrogate sweeps |
pip install cfdtwin[gui] |
API + desktop GUI | Engineers who want the wizard, no git needed |
git clone … && pip install -e .[dev] |
Everything + examples + tests + tools | Contributors, tutorial learners, tinkerers |
pip install cfdtwin # API only
pip install cfdtwin[gui] # adds the wizard-based desktop app
git clone https://github.com/UARK-NED3/CFDTwin && cd CFDTwin && pip install -e .[dev]
If you pip install cfdtwin (no [gui]) and then run cfdtwin-gui, you'll
get a friendly hint to install the GUI extra — no opaque ImportError.
Runnable examples live in docs/examples/ — only available
in a clone, or browse them online: https://uark-ned3.github.io/CFDTwin/examples/
Use the GUI
Three ways to launch, pick whichever you prefer:
cfdtwin-gui # any terminal, after pip install
python -m gui # from a repo clone, no install needed
double-click scripts/launch_gui.bat # Windows, no terminal pops up
To put a launcher on your Desktop (Windows): right-click scripts/launch_gui.bat,
Copy, then right-click your Desktop and Paste shortcut. Optionally
right-click the shortcut → Properties → Change Icon → browse to
gui/assets/logo_icon.png for the CFDTwin logo.
On launch, select or create a project. The sidebar steps unlock as 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
Same pipeline from a Python script — useful for automation, parameter sweeps, or building bigger surrogate libraries:
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 "what BCs / parameters does my case
expose?" discovery script.
- API reference — every method, every argument
- Tutorials — narrative walk-throughs
- Quickstart — smallest end-to-end script
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.0.tar.gz.
File metadata
- Download URL: cfdtwin-0.2.0.tar.gz
- Upload date:
- Size: 922.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d3c292b6a4787615c529ff9faa2887ebe038b533d0764ed8f3292407bec7c72
|
|
| MD5 |
657fc33deb595dfc67e108e40f4ab80e
|
|
| BLAKE2b-256 |
174021dd6e30fe94db91b7efe90f4badd4c106021b4c4a165266372929ba66f6
|
Provenance
The following attestation bundles were made for cfdtwin-0.2.0.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.0.tar.gz -
Subject digest:
1d3c292b6a4787615c529ff9faa2887ebe038b533d0764ed8f3292407bec7c72 - Sigstore transparency entry: 1555542871
- Sigstore integration time:
-
Permalink:
UARK-NED3/CFDTwin@1f215326db5fc66d6dfbe5942633c13f5e199278 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/UARK-NED3
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1f215326db5fc66d6dfbe5942633c13f5e199278 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cfdtwin-0.2.0-py3-none-any.whl.
File metadata
- Download URL: cfdtwin-0.2.0-py3-none-any.whl
- Upload date:
- Size: 517.7 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 |
077b4225b12bde5b2ab9b044812c8cd20550295589b42d3eeb8fa2901ab87000
|
|
| MD5 |
69f30e4cc6dd9bec4348a5c3bbb9cb2b
|
|
| BLAKE2b-256 |
bb9f330b00df4e8d968af9e52688d0cf43490f6b684a2fa67fc2fc1fe8a9b202
|
Provenance
The following attestation bundles were made for cfdtwin-0.2.0-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.0-py3-none-any.whl -
Subject digest:
077b4225b12bde5b2ab9b044812c8cd20550295589b42d3eeb8fa2901ab87000 - Sigstore transparency entry: 1555543002
- Sigstore integration time:
-
Permalink:
UARK-NED3/CFDTwin@1f215326db5fc66d6dfbe5942633c13f5e199278 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/UARK-NED3
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1f215326db5fc66d6dfbe5942633c13f5e199278 -
Trigger Event:
push
-
Statement type: