Skip to main content

Neural-network surrogate models for ANSYS Fluent simulations.

Project description

CFDTwin

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.Project methods.

Docs: https://uark-ned3.github.io/CFDTwin/

GUI walkthrough (4-part video series):

  1. Introduction and Case Assignment
  2. Case Input and Output Setup
  3. DOE Setup and Batch Simulation
  4. NN Training and Model Validation

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.batCopy, 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:

  1. Setup — pick .cas file, set Fluent options, define inputs and outputs
  2. DOE — generate LHS/factorial samples
  3. Simulate — batch-run Fluent with live progress
  4. Train — transfer-list filter, live loss curves, per-output NN
  5. 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

cfdtwin-0.2.1.tar.gz (922.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cfdtwin-0.2.1-py3-none-any.whl (517.7 kB view details)

Uploaded Python 3

File details

Details for the file cfdtwin-0.2.1.tar.gz.

File metadata

  • Download URL: cfdtwin-0.2.1.tar.gz
  • Upload date:
  • Size: 922.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cfdtwin-0.2.1.tar.gz
Algorithm Hash digest
SHA256 6d7bd90bd6f8cfda561e666ba88ff9c7b8368a971df2c6430a8ec73972e78b9a
MD5 d021eb9ff86245b275397b797528ca2d
BLAKE2b-256 4b0f3e476f586ac2fcf1c5c0a545e16ab63d51b77b06533a4bd492b069b18534

See more details on using hashes here.

Provenance

The following attestation bundles were made for cfdtwin-0.2.1.tar.gz:

Publisher: publish.yml on UARK-NED3/CFDTwin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cfdtwin-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: cfdtwin-0.2.1-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

Hashes for cfdtwin-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0624c5d0c30e793afd9c9727e9eb8e8b713ea2ac0a48dd25c4b011434b7e95e9
MD5 3c38a9447f0e7c78e816059d04b76da5
BLAKE2b-256 5a93cd000689fc7e6cdd3637a9e8be7636cecf5a6059b3ac50c1734f0eb084c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for cfdtwin-0.2.1-py3-none-any.whl:

Publisher: publish.yml on UARK-NED3/CFDTwin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page