Isolation Transformers#
This is a test to see if it will be possible to integrate an interactive interface to compute the values.
In brief:
\[ L_m=\underbrace{\frac{\mu_0\mu_r A_e}{l_e}}_{\text{ficed by the core}}{N^2} \]
The value of permeability in vacuum is \(\mu_0=1.256\times 10^{-6}\;\frac{N}{A^2}\), equivalently \(\mu_0=4\pi\times 10^{-7} \frac{H}{m} = 4\pi\times 10^{-4} \frac{H}{mm}\).
insert an interactive interface https://ipywidgets.readthedocs.io/en/latest/examples/Widget List.html
# Utils widgets
from ipywidgets import Button, Layout, jslink, IntText, IntSlider
def create_expanded_button(description, button_style):
return Button(description=description, button_style=button_style, layout=Layout(height='auto', width='auto'))
top_left_button = create_expanded_button("Top left", 'info')
top_right_button = create_expanded_button("Top right", 'success')
bottom_left_button = create_expanded_button("Bottom left", 'danger')
bottom_right_button = create_expanded_button("Bottom right", 'warning')
from ipywidgets import TwoByTwoLayout
top_left_text = IntText(description='Top left', layout=Layout(width='auto', height='auto'))
top_right_text = IntText(description='Top right', layout=Layout(width='auto', height='auto'))
bottom_left_slider = IntSlider(description='Bottom left', layout=Layout(width='auto', height='auto'))
bottom_right_slider = IntSlider(description='Bottom right', layout=Layout(width='auto', height='auto'))
app = TwoByTwoLayout(top_left=top_left_text, top_right=top_right_text,
bottom_left=bottom_left_slider, bottom_right=bottom_right_slider)
link_left = jslink((app.top_left, 'value'), (app.bottom_left, 'value'))
link_right = jslink((app.top_right, 'value'), (app.bottom_right, 'value'))
app.bottom_right.value = 30
app.top_left.value = 25
app
# # Utils widgets
# from ipywidgets import Button, Layout, jslink, IntText, IntSlider
# def create_expanded_button(description, button_style):
# return Button(description=description, button_style=button_style, layout=Layout(height='auto', width='auto'))
# top_left_button = create_expanded_button("Top left", 'info')
# top_right_button = create_expanded_button("Top right", 'success')
# bottom_left_button = create_expanded_button("Bottom left", 'danger')
# bottom_right_button = create_expanded_button("Bottom right", 'warning')
# top_left_text = IntText(description='Top left', layout=Layout(width='auto', height='auto'))
# top_right_text = IntText(description='Top right', layout=Layout(width='auto', height='auto'))
# bottom_left_slider = IntSlider(description='Bottom left', layout=Layout(width='auto', height='auto'))
# bottom_right_slider = IntSlider(description='Bottom right', layout=Layout(width='auto', height='auto'))
# app = TwoByTwoLayout(top_left=top_left_text, top_right=top_right_text,
# bottom_left=bottom_left_slider, bottom_right=bottom_right_slider)
# link_left = jslink((app.top_left, 'value'), (app.bottom_left, 'value'))
# link_right = jslink((app.top_right, 'value'), (app.bottom_right, 'value'))
# app.bottom_right.value = 30
# app.top_left.value = 25
# app