reduction#
Module providing reductions functions that can be applied to Fluent data from one or across multiple remote Fluent sessions.
The following parameters are relevant for the reduction functions. The expr parameter is not relevant to all reductions functions.
Parameters#
- exprAny
Expression that can be either a string or an instance of a specific settings API named_expressions object. The expression can be a field variable or a a valid Fluent expression. A specified named expression can be handled for multiple solvers as long as the expression’s definition is valid in each solver (it does not need to be created in each solver)
- locationsAny
A list of location strings, or an API object that can be resolved to a list of location strings (e.g., setup.boundary_conditions, or results.surfaces.plane_surface), or a list of such objects. If location strings are included in the list, then only string must be included
- ctxtAny, optional
An optional API object (e.g., the root solver session object but any solver API object will suffice) to set the context of the call’s execution. If the location objects are strings, then such a context is required
Returns#
- float or List[float]
The result of the reduction
Examples#
>>> from ansys.fluent.core.solver.function import reduction
>>> # Compute the area average of absolute pressure across all boundary
>>> # condition surfaces of the given solver
>>> reduction.area_average(
... expr = "AbsolutePressure",
... locations = solver.setup.boundary_conditions.velocity_inlet
... )
10623.0
>>> from ansys.fluent.core.solver.function import reduction
>>> # Compute the minimum of the square of velocity magnitude
>>> # for all pressure outlets across two solvers
>>> named_exprs = solver1.setup.named_expressions
>>> vsquared = named_exprs["vsquared"] = {}
>>> vsquared.definition = "VelocityMagnitude ** 2"
>>> reduction.minimum(
... expr = vsquared,
... locations = [
... solver1.setup.boundary_conditions.pressure_outlet,
... solver2.setup.boundary_conditions.pressure_outlet
... ])
19.28151
Functions
|
Compute the total area of the specified locations. |
|
Compute the area averaged value of the specified expression over the specified locations. |
|
Compute the area integrated averaged of the specified expression over the specified locations. |
|
Compute the geometric centroid of the specified location(s) as a vector. |
|
Compute the total number of cells included in the specified locations. |
|
Compute the force acting on the location(s) specified (should be walls) as a vector. |
|
Compute the mass-weighted average value of the specified expression over the specified locations. |
|
Compute the total mass flow rate of the specified locations. |
|
Compute the mass-flow-weighted average value of the specified expression over the specified locations. |
|
Compute the total mass flow over the specified locations. |
|
Compute the total mass-weighted value of the specified expression over the specified locations. |
|
Compute the maximum of the specified expression over the specified locations. |
|
Compute the minimum of the specified expression over the specified locations. |
|
Compute the moment vector about the specified point (which can be single-valued expression) for the specified location(s). |
|
Compute the pressure force acting on the location(s) specified (should be walls) as a vector. |
|
Compute the viscous force acting on the location(s) specified (should be walls) as a vector. |
|
Compute the total volume of the specified locations. |
|
Compute the volume-weighted average value of the specified expression over the specified locations. |
|
Compute the volume-weighted total of the specified expression over the specified locations. |
Exceptions
|