export_field_file_on_grid#

PostProcessor3DLayout.export_field_file_on_grid(quantity: str, solution: str = None, variations: dict[str, Any] = None, file_name: str = None, grid_type: str = 'Cartesian', grid_center: list[float] = None, grid_start: list[float] = None, grid_stop: list[float] = None, grid_step: list[float] = None, is_vector: bool = False, intrinsics: str | dict[str, str] = None, export_with_sample_points: bool = True, reference_coordinate_system: str = 'Global', export_in_si_system: bool = True, export_field_in_reference: bool = True) → str | bool#

Use the field calculator to create a field file on a grid based on a solution and variation.

Parameters:
quantitystr

Name of the quantity to export. For example, "Temp".

solutionstr, optional

Name of the solution in the format "solution : sweep". The default is None.

variationsdict, optional

Dictionary of all variation variables with their values. The default is None.

file_namestr, optional

Full path and name to save the file to. The default is None, in which case the file is exported to the working directory.

grid_typestr, optional

Type of the grid to export. The default is "Cartesian".

grid_centerlist, optional

The [x, y, z] coordinates for the center of the grid. The default is [0, 0, 0]. This parameter is disabled if gridtype= "Cartesian".

grid_startlist, optional

The [x, y, z] coordinates for the starting point of the grid. The default is [0, 0, 0].

grid_stoplist, optional

The [x, y, z] coordinates for the stopping point of the grid. The default is [0, 0, 0].

grid_steplist, optional

The [x, y, z] coordinates for the step size of the grid. The default is [0, 0, 0].

is_vectorbool, optional

Whether the quantity is a vector. The default is False.

intrinsicsdict, str, optional

Intrinsic variables required to compute the field before the export. These are typically: frequency, time and phase. It can be provided either as a dictionary or as a string. If it is a dictionary, keys depend on the solution type and can be expressed in lower or camel case as: - "Freq" or "Frequency". - "Time". - "Phase". If it is a string, it can either be "Freq" or "Time" depending on the solution type. The default is None in which case the intrinsics value is automatically computed based on the setup.

export_with_sample_pointsbool, optional

Whether to include the sample points in the file to export. The default is True.

reference_coordinate_systemstr, optional

Reference coordinate system in the file to export. The default is "Global".

export_in_si_systembool, optional

Whether the provided sample points are defined in the SI system or model units. The default is True.

export_field_in_referencebool, optional

Whether to export the field in reference coordinate system. The default is True.

Returns:
str

Field file path when succeeded.

References

>>> oModule.EnterQty
>>> oModule.CopyNamedExprToStack
>>> oModule.CalcOp
>>> oModule.EnterQty
>>> oModule.EnterVol
>>> oModule.ExportOnGrid

Examples

>>> from ansys.aedt.core import Hfss
>>> hfss = Hfss()
>>> var = hfss.available_variations.nominal_values
>>> setup = "Setup1 : LastAdaptive"
>>> path = "Field.fld"
>>> hfss.post.export_field_file_on_grid("E", setup, var, path, "Cartesian", [0, 0, 0], intrinsics="8GHz")