How to improve PyFluent’s solver UX by shifting focus from solver to user #4765
Pinned
seanpearsonuk
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Context and intent
This discussion is intended as a design reflection, not a call to action.
We have recently opened several GitHub Issues that propose pragmatic, incremental improvements to parts of the PyFluent API (help text, selective renaming, hiding low-value commands, etc.). Those issues are deliberately scoped to “small wins”.
Here, the goal is different.
This discussion is an attempt to step back and articulate what these concrete problems are symptoms of, using a few representative API sections as examples. The hope is to build a shared vocabulary and mental model around why certain parts of the API feel difficult to use, even for experienced Fluent users, and what general design directions might improve solver UX over time.
This is based on only a cursory review of selected API areas. It is almost certain that many relevant examples have been missed, and that the patterns discussed here are more widespread than the specific sections mentioned.
A working hypothesis
A useful way to frame the current PyFluent Solver API is:
This is not presented as a criticism of Fluent’s internals — which are necessarily complex — but as an observation about where the abstraction boundary currently sits.
Much of the API appears to be structured primarily around:
rather than around:
The sections below unpack what this looks like in practice.
Example:
velocity_inlet.momentumas a guiding caseThe
velocity_inlet.momentumsubtree is a useful guiding example, not because it is uniquely problematic, but because it compactly exhibits several recurring patterns.At first glance, “momentum” sounds like a coherent concept. In practice, the section contains:
From a solver implementation perspective, this grouping is understandable: these settings all touch the momentum equations somewhere downstream.
From a user cognition perspective, however, this creates friction:
The result is not merely verbosity, but cognitive overload: users must first reverse-engineer the solver’s internal structure before they can confidently use the API.
Is deep nesting itself a problem?
One question that naturally arises is whether deeply nested objects are themselves an issue.
The short answer: not inherently.
Deep nesting becomes problematic when it coincides with:
In other words, depth amplifies confusion when semantic guidance is missing.
In the current API, “minimal semantic guidance” is not due to a single factor, but to a combination of:
Static API surface vs. meaningful runtime surface
Another recurring pattern is the gap between:
Because most objects and parameters are always visible:
This is not purely a documentation problem.
Better help text is necessary, but not sufficient. Structural cues — such as grouping, naming, and conditional visibility — play a large role in making an API self-documenting.
Solver-oriented structure vs. user-oriented structure
A recurring theme across reviewed sections (
velocity_inlet,species,icing,discrete_phase,virtual_blade_model, etc.) is that structure tends to follow:rather than:
This explains patterns such as:
fensapice_*,geom_*) inside already-scoped groups,From a user perspective, this makes the API feel less like a model of physics and more like a configuration dump.
Progressive disclosure as a design lens
One concept that seems particularly relevant is progressive disclosure.
In this context, it does not simply mean “basic vs. advanced”, but rather:
For example, a user-centric mental model of a velocity inlet might distinguish between:
Even if the underlying solver schema cannot be restructured, the way it is presented and described can still move in this direction.
What this discussion is not
Instead, it is an attempt to articulate why many parts of the API feel harder to use than they need to be, and why incremental improvements (help text, naming, hiding low-value commands) are valuable but incomplete on their own.
Why have this discussion?
The value of this discussion is not in producing immediate action items — those already exist elsewhere — but in:
If PyFluent is to feel increasingly “Pythonic” and user-oriented over time, these questions of abstraction boundaries and mental models will likely matter just as much as individual fixes.
Comments, alternative perspectives, and counter-examples are very welcome.
Beta Was this translation helpful? Give feedback.
All reactions