create_resistor_network_from_matrix#
- Icepak.create_resistor_network_from_matrix(sources_power: list[str] | list[float], faces_ids: list[int], matrix: list[list], network_name: str | None = None, node_names: list[str] | None = None) NetworkObject#
Create a thermal network.
- Parameters:
- sources_power
listofstrorlistoffloat List containing all the power value of the internal nodes. If the element of the list is a float, the
Wunit is used. Otherwise, the unit specified in the string is used.- faces_ids
listofint All the face IDs that are network nodes.
- matrix
listoflist Strict lower-square triangular matrix containing the link values between the nodes of the network. If the element of the matrix is a float, the
cel_per_wunit is used. Otherwise, the unit specified in the string is used. The element of the matrix in the i-th row and j-th column is the link value between the i-th node and j-th node. The list of nodes is automatically created from the lists for thesources_powerandfaces_idsparameters (in this order).- network_name
str,optional Name of the network boundary. The default is
None, in which case the boundary name is generated automatically.- node_names
listofstr,optional Name of all the nodes in the network.
- sources_power
- Returns:
ansys.aedt.core.modules.boundary.BoundaryNetworkBoundary network object when successful or
Nonewhen failed.
References
>>> oModule.AssignNetworkBoundary
Examples
>>> from ansys.aedt.core import Icepak >>> app = Icepak() >>> box = app.modeler.create_box([0, 0, 0], [20, 50, 80]) >>> faces_ids = [face.id for face in box.faces][0, 1] >>> sources_power = [3, "4mW"] >>> matrix = [[0, 0, 0, 0], >>> [1, 0, 0, 0], >>> [0, 3, 0, 0], >>> [1, 2, 4, 0]] >>> boundary = app.assign_resistor_network_from_matrix(sources_power, faces_ids, matrix)