This video is taken from the INT 100 course on Ansys Innovation Courses.
Compound elements are used to group elements so that they function as a single element.
Since there can be compound elements within compound elements, we can add levels of hierarchy,
which is essential for creating complex circuits.
Additionally, the compound element can take input properties that are used to set up the properties of the children elements.
This allows us to parameterize the element model.
A typical workflow for setting up a compound element is shown on this slide
The first two steps are interchangeable.
You can either first set up the elements and then group them to create a compound element,
or you can create a compound element, then add the elements inside.
After setting the number of ports of the compound, there will be a corresponding relay inside the compound
which sends data to the port, so the circuit inside the compound needs to be connected to the relays.
Optionally, you can parameterize the element and write a setup script.
Alternatively, you can use the expression option in the property definition, to work with property values inherited from parent elements.
The best practice when creating compound elements is to assume that the compound will be used in sample mode simulations.
Since the digital filter properties of each element can get buried in the hierarchy when using compound elements,
make sure you set the numerical properties of the elements accordingly.
The setup script can also be used to set the numerical properties of the elements.
In the following units we will demonstrate how to create a compound element to represent a ring modulator
and we will use the setup script of the compound element to parameterize the radius of the ring.