PathFamily#
- class ansys.fluent.mcp.solve.lib.utl.PathFamily#
Translate semantic operations into mode-appropriate Fluent paths.
Recipes that want to be mode-agnostic build paths through this helper rather than hard-coding
setup.boundary_conditions.…. Thefrom_active()classmethod picks the correct family given a live UTL flag:family = PathFamily.from_active(ctx.utl_enabled) for path, value in family.wall_thermal_temperature("hw", 423): cx.set(path, value)
All helpers return a list of (path, value) tuples — even single- write operations — because the UTL form for some BC attributes requires two writes (condition + value) where the standard form needs only one.
Overview#
Create the wrapper from the active solver session. |
Root path for boundary-condition families (wall, inlet, …). |
|
Root path for cell-zone families (fluid, solid). |
|
Root path for mesh interfaces. |
|
Return the indexed BC node path. |
|
Resolve the child zone path for the requested zone. |
|
Set a wall to fixed-temperature BC and assign the value. |
|
Set a wall to Mixed convection+radiation. |
|
Configure wall thermal convection settings. |
|
Configure velocity-inlet speed settings. |
|
Configure velocity-inlet temperature settings. |
|
Bind a volume report-definition to its zones / physics groups. |
|
Build the kwargs dict for |
|
Group multiple cell zones into a single UTL physics volume. |
|
Split a UTL physics volume by extracting some zones into a new physics volume. |
|
Create a mesh interface via the UTL command form. UTL only. |
|
Auto-create interfaces from coincident boundary pairs. UTL only. |
Return whether utl. |
Import detail#
from ansys.fluent.mcp.solve.lib.utl import PathFamily
Property detail#
Attribute detail#
- PathFamily.kind: FamilyKind#
Method detail#
- classmethod PathFamily.from_active(utl_enabled: bool | None) PathFamily#
Create the wrapper from the active solver session.
- PathFamily.boundaries_root() str#
Root path for boundary-condition families (wall, inlet, …).
- Returns:
strString result produced by the function.
- PathFamily.volumes_root() str#
Root path for cell-zone families (fluid, solid).
- Returns:
strString result produced by the function.
- PathFamily.interfaces_root() str#
Root path for mesh interfaces.
Note: the two forms are not structurally equivalent — the standard form is a NamedObject collection (
setup.mesh_interfaces.interface[name]) while UTL exposes a command collection (setup.physics.interfaces.create,.auto_create). Callers that need to create an interface should useinterface_create_call()instead.- Returns:
strString result produced by the function.
- PathFamily.bc_path(family: str, name: str) str#
Return the indexed BC node path.
- Parameters:
- Returns:
strString result produced by the function.
Examples
UTL mode
>>> family = PathFamily.from_active(utl_enabled=True) >>> output = family.bc_path("wall", "hw") >>> print(output)
setup.physics.boundaries.wall[‘hw’]
Standard mode
>>> family = PathFamily.from_active(utl_enabled=False) >>> output = family.bc_path("wall", "hw") >>> print(output)
setup.boundary_conditions.wall[‘hw’]
- PathFamily.wall_thermal_temperature(name: str, value: float) list[tuple[str, Any]]#
Set a wall to fixed-temperature BC and assign the value.
Returns paired (path, value) writes. Both modes use the same v27.1 canonical sub-paths (
.thermal.thermal_conditionand.thermal.temperature.value); only the root prefix and the enum casing differ between standard and UTL.
- PathFamily.wall_thermal_mixed(name: str, *, htc: float, ext_temp: float) list[tuple[str, Any]]#
Set a wall to Mixed convection+radiation.
- PathFamily.wall_thermal_convection(name: str, *, htc: float) list[tuple[str, Any]]#
Configure wall thermal convection settings.
- PathFamily.velocity_inlet_speed(name: str, value: float) list[tuple[str, Any]]#
Configure velocity-inlet speed settings.
- PathFamily.velocity_inlet_temperature(name: str, value: float) list[tuple[str, Any]]#
Configure velocity-inlet temperature settings.
- PathFamily.report_volume_selector(report_name: str, zones_or_groups: list[str]) list[tuple[str, Any]]#
Bind a volume report-definition to its zones / physics groups.
Standard: writes to
…[r].cell_zones. UTL: writes to…[r].locations.physics.
- PathFamily.surface_integral_args(zones_or_groups: list[str], *, report_of: str | None = None, write_to_file: bool = False, file_name: str | None = None, append_data: bool = False) dict[str, Any]#
Build the kwargs dict for
surface_integrals..(…) Standard:
surface_names=[…]. UTL:locations={'surfaces': [], 'physics': [...]}.- Parameters:
- Returns:
- PathFamily.utl_volume_set_location(family: str, name: str, locations: list[str]) tuple[str, dict[str, Any]]#
Group multiple cell zones into a single UTL physics volume.
Returns
(method_path, args)for acallstep. UTL only. RaisesValueErrorin standard mode — callers should checkis_utlor mark their reciperequires_utl=True.
- PathFamily.utl_volume_split(family: str, src_name: str, *, into: list[str], new_name: str) tuple[str, dict[str, Any]]#
Split a UTL physics volume by extracting some zones into a new physics volume.
Only available in UTL mode.
- PathFamily.utl_interface_create_call(*, name: str, boundary_1: str, boundary_2: str, intf_type: str = 'wall', mesh_connectivity: str = 'non-conformal', periodicity: str = 'none') tuple[str, dict[str, Any]]#
Create a mesh interface via the UTL command form. UTL only.
- Parameters:
- name
str Name of the object, module, or setting being processed.
- boundary_1
str Boundary 1 to supply to the function.
- boundary_2
str Boundary 2 to supply to the function.
- intf_type
str Intf type to supply to the function.
- mesh_connectivity
str Mesh connectivity to supply to the function.
- periodicity
str Periodicity to supply to the function.
- name
- Returns: