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:
|
Purely local version of a design point in a parametric study. |
|
Local version of the design point table in a parametric study. |
|
Local version of a parametric study that manages design points to parametrize a Fluent solver setup. |
Functions:
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:
Methods:
__init__
(design_point_name[, base_design_point])Attributes:
Get the input parameters.
Get the output parameters.
- __init__(design_point_name, base_design_point=None)#
- class ansys.fluent.core.parametric.LocalDesignPointTable(base_design_point)#
Bases:
list
Local version of the design point table in a parametric study.
- Raises:
RuntimeError
If the design point is not found.
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).
Methods:
__init__
(base_design_point)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)#
- 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.
- Raises:
RuntimeError
If the design point is not found.
Methods
run_in_fluent
(num_servers[, launcher, ...])Run the local study in fluent.
add_design_point(design_point_name: str) -> LocalDesignPoint
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 the study in Fluent
Methods:
__init__
(case_filepath[, base_design_point_name])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')#
- 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.