offline#
Offline tools for PyFluent.
This module provides standalone utilities that work without a running Fluent
session, including an in-house case file reader (CaseFile) and data
file reader (DataFile), as well as a local parametric study
(LocalParametricStudy).
Classes:
|
Class to read a Fluent case file. |
|
Class to read a Fluent case file. |
|
Local version of a parametric study that manages design points to parametrize a Fluent solver setup. |
- class ansys.fluent.core.offline.CaseFile(case_file_name=None, project_file_name=None)#
Bases:
RPVarProcessorClass to read a Fluent case file.
Methods
get_mesh()
Get the mesh data.
Methods:
__init__([case_file_name, project_file_name])Initialize a CaseFile object.
get_mesh()Get the mesh data.
- __init__(case_file_name=None, project_file_name=None)#
Initialize a CaseFile object. Exactly one file path argument must be specified.
- Parameters:
- case_file_name
os.PathLike|str|None The path of a case file.
- project_file_name
os.PathLike|str|None The path of a project file from which the case file is selected.
- case_file_name
- get_mesh()#
Get the mesh data.
- class ansys.fluent.core.offline.DataFile(data_file_name=None, project_file_name=None, case_file_handle=None)#
Bases:
objectClass to read a Fluent case file.
Methods
case_file()
Get the name of case file.
get_phases()
Get the list of phases.
get_face_variables(phase_name)
Get the variables list available at face.
get_cell_variables(phase_name)
Get the variables list available at cell.
get_face_scalar_field_data(phase_name, field_name, surface_id)
Get the scalar field data for face.
get_face_vector_field_data(phase_name, surface_id)
Get the vector field data for face.
Methods:
__init__([data_file_name, ...])__init__ method of CaseFile class.
get_cell_variables(phase_name)Extracts cell variables available for a particular phase.
get_face_scalar_field_data(phase_name, ...)Gets scalar field data for face.
get_face_variables(phase_name)Extracts face variables available for a particular phase.
get_face_vector_field_data(phase_name, ...)Gets vector field data for face.
Returns list of phases available.
Returns all associated data variables in form of a dictionary.
Attributes:
Returns the name of the associated case file in string format.
- __init__(data_file_name=None, project_file_name=None, case_file_handle=None)#
__init__ method of CaseFile class.
- get_cell_variables(phase_name)#
Extracts cell variables available for a particular phase.
- Parameters:
- phase_name
str Name of the phase.
- phase_name
- Returns:
Listofcellvariables.
- get_face_scalar_field_data(phase_name, field_name, surface_id)#
Gets scalar field data for face.
- get_face_variables(phase_name)#
Extracts face variables available for a particular phase.
- Parameters:
- phase_name
str Name of the phase.
- phase_name
- Returns:
Listoffacevariables.
- get_face_vector_field_data(phase_name, surface_id)#
Gets vector field data for face.
- get_phases()#
Returns list of phases available.
- variables()#
Returns all associated data variables in form of a dictionary.
- class ansys.fluent.core.offline.LocalParametricStudy(case_filepath, base_design_point_name='Base DP')#
Bases:
objectLocal 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:
RuntimeErrorIf 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=None, start_transcript=False, capture_report_data=False)#
Run the local study in fluent.