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 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):

  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 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:

  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

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.

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.0.tar.gz (922.0 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.0-py3-none-any.whl (517.7 kB view details)

Uploaded Python 3

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

Hashes for cfdtwin-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1d3c292b6a4787615c529ff9faa2887ebe038b533d0764ed8f3292407bec7c72
MD5 657fc33deb595dfc67e108e40f4ab80e
BLAKE2b-256 174021dd6e30fe94db91b7efe90f4badd4c106021b4c4a165266372929ba66f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for cfdtwin-0.2.0.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.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

Hashes for cfdtwin-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 077b4225b12bde5b2ab9b044812c8cd20550295589b42d3eeb8fa2901ab87000
MD5 69f30e4cc6dd9bec4348a5c3bbb9cb2b
BLAKE2b-256 bb9f330b00df4e8d968af9e52688d0cf43490f6b684a2fa67fc2fc1fe8a9b202

See more details on using hashes here.

Provenance

The following attestation bundles were made for cfdtwin-0.2.0-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