abstract_field_data#
Abstract contracts for Fluent field-data transports and sources.
Classes:
Abstract base class for the field data service. |
|
Abstract contract for a user-facing field-data source. |
|
Abstract contract for collecting and executing field-data requests. |
|
Abstract contract for a field-data source that supports batching. |
- class ansys.fluent.core.fields.field_data.abstract_field_data.AbstractFieldData#
Bases:
ABCAbstract base class for the field data service.
Methods:
extract_fields(chunk_iterator)Extract fields from the chunk iterator.
Get the batched fields from the service.
get_scalar_field_range(field[, node_value, ...])Get the range (minimum and maximum values) of the field.
Get fields information (field name, domain, and section).
get_solver_mesh_elements(domain_id, thread_id)Get mesh elements.
get_solver_mesh_nodes_double(domain_id, ...)Get mesh node -> double precision.
get_solver_mesh_nodes_float(domain_id, thread_id)Get mesh node -> floating point precision.
Get surfaces information (surface name, ID, and type).
Get vector fields information (vector components).
- abstract extract_fields(chunk_iterator)#
Extract fields from the chunk iterator.
- abstract get_batched_fields()#
Get the batched fields from the service.
- abstract get_scalar_field_range(field, node_value=False, surface_ids=None)#
Get the range (minimum and maximum values) of the field.
- abstract get_scalar_fields_info()#
Get fields information (field name, domain, and section).
- Returns:
Dict
- abstract get_solver_mesh_nodes_double(domain_id, thread_id)#
Get mesh node -> double precision.
- Returns:
List[float]
- abstract get_solver_mesh_nodes_float(domain_id, thread_id)#
Get mesh node -> floating point precision.
- Returns:
List[float]
- abstract get_surfaces_info()#
Get surfaces information (surface name, ID, and type).
- Returns:
Dict
- abstract get_vector_fields_info()#
Get vector fields information (vector components).
- Returns:
Dict
- class ansys.fluent.core.fields.field_data.abstract_field_data.BaseFieldDataSource#
Bases:
ABCAbstract contract for a user-facing field-data source.
This contract belongs to the wrapper layer, not to a transport service. It describes how callers resolve surfaces and retrieve data after a transport specific
AbstractFieldDataimplementation has been connected.LiveFieldDatais the standard implementation.Methods:
get_field_data(obj)Retrieve the field data for a given request.
get_surface_ids(surfaces)Retrieve a list of surface IDs based on input surface names or numerical identifiers.
- abstract get_field_data(obj)#
Retrieve the field data for a given request.
This method processes the specified request and returns the corresponding field data in a structured format.
- Returns:
Dict[int|str,SurfaceData|PathlinesData|np.ndarray]:AdictionarywherekeysrepresentsurfaceIDsornames,andvaluescontainthecorrespondingfielddata.
- abstract get_surface_ids(surfaces)#
Retrieve a list of surface IDs based on input surface names or numerical identifiers.
- class ansys.fluent.core.fields.field_data.abstract_field_data.FieldBatch#
Bases:
ABCAbstract contract for collecting and executing field-data requests.
A batch belongs to a
FieldDataSource. It accepts request models, sends them through the source’s transport adapter, and returns a field-data source containing the response.Batchis the standard implementation andBatchFieldDatais its response container.Methods:
add_requests(obj, *args)Add field data requests for surfaces, scalars, vectors, or pathlines.
Retrieve the response containing data for previously added field requests.
get_surface_ids(surfaces)Retrieve a list of surface IDs based on input surface names or numerical identifiers.
- abstract add_requests(obj, *args)#
Add field data requests for surfaces, scalars, vectors, or pathlines.
This method allows users to specify multiple field data requests, which will later be processed when retrieving responses.
- abstract get_response()#
Retrieve the response containing data for previously added field requests.
This method processes all pending requests and returns the corresponding field data.
- abstract get_surface_ids(surfaces)#
Retrieve a list of surface IDs based on input surface names or numerical identifiers.
- class ansys.fluent.core.fields.field_data.abstract_field_data.FieldDataSource#
Bases:
BaseFieldDataSource,ABCAbstract contract for a field-data source that supports batching.
This extends
BaseFieldDataSourcewith the factory method needed to create aFieldBatch. The concrete source uses that batch to collect requests and return a batched response.LiveFieldDatafulfills this contract and returns aBatchfromnew_batch().Methods:
Create a new field batch.
- abstract new_batch()#
Create a new field batch.