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.…. The from_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#

from_active

Create the wrapper from the active solver session.

boundaries_root

Root path for boundary-condition families (wall, inlet, …).

volumes_root

Root path for cell-zone families (fluid, solid).

interfaces_root

Root path for mesh interfaces.

bc_path

Return the indexed BC node path.

cz_path

Resolve the child zone path for the requested zone.

wall_thermal_temperature

Set a wall to fixed-temperature BC and assign the value.

wall_thermal_mixed

Set a wall to Mixed convection+radiation.

wall_thermal_convection

Configure wall thermal convection settings.

velocity_inlet_speed

Configure velocity-inlet speed settings.

velocity_inlet_temperature

Configure velocity-inlet temperature settings.

report_volume_selector

Bind a volume report-definition to its zones / physics groups.

surface_integral_args

Build the kwargs dict for surface_integrals.(…).

utl_volume_set_location

Group multiple cell zones into a single UTL physics volume.

utl_volume_split

Split a UTL physics volume by extracting some zones into a new physics volume.

utl_interface_create_call

Create a mesh interface via the UTL command form. UTL only.

utl_interface_auto_create

Auto-create interfaces from coincident boundary pairs. UTL only.

is_utl

Return whether utl.

Import detail#

from ansys.fluent.mcp.solve.lib.utl import PathFamily

Property detail#

property PathFamily.is_utl: bool#

Return whether utl.

Returns:
bool

Boolean result of the operation.

Attribute detail#

PathFamily.kind: FamilyKind#

Method detail#

classmethod PathFamily.from_active(utl_enabled: bool | None) PathFamily#

Create the wrapper from the active solver session.

Parameters:
utl_enabledbool | None

Utl enabled to supply to the function.

Returns:
‘PathFamily’

‘PathFamily’ produced by the operation.

PathFamily.boundaries_root() str#

Root path for boundary-condition families (wall, inlet, …).

Returns:
str

String result produced by the function.

PathFamily.volumes_root() str#

Root path for cell-zone families (fluid, solid).

Returns:
str

String 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 use interface_create_call() instead.

Returns:
str

String result produced by the function.

PathFamily.bc_path(family: str, name: str) str#

Return the indexed BC node path.

Parameters:
familystr

Family to supply to the function.

namestr

Name of the object, module, or setting being processed.

Returns:
str

String 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.cz_path(family: str, name: str) str#

Resolve the child zone path for the requested zone.

Parameters:
familystr

Family to supply to the function.

namestr

Name of the object, module, or setting being processed.

Returns:
str

String value produced by the helper.

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_condition and .thermal.temperature.value); only the root prefix and the enum casing differ between standard and UTL.

Parameters:
namestr

Name of the object, module, or setting being processed.

valuefloat

Value to supply to the function.

Returns:
list[tuple[str, Any]]

Collection containing the operation results.

PathFamily.wall_thermal_mixed(name: str, *, htc: float, ext_temp: float) list[tuple[str, Any]]#

Set a wall to Mixed convection+radiation.

Parameters:
namestr

Name of the object, module, or setting being processed.

htcfloat

Htc to supply to the function.

ext_tempfloat

Ext temp to supply to the function.

Returns:
list[tuple[str, Any]]

Collection containing the operation results.

PathFamily.wall_thermal_convection(name: str, *, htc: float) list[tuple[str, Any]]#

Configure wall thermal convection settings.

Parameters:
namestr

Name of the object, module, or setting being processed.

htcfloat

Htc to supply to the function.

Returns:
list[tuple[str, Any]]

List of results produced by the operation.

PathFamily.velocity_inlet_speed(name: str, value: float) list[tuple[str, Any]]#

Configure velocity-inlet speed settings.

Parameters:
namestr

Name of the object, module, or setting being processed.

valuefloat

Value to inspect, convert, or store.

Returns:
list[tuple[str, Any]]

List of results produced by the operation.

PathFamily.velocity_inlet_temperature(name: str, value: float) list[tuple[str, Any]]#

Configure velocity-inlet temperature settings.

Parameters:
namestr

Name of the object, module, or setting being processed.

valuefloat

Value to inspect, convert, or store.

Returns:
list[tuple[str, Any]]

List of results produced by the operation.

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.

Parameters:
report_namestr

Report name to supply to the function.

zones_or_groupslist[str]

Zones or groups to supply to the function.

Returns:
list[tuple[str, Any]]

Collection containing the operation results.

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:
zones_or_groupslist[str]

Zones or groups to supply to the function.

report_ofstr | None

Report of to supply to the function.

write_to_filebool

Write to file to supply to the function.

file_namestr | None

File name to supply to the function.

append_databool

Append data to supply to the function.

Returns:
dict[str, Any]

Mapping containing the operation result.

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 a call step. UTL only. Raises ValueError in standard mode — callers should check is_utl or mark their recipe requires_utl=True.

Parameters:
familystr

Family to supply to the function.

namestr

Name of the object, module, or setting being processed.

locationslist[str]

Locations to supply to the function.

Returns:
tuple[str, dict[str, Any]]

Mapping containing the operation result.

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.

Parameters:
familystr

Family to supply to the function.

src_namestr

Src name to supply to the function.

intolist[str]

Into to supply to the function.

new_namestr

New name to supply to the function.

Returns:
tuple[str, dict[str, Any]]

Mapping containing the operation result.

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

Name of the object, module, or setting being processed.

boundary_1str

Boundary 1 to supply to the function.

boundary_2str

Boundary 2 to supply to the function.

intf_typestr

Intf type to supply to the function.

mesh_connectivitystr

Mesh connectivity to supply to the function.

periodicitystr

Periodicity to supply to the function.

Returns:
tuple[str, dict[str, Any]]

Mapping containing the operation result.

PathFamily.utl_interface_auto_create() tuple[str, dict[str, Any]]#

Auto-create interfaces from coincident boundary pairs. UTL only.

Returns:
tuple[str, dict[str, Any]]

Mapping containing the operation result.