Main Content

through

Establish relationship between component variables and nodes

Syntax

through( variableI, node1.variableA, node2.variableB )

Description

Note

through will be removed in a future release. Use branches instead. For more information, see Define Relationship Between Component Variables and Nodes.

through( variableI, node1.variableA, node2.variableB ) establishes the following relationship between the three arguments: for each variableI, node1.variableA is assigned the value sum( variableI ) and node2.variableB is assigned the value sum( -variableI ). All arguments are variables. The first one is not associated with a node. The second and third must be associated with a node.

The following rules apply:

  • All arguments must have consistent units.

  • The second and third arguments do not need to be associated with the same domain. For example, one may be associated with a one-phase electrical domain, and the other with a 3-phase electrical.

  • Either the second or the third argument may be replaced with [] to indicate the reference node.

Examples

For example, if a component declaration section contains two electrical nodes, p and n, and a variable i = { 0, 'A' }; specifying current, you can establish the following relationship in the setup section:

through( i, p.i, n.i ); 

This defines current i as a Through variable from node p to node n.

Version History

Introduced in R2008b