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 (video): coming soon

Install

Requires Python 3.10+ and a working ANSYS Fluent installation.

pip install cfdtwin                  # from PyPI (released)
pip install -e .[dev]                # from a clone, with test deps

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.1.0.tar.gz (920.2 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.1.0-py3-none-any.whl (516.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cfdtwin-0.1.0.tar.gz
Algorithm Hash digest
SHA256 596e4c3aa85dbd0790c3b4db90f8be5d02a98e9b98f2e05252ea9be4d7bdb8b7
MD5 32e6b80ca80ad0493369c70698868f75
BLAKE2b-256 de9eb19e2839bd456eb378930d5b0683f8c1304d562d46f780c039f2cdca8ee7

See more details on using hashes here.

Provenance

The following attestation bundles were made for cfdtwin-0.1.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.1.0-py3-none-any.whl.

File metadata

  • Download URL: cfdtwin-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 516.6 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3891cdbb8c0565059cc1ef71bbf6e52371c57cc2a23a89cb0ab001e2a8462a79
MD5 f7c8bb6d5ec1c7e030824f14756e9f68
BLAKE2b-256 4239f5e5c6aaab23400d1bbd6952d3a34761e325c2f16c7c7073228ba66dd499

See more details on using hashes here.

Provenance

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