export_field_file_on_grid#
- PostProcessorIcepak.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:
- quantity
str
Name of the quantity to export. For example,
"Temp"
.- solution
str
,optional
Name of the solution in the format
"solution : sweep"
. The default isNone
.- variations
dict
,optional
Dictionary of all variation variables with their values. The default is
None
.- file_name
str
,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_type
str
,optional
Type of the grid to export. The default is
"Cartesian"
.- grid_center
list
,optional
The
[x, y, z]
coordinates for the center of the grid. The default is[0, 0, 0]
. This parameter is disabled ifgridtype= "Cartesian"
.- grid_start
list
,optional
The
[x, y, z]
coordinates for the starting point of the grid. The default is[0, 0, 0]
.- grid_stop
list
,optional
The
[x, y, z]
coordinates for the stopping point of the grid. The default is[0, 0, 0]
.- grid_step
list
,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
.- intrinsics
dict
,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 isNone
in which case the intrinsics value is automatically computed based on the setup.- phase
str
,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_system
str
,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
.
- quantity
- 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")