Skip to content

Commit

Permalink
code style
Browse files Browse the repository at this point in the history
  • Loading branch information
gmalinve committed Aug 29, 2024
1 parent 6e8f450 commit a4164e5
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions examples/03-Maxwell2D/Maxwell2D_external_circuit.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# # External circuit
#
# This example shows how to create an external delta circuit and connect it with a Maxwell 2D design.
# Keywords:
# Keywords: **Maxwell2d**, **Circuit**, **netlist**

# ## Perform required imports

Expand Down Expand Up @@ -152,21 +152,22 @@
v_sources = []
ground = []

for i in range(3):
resistors[i] = circuit.modeler.schematic.create_resistor(
for i in range(len(windings)):
r = circuit.modeler.schematic.create_resistor(
name="R" + str(i + 1), value="resistance_value", location=[1000, i * 1000]
)
resistors.append(r)

v_sources[i] = circuit.modeler.schematic.create_component(
v = circuit.modeler.schematic.create_component(
component_library="Sources",
component_name="VSin",
location=[2000, i * 1000],
angle=90,
)
v_sources[i].set_property(name="Va", value="voltage")
v_sources[i].set_property(name="VFreq", value="frequency")
v_sources[i].set_property(name="Phase", value=str(i * 120) + "deg")
ground[i] = circuit.modeler.schematic.create_gnd([2300, i * 1000], angle=90)
v_sources.append(v)

g = circuit.modeler.schematic.create_gnd([2300, i * 1000], angle=90)
ground.append(g)

# ## Connect the components
#
Expand Down

0 comments on commit a4164e5

Please sign in to comment.