upb-lea / FEM_Magnetics_Toolbox

An Open-Source FEM Magnetics Toolbox for Power Electronic Magnetic Components
https://upb-lea.github.io/FEM_Magnetics_Toolbox/
GNU General Public License v3.0
66 stars 11 forks source link

Inductance and leakage calculation #33

Open klaids opened 1 year ago

klaids commented 1 year ago

Hi, Is there a class function to calculate the inductance and leakage of a generated model?

gituser789 commented 1 year ago

Hi, there is a class method get_inductances().

Just figured out there are some problems on main using this method. May you should switch to develop as a workaround. Also check out the basic_example.py on develop again, due to some general usage changes compared to main.

    # generate your transformer geometry here
    # geo = ....

    geo.get_inductances(I0=1, op_frequency=200000) # use your operating frequency
    print(f"{geo.L_s_conc = }")
    print(f"{geo.L_h_conc = }")
    print(f"{geo.n_conc = }")