Skip to content

Commit

Permalink
Update jellyplot.py
Browse files Browse the repository at this point in the history
  • Loading branch information
TomTranter committed Feb 7, 2024
1 parent e43a6ba commit b6a1414
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions streamlit_apps/jellyplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def update_plot(pos_ints, neg_ints, net):

dtheta = st.slider("dtheta [deg]", 1, 90, 10)
# st.write('dtheta:', dtheta)
inner_r = st.slider("Inner rad [mm]", 1, 5, 1)

tesla_tabs = st.checkbox("Tesla tabs")
if not tesla_tabs:
Expand All @@ -71,7 +72,14 @@ def update_plot(pos_ints, neg_ints, net):
# OpenPNM project

project, arc_edges = ecm.make_spiral_net(
Nlayers, dtheta, width * 1e-6, 15e-5, pos_tabs, neg_tabs, length_3d, tesla_tabs
Nlayers=Nlayers,
dtheta=dtheta,
spacing=width * 1e-6,
inner_r=inner_r*1e-3,
pos_tabs=pos_tabs,
neg_tabs=neg_tabs,
length_3d=length_3d,
tesla_tabs=tesla_tabs,
)

net = project.network
Expand All @@ -81,7 +89,6 @@ def update_plot(pos_ints, neg_ints, net):
if tesla_tabs:
plot_topology(net)
else:

pos_tabs = [
positive_offset + (tab_spacing * nodes_per_layer * i) for i in range(num_tabs)
]
Expand Down

0 comments on commit b6a1414

Please sign in to comment.