Skip to content

Commit 6cbb66a

Browse files
committed
Fix comments review
1 parent 095aa68 commit 6cbb66a

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

examples/high_frequency/emc/double_pulse_test.py

+17-17
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
#
33
# Description: build the equivalent circuit of a DPT
44
#
5-
# Most examples can be described as a series of steps that comprise a workflow.
6-
# 1. Import packages and instantiate the application.
7-
# 2. Insert Circuit Components
5+
# In this example the steps to build up the circuit schematic are shown.
6+
# 1. Insert Circuit Components
87
# 3. Create the Wiring
98
# 4. Insert simulation set up
109
# 3. View the results.
@@ -37,10 +36,8 @@
3736
temp_folder = tempfile.TemporaryDirectory(suffix=".ansys")
3837

3938
# ## Launch AEDT and Circuit
40-
#
4139

4240
project_name = os.path.join(temp_folder.name, "my_project.aedt")
43-
4441
circuit = ansys.aedt.core.Circuit(
4542
project=project_name,
4643
version=AEDT_VERSION,
@@ -49,11 +46,11 @@
4946
)
5047
circuit.modeler.schematic.schematic_units = "mil"
5148

52-
# ## Preprocess
49+
# ## Variable initialization to create a parametric design
5350
#
54-
# Initialize dictionaries that contain all the definitions for the design variables.
51+
# Initialize dictionary that contain all the definitions for the design variables.
5552

56-
des_properties = {
53+
design_properties = {
5754
"VoltageDCbus": "400V",
5855
"r_g1": "2.2",
5956
"r_g2": "2.2",
@@ -67,13 +64,19 @@
6764
}
6865

6966
# Define design variables from the created dictionaries.
70-
for k, v in des_properties.items():
67+
68+
for k, v in design_properties.items():
7169
circuit[k] = v
7270

7371
# ## Insert Circuit Elements into the Schematic
7472
#
73+
# Define starting position for component placement.
74+
7575
y_upper_pin = 5200
7676
y_lower_pin = 2000
77+
78+
# Define parametrically high and low voltage level for pwl voltage source.
79+
7780
time_list_pwl = [
7881
0.0,
7982
5.0e-6,
@@ -98,6 +101,7 @@
98101
]
99102

100103
# Add circuit components to the schematic.
104+
101105
v_pwl = circuit.modeler.components.create_voltage_pwl(
102106
name="v_pwl",
103107
time_list=time_list_pwl,
@@ -150,21 +154,19 @@
150154
amm_bot.parameters["Name"] = "Ibottom"
151155

152156

153-
# ## Add nmos components from Component Library.
157+
# ## Add nMOS components from Component Library.
154158
#
155-
# Please check that chosen component has the attribute .place
159+
# Please check that chosen component can access the method place()
156160
# If you need to insert a component from a spice model, please use the method: circuit.modeler.components.create_component_from_spicemodel
157161

158162
nmos_h = circuit.modeler.components.components_catalog[
159163
"Power Electronics Tools\\Power Semiconductors\\MOSFET\\STMicroelectronics:SCT040H65G3AG_V2"
160164
].place(assignment="NMOS_HS", location=[1500, 4700], angle=0)
161-
162165
nmos_l = circuit.modeler.components.components_catalog[
163166
"Power Electronics Tools\\Power Semiconductors\\MOSFET\\STMicroelectronics:SCT040H65G3AG_V2"
164167
].place("NMOS_LS", location=[1500, 3100], angle=0)
165168

166169
# ## Create wiring to complete the schematic.
167-
#
168170

169171
circuit.modeler.schematic.connect_components_in_series(
170172
assignment=[l_load, r_load], use_wire=True
@@ -336,7 +338,6 @@
336338
r_g2.pins[1].connect_to_component(assignment=nmos_l.pins[1], use_wire=True)
337339

338340
# ## Create a transient setup
339-
#
340341

341342
setup_name = "MyTransient"
342343
setup1 = circuit.create_setup(
@@ -347,9 +348,9 @@
347348

348349
# Solve transient setup
349350

350-
circuit.analyze_setup(setup_name)
351+
circuit.analyze(setup_name, cores=NUM_CORES)
351352

352-
# ## Postprocess
353+
# ## Plot Double Pulse Test results
353354
#
354355
# Create a report
355356

@@ -364,7 +365,6 @@
364365
plot_name="Plot V,I",
365366
)
366367

367-
368368
# ## Release AEDT
369369

370370
circuit.save_project()

examples/high_frequency/emc/index.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ These examples use PyAEDT to show some EMC applications.
100100

101101
.. grid-item-card:: Double Pulse Test schematic creation and analysis
102102
:padding: 2 2 2 2
103-
:link: ../../aedt_general/modeler/circuit_schematic
103+
:link: double_pulse_test
104104
:link-type: doc
105105

106-
.. image:: ../../aedt_general/modeler/_static/dpt.png
106+
.. image:: _static/dpt.png
107107
:alt: Circuit
108108
:width: 250px
109109
:height: 200px

0 commit comments

Comments
 (0)