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
listoflist List of the
[x, y, z]coordinates for each element. The default is[1, 0, 0].- x_axis
listoflist List of X, Y, Z components of X-axis unit vector.
- y_axis
listoflist List of X, Y, Z components of Y-axis unit vector. The default is
[0, 1, 0].- weight
listoflist Weight of each element. The default is
Nonein which case all elements have uniform weight. The second dimension contains the weights for each element, organized as follows: The firstfrequenciesentries correspond to the weights for that element at each of thefrequencies, for the first state. If there are multiple states, the nextfrequenciesentries 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:
strFile name when successful,
Falsewhen failed.
Examples
>>> from ansys.aedt.core import Hfss >>> hfss = Hfss() >>> hfss.create_sbr_custom_array_file() >>> hfss.desktop_class.close_desktop()