Skip to content

Commit cf3bf17

Browse files
REFACT: fIX issue in examples (#4558)
1 parent 25ce6a5 commit cf3bf17

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

examples/01-HFSS3DLayout/Hfss3DComponent.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@
199199
h3d["len"] = str(trace_length) + "mm"
200200
h3d["w1"] = str(trace_width) + "mm"
201201

202-
h3d.create_edge_port(line, h3d.modeler[line].top_edge_x, is_wave_port=True, wave_horizontal_extension=15)
203202
line = h3d.modeler.create_line("L1", [[0, 0], ["len", 0]], lw="w1", name="microstrip", net="microstrip")
203+
h3d.create_edge_port(line, h3d.modeler[line.name].top_edge_x, is_wave_port=True, wave_horizontal_extension=15)
204204

205205
###############################################################################
206206
# Create void on Ground plane for pin
@@ -218,7 +218,12 @@
218218
h3d.edit_hfss_extents(diel_extent_horizontal_padding="0.2", air_vertical_positive_padding="0",
219219
air_vertical_negative_padding="2", airbox_values_as_dim=False)
220220
setup1 = h3d.create_setup()
221-
sweep1 = h3d.create_linear_count_sweep(setup1.name, "GHz", 0.01, 8, 1601, sweep_type="Interpolating")
221+
sweep1 = h3d.create_linear_count_sweep(setup1.name,
222+
"GHz",
223+
0.01,
224+
8,
225+
1601,
226+
sweep_type="Interpolating")
222227
setup1.props["AdaptiveSettings"]["SingleFrequencyDataList"]["AdaptiveFrequencyData"]["AdaptiveFrequency"] = freq
223228
setup1.props["AdaptiveSettings"]["SingleFrequencyDataList"]["AdaptiveFrequencyData"]["MaxPasses"] = max_steps
224229

examples/07-TwinBuilder/02-Wiring_A_Rectifier.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@
124124

125125
tb.analyze_setup("TR")
126126

127-
128127
###############################################################################
129128
# Get report data and plot using Matplotlib
130129
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -136,7 +135,7 @@
136135
x = tb.post.get_solution_data(E_Value, "TR", "Time")
137136
plt.plot(x.intrinsics["Time"], x.data_real(E_Value))
138137

139-
R_Value = "RL.V"
138+
R_Value = "R1.V"
140139
x = tb.post.get_solution_data(R_Value, "TR", "Time")
141140
plt.plot(x.intrinsics["Time"], x.data_real(R_Value))
142141

pyaedt/modeler/circuits/PrimitivesNexxim.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -681,12 +681,12 @@ def create_inductor(self, name=None, value=50, location=None, angle=0, use_insta
681681
return cmpid
682682

683683
@pyaedt_function_handler(compname="name")
684-
def create_capacitor(self, cname=None, value=50, location=None, angle=0, use_instance_id_netlist=False):
684+
def create_capacitor(self, name=None, value=50, location=None, angle=0, use_instance_id_netlist=False):
685685
"""Create a capacitor.
686686
687687
Parameters
688688
----------
689-
cname : str, optional
689+
name : str, optional
690690
Name of the capacitor. The default is ``None``.
691691
value : float, optional
692692
Capacitor value. The default is ``50``.
@@ -708,12 +708,11 @@ def create_capacitor(self, cname=None, value=50, location=None, angle=0, use_ins
708708
709709
>>> oEditor.CreateComponent
710710
"""
711-
712711
if location == None:
713712
location = []
714713

715714
cmpid = self.create_component(
716-
cname,
715+
name,
717716
component_library="Capacitors",
718717
component_name="CAP_",
719718
location=location,

0 commit comments

Comments
 (0)