export_field_file#
- PostProcessorIcepak.export_field_file(quantity: str, solution: str = None, variations: dict[str, Any] = None, output_file: str = None, assignment: str = 'AllObjects', objects_type: str = 'Vol', intrinsics: str | dict[str, str] = None, phase: str = None, sample_points_file: str = None, sample_points: list[list[float]] = None, export_with_sample_points: bool = True, reference_coordinate_system: str = 'Global', export_in_si_system: bool = True, export_field_in_reference: bool = True) bool#
Use the field calculator to create a field file 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.- output_file
str,optional Full path and name to save the file to. The default is
Nonewhich export a file named"<setup_name>.fld"in working_directory.- assignment
str,optional List of objects to export. The default is
"AllObjects".- objects_type
str,optional Type of objects to export. The default is
"Vol". Options are"Surf"for surface and"Vol"for volume.- 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 isNonein which case the intrinsics value is automatically computed based on the setup.- phase
str,optional Field phase. The default is
None. This argument is deprecated. Please useintrinsicsand provide the phase as a dictionary key instead.- sample_points_file
str,optional Name of the file with sample points. The default is
None.- sample_points
list,optional List of the sample points. 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:
- bool
Truewhen successful,Falsewhen failed.
References
>>> oModule.EnterQty >>> oModule.CopyNamedExprToStack >>> oModule.CalcOp >>> oModule.EnterQty >>> oModule.EnterVol >>> oModule.CalculatorWrite >>> oModule.ExportToFile
Examples
>>> from ansys.aedt.core import Maxwell3d >>> m3d = Maxwell3d() >>> # Intrinsics is provided as a string. >>> fld_file1 = "test_fld_hfss1.fld" >>> hfss_app.post.export_field_file(quantity="Mag_E", output_file=fld_file1, assignment="Box1", >>> intrinsics="1GHz", phase="5deg") >>> # Intrinsics is provided as dictionary. Phase is automatically assigned to 0deg. >>> fld_file2 = "test_fld_hfss2.fld" >>> hfss_app.post.export_field_file(quantity="Mag_E", output_file=fld_file2, assignment="Box1", >>> intrinsics={"frequency":"1GHz"}) >>> # Intrinsics is provided as dictionary. Phase is provided. >>> hfss_app.post.export_field_file(quantity="Mag_E", output_file=fld_file2, assignment="Box1", >>> intrinsics={"frequency":"1GHz", "phase":"30deg"}) >>> # Intrinsics is not provided. It is computed from the setup arguments. >>> hfss_app.post.export_field_file(quantity="Mag_E", output_file=fld_file2, assignment="Box1", >>> )