export_field_file_on_grid#

PostProcessor3D.export_field_file_on_grid(quantity, solution=None, variations=None, file_name=None, grid_type='Cartesian', grid_center=None, grid_start=None, grid_stop=None, grid_step=None, is_vector=False, intrinsics=None, phase=None, export_with_sample_points=True, reference_coordinate_system='Global', export_in_si_system=True, export_field_in_reference=True)#

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.

phasestr, optional

Field phase. The default is None.

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_w_values
>>> setup = "Setup1 : LastAdaptive"
>>> path = "Field.fld"
>>> hfss.post.export_field_file_on_grid("E",setup,var,path,'Cartesian',[0, 0, 0],intrinsics="8GHz")