ansys.fluent.core.parametric#

Classes for locally defining a parametric study for Fluent without running Fluent. The study can then be submitted to be executed in parallel.

Example#

Set up a local study

>>> from ansys.fluent.core.parametric import LocalParametricStudy
>>> local_study = LocalParametricStudy(case_filepath="E:/elbow1_param.cas.h5")
>>> design_point = local_study.design_point("Base DP")
>>> design_point.input_parameters['v1'] = 0.0
>>> for idx in range(1, 20):
>>>   design_point = local_study.add_design_point("dp_"+str(idx))
>>>   design_point.input_parameters['v1'] = float(idx)/10.0

Run in Fluent

>>> local_study.run_in_fluent(5)

Display results

>>> for design_point in local_study.design_point_table:
>>>   for k, v in design_point.input_parameters.items():
>>>     print("input parameter", k, v)
>>>   for k, v in design_point.output_parameters.items():
>>>     print("output parameter", k, v)
>>> print(72 * "-")

Classes:

LocalDesignPoint(design_point_name[, ...])

Purely local version of a design point in a parametric study.

LocalDesignPointTable(base_design_point)

Local version of the design point table in a parametric study.

LocalParametricStudy(case_filepath[, ...])

Local version of a parametric study that manages design points to parametrize a Fluent solver setup.

Functions:

convert_design_point_parameter_units(value)

Convert design point parameter units.

class ansys.fluent.core.parametric.LocalDesignPoint(design_point_name, base_design_point=None)#

Bases: object

Purely local version of a design point in a parametric study.

Parameters:
namestr

Name of the design point.

output_parametersdict

Dictionary of output parameters (name of parameter to value).

input_parametersdict

Dictionary of input parameters (name of parameter to value).

statusDesignPointStatus

Current status of the design point.

Methods:

__init__(design_point_name[, base_design_point])

Initialize LocalDesignPoint.

Attributes:

input_parameters

Get the input parameters.

output_parameters

Get the output parameters.

__init__(design_point_name, base_design_point=None)#

Initialize LocalDesignPoint.

property input_parameters: dict#

Get the input parameters.

property output_parameters: dict#

Get the output parameters.

class ansys.fluent.core.parametric.LocalDesignPointTable(base_design_point)#

Bases: list

Local version of the design point table in a parametric study.

Methods

add_design_point(design_point_name: str) -> DesignPoint

Add a new design point to the table with the provided name.

find_design_point(idx_or_name)

Get a design point, either by name (str) or an index indicating the position in the table (by order of insertion).

remove_design_point(idx_or_name)

Remove a design point, either by name (str) or an index indicating the position in the table (by order of insertion).

Raises:
RuntimeError

If the design point is not found.

Methods:

__init__(base_design_point)

Initialize LocalDesignPointTable.

add_design_point(design_point_name)

Add the design point.

find_design_point(idx_or_name)

Find the design point.

remove_design_point(idx_or_name)

Remove the design point.

__init__(base_design_point)#

Initialize LocalDesignPointTable.

add_design_point(design_point_name)#

Add the design point.

find_design_point(idx_or_name)#

Find the design point.

Raises:
RuntimeError

If the design point is not found.

remove_design_point(idx_or_name)#

Remove the design point.

Raises:
RuntimeError

If the design point can not be removed.

class ansys.fluent.core.parametric.LocalParametricStudy(case_filepath, base_design_point_name='Base DP')#

Bases: object

Local version of a parametric study that manages design points to parametrize a Fluent solver setup.

Methods

add_design_point(design_point_name)

Add a design point.

design_point(idx_or_name)

Get a design point, either by name (str) or an index indicating the position in the table (by order of insertion).

run_in_fluent()

Run the study in Fluent

Raises:
RuntimeError

If the design point is not found.

Methods:

__init__(case_filepath[, base_design_point_name])

Initialize LocalParametricStudy.

add_design_point(design_point_name)

Add the design point.

design_point(idx_or_name)

Get the design point.

run_in_fluent(num_servers[, launcher, ...])

Run the local study in fluent.

__init__(case_filepath, base_design_point_name='Base DP')#

Initialize LocalParametricStudy.

add_design_point(design_point_name)#

Add the design point.

design_point(idx_or_name)#

Get the design point.

run_in_fluent(num_servers, launcher=<function launch_fluent>, start_transcript=False, capture_report_data=False)#

Run the local study in fluent.

ansys.fluent.core.parametric.convert_design_point_parameter_units(value)#

Convert design point parameter units.