create_sbr_custom_array_file#
- Hfss.create_sbr_custom_array_file(output_file=None, frequencies=None, element_number=1, state_number=1, position=None, x_axis=None, y_axis=None, weight=None)#
Create custom array file with sarr format.
- Parameters:
- output_file
str
,optional
Full path and name for the file. The default is
None
, in which case the file is exported to the working directory.- frequencies
list
,optional
List of frequencies in GHz. The default is
[1.0]
.- element_number
int
,optional
Number of elements in the array. The default is
1
.- state_number
int
,optional
Number of states. The default is
1
.- position
list
of
list
List of the
[x, y, z]
coordinates for each element. The default is[1, 0, 0]
.- x_axis
list
of
list
List of X, Y, Z components of X-axis unit vector.
- y_axis
list
of
list
List of X, Y, Z components of Y-axis unit vector. The default is
[0, 1, 0]
.- weight
list
of
list
Weight of each element. The default is
None
in which case all elements have uniform weight. The second dimension contains the weights for each element, organized as follows: The firstfrequencies
entries correspond to the weights for that element at each of thefrequencies
, for the first state. If there are multiple states, the nextfrequencies
entries represent the weights for the second state, and so on. For example, for 3 frequencies(f1, f2, f3)
, 2 elements(e1, e2)
, and 2 states(s1, s2)
, the weight would be represented as:[[w_f1_e1_s1, w_f1_e2_s1], [w_f2_e1_s1, w_f2_e2_s1], [w_f3_e1_s1, w_f3_e2_s1], [w_f1_e1_s2, w_f1_e2_s2], [w_f2_e1_s2, w_f2_e2_s2], [w_f3_e1_s2, w_f3_e2_s2]]
. ```
- output_file
- Returns:
str
File name when successful,
False
when failed.
Examples
>>> from ansys.aedt.core import Hfss >>> hfss = Hfss() >>> hfss.create_sbr_custom_array_file() >>> hfss.release_desktop()