diff --git a/femmt/functions.py b/femmt/functions.py index 0d1b512d..28d0dab2 100644 --- a/femmt/functions.py +++ b/femmt/functions.py @@ -1,13 +1,14 @@ """Contains different functions, used by the whole FEMMT functions.""" # Python standard libraries import json -import pkg_resources import subprocess import sys import os import warnings from scipy.integrate import quad import logging +import importlib.metadata + # Third parry libraries import gmsh from matplotlib import pyplot as plt @@ -18,7 +19,6 @@ import schemdraw import schemdraw.elements as elm - # Local libraries from femmt.constants import * from femmt.enumerations import ConductorType @@ -845,11 +845,20 @@ def pm_core_inner_diameter_calculator(inner_core_diameter: float, hole_diameter: return np.around(2 * np.sqrt(area_total / np.pi), decimals=4) +def list_installed_packages() -> set: + """"List installed python packages.""" + distributions = importlib.metadata.distributions() + installed_packages = [] + for dist in distributions: + args = dist.metadata['Name'] + installed_packages.append(args) + set_installed_packages = set(installed_packages) + return set_installed_packages def install_pyfemm_if_missing() -> None: """Installs femm-software pip package in case of running on Windows machine. Windows users only.""" required = {'pyfemm'} - installed = {pkg.key for pkg in pkg_resources.working_set} + installed = list_installed_packages() missing = required - installed if missing: diff --git a/tests/integration/fixtures/log_inductor_core_material_database.json b/tests/integration/fixtures/log_inductor_core_material_database.json index f3048e37..9b750677 100644 --- a/tests/integration/fixtures/log_inductor_core_material_database.json +++ b/tests/integration/fixtures/log_inductor_core_material_database.json @@ -4,87 +4,87 @@ "f": 100000, "winding1": { "turn_losses": [ - 0.08186750219758603, - 0.07855828152724643, - 0.05047467240452998, - 0.02103762007713824, - 0.009397893298164508, - 0.02103111578873332, - 0.05067410450942035, - 0.07945969275407563, - 0.08423323302123231 + 0.0818675022071684, + 0.07855828153616791, + 0.05047467240932421, + 0.02103762007805146, + 0.009397893297526803, + 0.02103111578955079, + 0.05067410451406756, + 0.0794596927629429, + 0.08423323303106273 ], "flux": [ - 9.432469475968289e-05, - -4.564864467214203e-07 + 9.432469476716475e-05, + -4.564865668072955e-07 ], "flux_over_current": [ - 2.0961010508070005e-05, - -1.0490246158232937e-07 + 2.0961010509732907e-05, + -1.0490248826801675e-07 ], "V": [ - 0.2966047223854783, - 59.26586096157406 + 0.2966047978374818, + 59.26586096627581 ], "number_turns": 9, "I": [ 4.5, 0.0 ], - "winding_losses": 0.4767341155781262, - "P": 0.6673606253673262, - "Q": 133.34818716354164, - "S": 133.34985710531237 + "winding_losses": 0.4767341156258626, + "P": 0.667360795134334, + "Q": 133.34818717412057, + "S": 133.34985711674076 }, - "core_eddy_losses": 0.005277688833746474, - "core_hyst_losses": 0.186036315606035, + "core_eddy_losses": 0.005277688833992931, + "core_hyst_losses": 0.1860364851277851, "core_parts": { "core_part_1": { - "eddy_losses": 0.002182820518385057, - "hyst_losses": 0.1295468431448242, - "total_core_part_1": 0.13172966366320926 + "eddy_losses": 0.002182820518597349, + "hyst_losses": 0.1295469635607354, + "total_core_part_1": 0.13172978407933275 }, "core_part_2": { - "eddy_losses": 0.003094868315361419, - "hyst_losses": 0.05648947246121275, - "total_core_part_2": 0.059584340776574166 + "eddy_losses": 0.003094868315395592, + "hyst_losses": 0.05648952156704907, + "total_core_part_2": 0.05958438988244466 } }, - "all_winding_losses": 0.4767341155781262 + "all_winding_losses": 0.4767341156258626 } ], "total_losses": { "winding1": { - "total": 0.47673411557812684, + "total": 0.47673411562586276, "turns": [ - 0.08186750219758603, - 0.07855828152724643, - 0.05047467240452998, - 0.02103762007713824, - 0.009397893298164508, - 0.02103111578873332, - 0.05067410450942035, - 0.07945969275407563, - 0.08423323302123231 + 0.0818675022071684, + 0.07855828153616791, + 0.05047467240932421, + 0.02103762007805146, + 0.009397893297526803, + 0.02103111578955079, + 0.05067410451406756, + 0.0794596927629429, + 0.08423323303106273 ] }, - "all_windings": 0.4767341155781262, - "eddy_core": 0.005277688833746474, - "hyst_core_fundamental_freq": 0.186036315606035, - "total_core_part_1": 0.13172966366320926, - "total_eddy_core_part_1": 0.002182820518385057, - "total_hyst_core_part_1": 0.1295468431448242, - "total_core_part_2": 0.059584340776574166, - "total_eddy_core_part_2": 0.003094868315361419, - "total_hyst_core_part_2": 0.05648947246121275, - "core": 0.19131400443978147, - "total_losses": 0.6680481200179077 + "all_windings": 0.4767341156258626, + "eddy_core": 0.005277688833992931, + "hyst_core_fundamental_freq": 0.1860364851277851, + "total_core_part_1": 0.13172978407933275, + "total_eddy_core_part_1": 0.002182820518597349, + "total_hyst_core_part_1": 0.1295469635607354, + "total_core_part_2": 0.05958438988244466, + "total_eddy_core_part_2": 0.003094868315395592, + "total_hyst_core_part_2": 0.05648952156704907, + "core": 0.19131417396177802, + "total_losses": 0.6680482895876406 }, "simulation_settings": { "simulation_name": null, - "date": "2025-08-20 10:20:18", + "date": "2026-03-05 12:59:55", "component_type": "Inductor", - "working_directory": "C:\\Users\\tpiepe\\Repositories\\FEM_Magnetics_Toolbox\\tests\\integration\\temp", + "working_directory": "/home/nikolasf/Dokumente/01_git/30_Python/FEMMT/tests/integration/temp", "core": { "core_type": 1, "core_inner_diameter": 0.0149, @@ -193,4 +193,4 @@ ], "total_cost_incl_margin": 5.471883844584376 } -} \ No newline at end of file +} diff --git a/tests/integration/fixtures/log_transformer_5_windings.json b/tests/integration/fixtures/log_transformer_5_windings.json index 47a145d4..c17ef78f 100644 --- a/tests/integration/fixtures/log_transformer_5_windings.json +++ b/tests/integration/fixtures/log_transformer_5_windings.json @@ -4,255 +4,255 @@ "f": 100000, "winding1": { "turn_losses": [ - 0.00463473073745279, - 0.004709743073889831, - 0.004858788477907974, - 0.005092020356193738, - 0.005482831624730361, - 0.006211687159561519, - 0.007736778211252446, - 0.01011135381288474, - 0.009340383655393475, - 0.007116371376435667, - 0.005808057378167597, - 0.0051360522371414, - 0.004763140340519947, - 0.004543044998153017, - 0.004440010908314053, - 0.006150397800329005, - 0.006600268205515679, - 0.006913985188131909, - 0.007249548804435581, - 0.007701146439636711, - 0.008304081480064484, - 0.008859941067231635 + 0.004634720273041922, + 0.004709730093048725, + 0.00485877201722167, + 0.005091994578309861, + 0.005482795857348051, + 0.006211624793385961, + 0.007736677555266627, + 0.01011118044410759, + 0.009340231021871565, + 0.007116288496142916, + 0.005808012945196906, + 0.005136026816896447, + 0.004763127504866764, + 0.004543035976251024, + 0.004440006077788498, + 0.006150355460911068, + 0.006600213625280609, + 0.006913917266808044, + 0.007249475425407373, + 0.007701052496673903, + 0.00830398193703087, + 0.008859812836520884 ], "flux": [ - -0.0005533113217217947, - 5.6665864099928e-05 + -0.000553312818935417, + 5.666501335480401e-05 ], "flux_over_current": [ - -0.0003404992749057177, - 3.475178823515088e-05 + -0.0003405001962679468, + 3.4751264701567495e-05 ], "V": [ - -35.48218785106393, - -347.6557566938476 + -35.4816533140546, + -347.656697420911 ], "number_turns": 22, "I": [ 1.625, 0.0 ], - "winding_losses": 0.1417643633333431, - "P": -28.82927762898944, - "Q": -282.4703023137512, - "S": 283.93766734590065 + "winding_losses": 0.1417630334993771, + "P": -28.82884331766936, + "Q": -282.4710666544902, + "S": 283.9383836397611 }, "winding2": { "turn_losses": [ - 0.05199816406384965, - 0.05223660914943351, - 0.05249978989950291, - 0.05281079640846789, - 0.05314988523236943, - 0.05333630469466787 + 0.05199811716046635, + 0.05223654258939871, + 0.05249973602320124, + 0.05281073507685555, + 0.05314979227167838, + 0.05333620166195499 ], "flux": [ - -0.0001547885833971803, - 1.587376086194396e-05 + -0.0001547889944558165, + 1.587352613812085e-05 ], "flux_over_current": [ - 2.5798097232863406e-05, - -2.67249525258172e-06 + 2.57981657426361e-05, + -2.67245613151908e-06 ], "V": [ - -10.07506974271721, - -97.25653529203062 + -10.07492225978562, + -97.25679356778893 ], "number_turns": 6, "I": [ -6.0, 7.347880794884119e-16 ], - "winding_losses": 0.3160315494482919, - "P": 30.22520922815159, - "Q": 291.7696058760919, - "S": 293.3309840197171 + "winding_losses": 0.3160311247835543, + "P": 30.224766779356823, + "Q": 291.7703807033668, + "S": 293.3317091326032 }, "winding3": { "turn_losses": [ - 0.05182855333350463, - 0.05155734374910599, - 0.05124743344919712, - 0.0509719247274984, - 0.05080811910617479, - 0.05094532324230747 + 0.05182849360268635, + 0.0515572921498451, + 0.05124739096364028, + 0.05097189030474163, + 0.05080808910926698, + 0.05094528756352026 ], "flux": [ - -0.0001539241276214893, - 1.532263947989806e-05 + -0.0001539245368228779, + 1.532240650853469e-05 ], "flux_over_current": [ - 3.1413087269691764e-05, - -3.166779056508276e-06 + 3.1413170780179216e-05, + -3.1667315107296044e-06 ], "V": [ - -9.749755223079061, - -96.71338170917794 + -9.749608840999457, + -96.71363881799314 ], "number_turns": 6, "I": [ -4.9, 6.000769315822031e-16 ], - "winding_losses": 0.3073586976077885, - "P": 23.886900296543672, - "Q": 236.94778518748598, - "S": 238.14877054276812 + "winding_losses": 0.3073584436937004, + "P": 23.886541660448643, + "Q": 236.9484151040832, + "S": 238.1493613109917 }, "winding4": { "turn_losses": [ - 0.001038529719523349 + 0.001038511602583605 ], "flux": [ - -2.5363009887502e-05, - 2.556670639168937e-06 + -2.536307832452651e-05, + 2.556631684055292e-06 ], "flux_over_current": [ - 5.113341278337875e-06, - 5.07193689267584e-05 + 5.1132633681105775e-06, + 5.071950580090699e-05 ], "V": [ - -1.606403539532372, - -15.93395968150146 + -1.6063790633126, + -15.93400268178343 ], "number_turns": 1, "I": [ 3.061616997868383e-17, 0.5 ], - "winding_losses": 0.001038529719523349, - "P": -3.983489920375365, - "Q": 0.40160088488309276, - "S": 4.0036827067677345 + "winding_losses": 0.001038511602583605, + "P": -3.9835006704458573, + "Q": 0.4015947658281498, + "S": 4.003692788836721 }, "winding5": { "turn_losses": [ - 0.002396548079939344, - 0.002405377205440528 + 0.002396545496099454, + 0.002405374216541202 ], "flux": [ - -5.170340672369648e-05, - 5.479859684062903e-06 + -5.170354447123149e-05, + 5.479781011831733e-06 ], "flux_over_current": [ - 4.576676206556589e-06, - 5.1776348802624574e-05 + 4.576595142281629e-06, + 5.1776485156385105e-05 ], "V": [ - -3.442934874212968, - -32.47689829575958 + -3.442885442994747, + -32.47698484522967 ], "number_turns": 2, "I": [ 0.0174524064372836, 0.9998476951563913 ], - "winding_losses": 0.004801925285379874, - "P": -16.266019702802804, - "Q": 1.4378052348377381, - "S": 16.329442148012767 + "winding_losses": 0.004801919712640663, + "P": -16.266062539600043, + "Q": 1.4377797677446704, + "S": 16.329482576086594 }, - "core_eddy_losses": 0.09709012356083599, - "core_hyst_losses": 4.165237112323638, + "core_eddy_losses": 0.09666671082119092, + "core_hyst_losses": 4.165242196671496, "core_parts": { "core_part_1": { - "eddy_losses": 0.09709012356083599, - "hyst_losses": 4.165237112323638, - "total_core_part_1": 4.262327235884474 + "eddy_losses": 0.09666671082119092, + "hyst_losses": 4.165242196671496, + "total_core_part_1": 4.261908907492687 } }, - "all_winding_losses": 0.7709950653943268 + "all_winding_losses": 0.7709930332918561 } ], "total_losses": { "winding1": { - "total": 0.14176436333334358, + "total": 0.14176303349937727, "turns": [ - 0.00463473073745279, - 0.004709743073889831, - 0.004858788477907974, - 0.005092020356193738, - 0.005482831624730361, - 0.006211687159561519, - 0.007736778211252446, - 0.01011135381288474, - 0.009340383655393475, - 0.007116371376435667, - 0.005808057378167597, - 0.0051360522371414, - 0.004763140340519947, - 0.004543044998153017, - 0.004440010908314053, - 0.006150397800329005, - 0.006600268205515679, - 0.006913985188131909, - 0.007249548804435581, - 0.007701146439636711, - 0.008304081480064484, - 0.008859941067231635 + 0.004634720273041922, + 0.004709730093048725, + 0.00485877201722167, + 0.005091994578309861, + 0.005482795857348051, + 0.006211624793385961, + 0.007736677555266627, + 0.01011118044410759, + 0.009340231021871565, + 0.007116288496142916, + 0.005808012945196906, + 0.005136026816896447, + 0.004763127504866764, + 0.004543035976251024, + 0.004440006077788498, + 0.006150355460911068, + 0.006600213625280609, + 0.006913917266808044, + 0.007249475425407373, + 0.007701052496673903, + 0.00830398193703087, + 0.008859812836520884 ] }, "winding2": { - "total": 0.31603154944829126, + "total": 0.3160311247835552, "turns": [ - 0.05199816406384965, - 0.05223660914943351, - 0.05249978989950291, - 0.05281079640846789, - 0.05314988523236943, - 0.05333630469466787 + 0.05199811716046635, + 0.05223654258939871, + 0.05249973602320124, + 0.05281073507685555, + 0.05314979227167838, + 0.05333620166195499 ] }, "winding3": { - "total": 0.3073586976077884, + "total": 0.3073584436937006, "turns": [ - 0.05182855333350463, - 0.05155734374910599, - 0.05124743344919712, - 0.0509719247274984, - 0.05080811910617479, - 0.05094532324230747 + 0.05182849360268635, + 0.0515572921498451, + 0.05124739096364028, + 0.05097189030474163, + 0.05080808910926698, + 0.05094528756352026 ] }, "winding4": { - "total": 0.001038529719523349, + "total": 0.001038511602583605, "turns": [ - 0.001038529719523349 + 0.001038511602583605 ] }, "winding5": { - "total": 0.004801925285379872, + "total": 0.0048019197126406565, "turns": [ - 0.002396548079939344, - 0.002405377205440528 + 0.002396545496099454, + 0.002405374216541202 ] }, - "all_windings": 0.7709950653943268, - "eddy_core": 0.09709012356083599, - "hyst_core_fundamental_freq": 4.165237112323638, - "total_core_part_1": 4.262327235884474, - "total_eddy_core_part_1": 0.09709012356083599, - "total_hyst_core_part_1": 4.165237112323638, - "core": 4.262327235884474, - "total_losses": 5.0333223012788 + "all_windings": 0.7709930332918561, + "eddy_core": 0.09666671082119092, + "hyst_core_fundamental_freq": 4.165242196671496, + "total_core_part_1": 4.261908907492687, + "total_eddy_core_part_1": 0.09666671082119092, + "total_hyst_core_part_1": 4.165242196671496, + "core": 4.261908907492687, + "total_losses": 5.0329019407845434 }, "simulation_settings": { "simulation_name": null, - "date": "2025-08-20 10:06:21", + "date": "2026-03-05 13:01:01", "component_type": "Transformer", - "working_directory": "C:\\Users\\tpiepe\\Repositories\\FEM_Magnetics_Toolbox\\tests\\integration\\temp", + "working_directory": "/home/nikolasf/Dokumente/01_git/30_Python/FEMMT/tests/integration/temp", "core": { "core_type": 1, "core_inner_diameter": 0.012, @@ -547,4 +547,4 @@ ], "total_cost_incl_margin": 20.773745545974702 } -} \ No newline at end of file +} diff --git a/tests/integration/fixtures/material_inductor_core_material_database.json b/tests/integration/fixtures/material_inductor_core_material_database.json index e5713450..65a079f7 100644 --- a/tests/integration/fixtures/material_inductor_core_material_database.json +++ b/tests/integration/fixtures/material_inductor_core_material_database.json @@ -105,208 +105,208 @@ 0.3 ], "permeability_real": [ - 3523.9972595655645, - 3576.4680941879974, - 3628.225278233373, - 3678.805689348708, - 3728.202932624856, - 3776.4341726835505, - 3823.522925518383, - 3869.494912948363, - 3914.3766143099206, - 3958.1946460919903, - 4000.975458429451, - 4042.7451718314555, - 4083.529482809456, - 4123.353606150646, - 4162.242237940611, - 4200.219530947928, - 4237.3090776931695, - 4273.5338984709615, - 4308.916432667346, - 4343.478532332489, - 4377.241457337759, - 4410.22587167346, - 4442.451840587561, - 4473.938828359378, - 4504.705696564208, - 4534.77070272701, - 4564.151499292195, - 4592.865132856844, - 4620.928043629114, - 4648.356065083903, - 4675.164423795445, - 4701.367739431955, - 4726.980024901671, - 4752.0146866426, - 4776.484525050682, - 4800.401735042754, - 4823.77790675211, - 4846.6240263553655, - 4868.950477030194, - 4890.767040043965, - 4912.0828959738565, - 4932.906626059206, - 4953.246213687122, - 4973.109046012523, - 4992.501915713754, - 5011.4310228849945, - 5029.901977066585, - 5047.91979941427, - 5065.48892500827, - 5082.613205302796, - 5099.295910716491, - 5115.539733363906, - 5131.34678992786, - 5146.718624672099, - 5161.656212593311, - 5176.15996271104, - 5190.229721493555, - 5203.86477641714, - 5217.063859655665, - 5229.825151896612, - 5242.146286278989, - 5254.02435244776, - 5265.455900718581, - 5276.436946345647, - 5286.96297388452, - 5297.028941640677, - 5306.629286193409, - 5315.757926983466, - 5324.4082709515405, - 5332.573217213301, - 5340.245161755246, - 5347.4160021340895, - 5354.077142160756, - 5360.219496548405, - 5365.833495502045, - 5370.909089225498, - 5375.435752319495, - 5379.402488042642, - 5382.797832404957, - 5385.609858061429, - 5387.826177970904, - 5389.433948783241, - 5390.419873915406, - 5390.770206274712, - 5390.4707505850865, - 5389.506865269735, - 5387.863463841187, - 5385.525015747233, - 5382.475546618877, - 5378.698637864072, - 5374.177425548665, - 5368.894598503849, - 5362.832395597223, - 5355.972602102703, - 5348.2965451027385, - 5339.785087854657, - 5330.418623051745, - 5320.177064908619, - 5309.039839999703, - 5296.985876779407 + 3523.9972581001052, + 3576.4680834141855, + 3628.2252672793293, + 3678.805678528093, + 3728.2029219828264, + 3776.4341621940275, + 3823.522915126598, + 3869.4949025841897, + 3914.3766038929116, + 3958.1946355334962, + 4000.9754476335756, + 4042.7451606955024, + 4083.5294712241434, + 4123.353594000216, + 4162.242225102892, + 4200.219517294376, + 4237.309063088901, + 4273.533882774805, + 4308.916415731869, + 4343.478514004064, + 4377.241437456616, + 4410.225850073743, + 4442.451817097404, + 4473.93880280098, + 4504.705668753905, + 4534.7706724753625, + 4564.151466404072, + 4592.865097131514, + 4620.92800486033, + 4648.356023060006, + 4675.164378299454, + 4701.367690241672, + 4726.9799717897795, + 4752.014629376774, + 4776.484463393688, + 4800.401668752569, + 4823.777835582035, + 4846.623950054148, + 4868.9503953421445, + 4890.766952709098, + 4912.082802728022, + 4932.906526634227, + 4953.246107810955, + 4973.108933409411, + 4992.501796104393, + 5011.430895986715, + 5029.901842593537, + 5047.91965707763, + 5065.488774516445, + 5082.61304636166, + 5099.29574302962, + 5115.539556632844, + 5131.346603852388, + 5146.718428950534, + 5161.656006922814, + 5176.159746787959, + 5190.229495013772, + 5203.864539076458, + 5217.063611150204, + 5229.824891923247, + 5242.146014535797, + 5254.024068634511, + 5265.455604537248, + 5276.436637500944, + 5286.962652084481, + 5297.028606597262, + 5306.628937623141, + 5315.757564608105, + 5324.407894498791, + 5332.572826417556, + 5340.244756358368, + 5347.415581886227, + 5354.076706821198, + 5360.219045886473, + 5365.833029298022, + 5370.908607271598, + 5375.435254420866, + 5379.401974018415, + 5382.797302089316, + 5385.609311304733, + 5387.825614640835, + 5389.433368765993, + 5390.419277116888, + 5390.769592621811, + 5390.470120026927, + 5389.506217778986, + 5387.862799415382, + 5385.524334410107, + 5382.474848421727, + 5378.697922887115, + 5374.1766939024255, + 5368.893850330517, + 5362.83163107203, + 5355.971821435286, + 5348.295748538475, + 5339.784275675979, + 5330.417795579436, + 5320.176222503046, + 5309.038983062018, + 5296.9850057526755 ], "permeability_imag": [ - 14.042817578930608, - 85.38701039293645, - 103.81837352419925, - 118.34845513569195, - 131.30709884901972, - 143.46776884677948, - 155.18380143770287, - 166.64521786585334, - 177.964981362647, - 189.21491761937048, - 200.44291117363508, - 211.68199442302262, - 222.95552234423528, - 234.2802948237057, - 245.66853062586387, - 257.1291640959048, - 268.66872462485117, - 280.29194943065306, - 292.00222042045726, - 303.8018817844949, - 315.6924747598178, - 327.6749136281641, - 339.7496192158785, - 351.91662112483823, - 364.17563659163164, - 376.52613162389144, - 388.9673685171531, - 401.49844277522243, - 414.11831169015306, - 426.825816285877, - 439.6196979269677, - 452.4986105968987, - 465.4611296284818, - 478.505757502004, - 491.6309271993659, - 504.83500350480176, - 518.1162825670941, - 531.4729899791187, - 544.9032775841368, - 558.4052191814885, - 571.976805275084, - 585.6159369846454, - 599.3204192207942, - 613.0879532098193, - 626.9161284415907, - 640.80241410401, - 654.7441500591742, - 668.7385374097294, - 682.7826286984192, - 696.8733177793853, - 711.0073293961696, - 725.181208498477, - 739.3913093274335, - 753.6337842972991, - 767.9045727002035, - 782.1993892594992, - 796.5137125566437, - 810.8427733561339, - 825.1815428529079, - 839.5247208666976, - 853.8667240081245, - 868.2016738418356, - 882.5233850725922, - 896.8253537810865, - 911.1007457371804, - 925.3423848193996, - 939.5427415707209, - 953.693921922072, - 967.787656116431, - 981.8152878680081, - 995.767763792723, - 1009.6356231479799, - 1023.4089879216948, - 1037.0775533125561, - 1050.6305786456292, - 1064.0568787696661, - 1077.3448159848217, - 1090.482292551896, - 1103.4567438368235, - 1116.2551321466779, - 1128.863941316298, - 1141.2691721074082, - 1153.4563384850712, - 1165.4104648393527, - 1177.116084223173, - 1188.5572376805967, - 1199.7174747431116, - 1210.5798551748653, - 1221.1269520513865, - 1231.3408562599063, - 1241.2031825131185, - 1250.6950769720795, - 1259.7972265777978, - 1268.4898701951308, - 1276.752811676733, - 1284.565434958941, - 1291.9067213059036, - 1298.7552688225965, - 1305.089314361913, - 1310.8867579556504 + 14.043185326206931, + 85.38746165704923, + 103.8187563433689, + 118.34879148890431, + 131.30740100786218, + 143.4680449572634, + 155.1840574772697, + 166.6454585213237, + 177.9652104867585, + 189.21513849280484, + 200.44312666645078, + 211.6822070995746, + 222.955734534277, + 234.2805086722217, + 245.66874812897933, + 257.12938712736906, + 268.6689549559658, + 280.29218874552794, + 292.00247032786945, + 303.8021438272372, + 315.6927504221582, + 327.6752043418669, + 339.74992636511985, + 351.9169460502535, + 364.1759805936849, + 376.5264959657022, + 388.96775442688903, + 401.4988514481413, + 414.1187442903532, + 426.82627394781616, + 439.6201817567793, + 452.4991216735468, + 465.46166900477186, + 478.5063262054739, + 491.63152623307093, + 504.83563384800885, + 518.1169451758919, + 531.4736857869556, + 544.9040075022866, + 558.4059840994584, + 571.9776060609585, + 585.6167744853783, + 599.3212942624453, + 613.0888665977393, + 626.9170809605537, + 640.8034065182989, + 654.7451831126174, + 668.7396118256845, + 682.783745179712, + 696.874477008198, + 711.0085320338815, + 725.1824551854553, + 739.3926006827744, + 753.6351209185189, + 767.9059551628796, + 782.2008181168638, + 796.5151883391192, + 810.844296570826, + 825.1831139830392, + 839.5263403709943, + 853.8683923201497, + 868.2033913692687, + 882.5251521964594, + 896.8271708549349, + 911.1026130862009, + 925.3443027394997, + 939.5447103275436, + 953.695941749964, + 967.7897272173554, + 981.8174104104145, + 995.7699379103616, + 1009.637848938667, + 1023.4112654460321, + 1037.079882592602, + 1050.632959663524, + 1064.0593114662154, + 1077.3473002580304, + 1090.4848282554733, + 1103.459330778634, + 1116.2577700871698, + 1128.866629966889, + 1141.2719111288422, + 1153.4591274857482, + 1165.4133033736289, + 1177.1189717896418, + 1188.560173720353, + 1199.7204586379953, + 1210.5828862457035, + 1221.130029556224, + 1231.3439793922303, + 1241.2063504001053, + 1250.6982886728306, + 1259.8004810816049, + 1268.49316641976, + 1276.7561484667337, + 1284.568811083998, + 1291.910135459228, + 1298.7587196193704, + 1305.0928003377903, + 1310.8902775653303 ] } -} \ No newline at end of file +} diff --git a/tests/integration/fixtures/material_transformer_5_windings.json b/tests/integration/fixtures/material_transformer_5_windings.json index 2de9ebb1..e20cbc01 100644 --- a/tests/integration/fixtures/material_transformer_5_windings.json +++ b/tests/integration/fixtures/material_transformer_5_windings.json @@ -1,7 +1,7 @@ { "T_60__f_100000": { - "sigma_core_real": 0.8288933502637698, - "sigma_core_imag": 0.5920447701453387, + "sigma_core_real": 0.8252555594868071, + "sigma_core_imag": 0.5971051274636174, "magnetic_flux_density": [ 0.0, 0.0030303030303030303, @@ -105,208 +105,208 @@ 0.3 ], "permeability_real": [ - 1601.1944644783528, - 1641.1141755987971, - 1679.4115719794972, - 1716.1230552819966, - 1751.2995952827428, - 1784.991481903164, - 1817.2482024124638, - 1848.118411226924, - 1877.6499201801942, - 1905.8896952055818, - 1932.8838554036547, - 1958.6776730577828, - 1983.3155740037541, - 2006.841138081916, - 2029.2970995391445, - 2050.7253473137985, - 2071.1669251706876, - 2090.662031671734, - 2109.2500199789356, - 2126.969397492929, - 2143.857825334711, - 2159.952117680844, - 2175.2882409642834, - 2189.901312954087, - 2203.8256017279573, - 2217.094524551896, - 2229.7406466813245, - 2241.7956800978973, - 2253.290482195985, - 2264.2550544323963, - 2274.7185409524805, - 2284.7092272052123, - 2294.254538559332, - 2303.3810389320397, - 2312.1144294412056, - 2320.4795470915033, - 2328.500363504357, - 2336.199983701158, - 2343.6006449487377, - 2350.723715675762, - 2357.5896944683846, - 2364.2182091532663, - 2370.6280159759153, - 2376.83699888219, - 2382.862168910811, - 2388.7196637047623, - 2394.4247471496165, - 2399.991809146991, - 2405.4343655316425, - 2410.7650581410207, - 2415.9956550465076, - 2421.137050956031, - 2426.1992677982175, - 2431.1914554988357, - 2436.121892960825, - 2440.9979892598335, - 2445.826285067821, - 2450.6124543178817, - 2455.3613061241253, - 2460.076786970998, - 2464.761983187071, - 2469.419123718807, - 2474.049583220317, - 2478.653885475511, - 2483.2317071693274, - 2487.7818820249504, - 2492.302405323892, - 2496.7904388258003, - 2501.2423161044685, - 2505.6535483160537, - 2510.0188304147737, - 2514.3320478302912, - 2518.586283619762, - 2522.7738261058203, - 2526.8861770098124, - 2530.914060087213, - 2534.8474302693003, - 2538.67548331193, - 2542.386665948413, - 2545.9686865391936, - 2549.408526206121, - 2552.6924504335325, - 2555.806021112233, - 2558.7341089955207, - 2561.4609065288305, - 2563.9699410061676, - 2566.2440879973424, - 2568.2655849800326, - 2570.016045099869, - 2571.476470970062, - 2572.6272684095306, - 2573.448260005126, - 2573.918698369269, - 2574.017278949255, - 2573.7221522287055, - 2573.0109351449487, - 2571.8607215290644, - 2570.2480913575077, - 2568.149118586015, - 2565.5393773182404 + 1601.1944644775383, + 1641.1141755560188, + 1679.4115719606395, + 1716.1230552984937, + 1751.2995953399793, + 1784.9914820036545, + 1817.248202556675, + 1848.1184114135563, + 1877.649920406284, + 1905.8896954665427, + 1932.8838556932972, + 1958.6776733683269, + 1983.3155743258458, + 2006.8411384046476, + 2029.2970998500832, + 2050.7253475990215, + 2071.1669254148214, + 2090.6620318580026, + 2109.2500200892127, + 2126.969397507792, + 2143.8578252335, + 2159.9521174417223, + 2175.288240564299, + 2189.9013123692334, + 2203.825600933233, + 2217.0945235213658, + 2229.740645388176, + 2241.7956785144975, + 2253.2904802939292, + 2264.255052182558, + 2274.7185383250558, + 2284.7092241697615, + 2294.2545350848122, + 2303.3810349868413, + 2312.1144249931785, + 2320.479542107978, + 2328.5003579521663, + 2336.199977546649, + 2343.6006381577836, + 2350.723708213769, + 2357.589686300292, + 2364.2182002435493, + 2370.6280062885785, + 2376.836988380761, + 2382.86215755833, + 2388.719651463774, + 2394.424733982152, + 2399.9917950145527, + 2405.434350395193, + 2410.765041960961, + 2415.995637782663, + 2421.1370325676316, + 2426.1992482438836, + 2431.191434736566, + 2436.1218709479776, + 2440.997965953122, + 2445.826260423298, + 2450.6124282909436, + 2455.3612786695026, + 2460.0767580427655, + 2464.7619527386523, + 2469.419091702989, + 2474.0495495892724, + 2478.6538501808222, + 2483.231670162026, + 2487.781843255554, + 2492.30236474246, + 2496.790396381992, + 2501.2422717476175, + 2505.6535019952485, + 2510.018782078947, + 2514.331997428334, + 2518.5862311006363, + 2522.7737714186933, + 2526.886120104202, + 2530.914000913152, + 2534.84736877751, + 2538.6754194540176, + 2542.386599677079, + 2545.9686178084617, + 2549.408454971582, + 2552.692376652608, + 2555.8059447444566, + 2558.734030002843, + 2561.4608248759355, + 2563.9698566608126, + 2566.2440009307143, + 2568.2654951671248, + 2570.015952519879, + 2571.4763756068, + 2572.6271702518484, + 2573.4481590473615, + 2573.9185946117022, + 2574.0171723985886, + 2573.7220428985356, + 2573.010823056262, + 2571.8606067107394, + 2570.2479738468005, + 2568.148998429082, + 2565.5392545706213 ], "permeability_imag": [ - 0.2749385293778228, - 7.484328639168256, - 10.773270479832876, - 13.757484131324723, - 16.689573142324395, - 19.654626902254975, - 22.690482543836534, - 25.81609747036282, - 29.04132365658593, - 32.371057799130085, - 35.80726528165318, - 39.350072531091826, - 42.99840516216884, - 46.75038570506829, - 50.60359536842437, - 54.55525452166503, - 58.602352191441646, - 62.741742170741745, - 66.97021638866939, - 71.28456221751757, - 75.68160803959823, - 80.15825995529495, - 84.71153160641741, - 89.33856850290931, - 94.03666785369983, - 98.80329464110491, - 103.63609449823501, - 108.53290382261173, - 113.4917574689539, - 118.51089429839404, - 123.5887608126435, - 128.72401306475717, - 133.9155170096979, - 139.16234743548273, - 144.46378559765526, - 149.81931566498994, - 155.2286200718817, - 160.6915738622042, - 166.20823810010734, - 171.77885241496477, - 177.40382674024772, - 183.08373229932968, - 188.81929188500393, - 194.61136947373294, - 200.46095921028336, - 206.36917379340557, - 212.33723228852978, - 218.36644738909817, - 224.458212144079, - 230.61398616543661, - 236.83528132584829, - 243.12364695377192, - 249.4806545300645, - 255.90788188777063, - 262.4068969144108, - 268.97924075413533, - 275.6264105054702, - 282.3498414090804, - 289.15088851901896, - 296.03080785032114, - 302.99073699557704, - 310.0316752032482, - 317.1544629110198, - 324.35976072840316, - 331.6480278641268, - 339.01949999560503, - 346.4741665799268, - 354.01174760842986, - 361.63166980995925, - 369.33304231141807, - 377.1146317681904, - 384.9748369814381, - 392.9116630242196, - 400.9226949037663, - 409.0050707931731, - 417.15545487218174, - 425.3700098236507, - 433.64436903979043, - 441.97360860020154, - 450.35221909230904, - 458.77407735384656, - 467.2324182266801, - 475.7198064214703, - 484.2281086034133, - 492.74846582067113, - 501.27126640901764, - 509.78611951874575, - 518.2818294230127, - 526.7463707805246, - 535.1668650397945, - 543.5295581871775, - 551.8198000564687, - 560.022025434068, - 568.1197372105757, - 576.0954918471984, - 583.9308874434695, - 591.6065547116366, - 599.102151182551, - 606.3963589879786, - 613.4668865851874 + 0.2749432753553325, + 7.484338019368523, + 10.77327341959651, + 13.757482073483716, + 16.689567136292435, + 19.65461777597252, + 22.69047099417932, + 25.816084109780913, + 29.041309038911194, + 32.371042434723826, + 35.807249646708605, + 39.35005707355105, + 42.998390305598235, + 46.75037185126412, + 50.6035828992135, + 54.55524380018869, + 58.60234356310706, + 62.74173596396084, + 66.97021291546446, + 71.28456177404634, + 75.68161090663344, + 80.1582663986822, + 84.71154187752573, + 89.33858283908468, + 94.0366864787267, + 98.80331776567886, + 103.63612232044761, + 108.53293652844698, + 113.49179523279487, + 118.51093728353823, + 123.58880917182448, + 128.7240669406701, + 133.91557653552587, + 139.162412735423, + 144.46385678744065, + 149.8193928524045, + 155.22870335726822, + 160.69166333896092, + 166.20833385517224, + 171.77895452928547, + 177.40393528923553, + 183.08384735329602, + 188.81941350957837, + 194.61149773025983, + 200.46109415619938, + 206.3693154825932, + 212.3373807716491, + 218.36660271389468, + 224.4583743556675, + 230.6141553065595, + 236.83545743711028, + 243.12383007384744, + 249.48084469588045, + 255.90807913466352, + 262.4071012762566, + 268.97945226345365, + 275.6266291935022, + 282.3500673058412, + 289.1511216533217, + 296.0310482497769, + 302.99098468656774, + 310.0319302108732, + 317.154725259017, + 324.3600304390446, + 331.64830495808786, + 339.0197844918092, + 346.4744584953648, + 354.01204695795417, + 361.63197660605397, + 369.33335656394553, + 377.11495348411097, + 384.9751661645114, + 392.91199967467736, + 400.9230390179676, + 409.0054223632339, + 417.1558138855843, + 425.37037626283376, + 433.6447428817164, + 441.9739898159079, + 450.3526076464382, + 458.77447320415996, + 467.2328213235558, + 475.7202167073845, + 484.2285260124091, + 492.7488902778143, + 501.27169782983907, + 509.7865578086763, + 518.282274476811, + 526.7468224816963, + 535.1673232600094, + 543.5300227856824, + 551.8202708795022, + 560.0225023142783, + 568.1202199664444, + 576.0959802824697, + 583.9313813465911, + 591.6070538552218, + 599.1026553228434, + 606.396867864358, + 613.467399919685 ] } -} \ No newline at end of file +} diff --git a/tests/integration/fixtures/thermal_transformer_5_windings.json b/tests/integration/fixtures/thermal_transformer_5_windings.json index 8d2c69da..deaa0dc9 100644 --- a/tests/integration/fixtures/thermal_transformer_5_windings.json +++ b/tests/integration/fixtures/thermal_transformer_5_windings.json @@ -1,206 +1,206 @@ { "core_parts": { "core_part_1": { - "min": 21.89074590634518, - "max": 35.69331478029109, - "mean": 31.180361694881842 + "min": 21.89058858128058, + "max": 35.69209553762565, + "mean": 31.179472089625616 }, "total": { - "min": 21.89074590634518, - "max": 35.69331478029109, - "mean": 31.180361694881842 + "min": 21.89058858128058, + "max": 35.69209553762565, + "mean": 31.179472089625616 } }, "windings": { "winding_0_0": { - "min": 28.27269099013614, - "max": 28.27455715373265, - "mean": 28.273833778847465 + "min": 28.27211078645049, + "max": 28.27397685106813, + "mean": 28.27325351252296 }, "winding_0_1": { - "min": 31.18373695777952, - "max": 31.1847767875157, - "mean": 31.18429449512002 + "min": 31.1830144195871, + "max": 31.18405420172288, + "mean": 31.183571929847766 }, "winding_0_2": { - "min": 33.2573559404235, - "max": 33.25824290535496, - "mean": 33.257838064033265 + "min": 33.25653440712629, + "max": 33.25742139782136, + "mean": 33.257016562124896 }, "winding_0_3": { - "min": 34.82435458911535, - "max": 34.82553690372502, - "mean": 34.82501995650759 + "min": 34.82345660124768, + "max": 34.82463898071421, + "mean": 34.82412200469381 }, "winding_0_4": { - "min": 36.02597836802317, - "max": 36.02735752491894, - "mean": 36.02675116495232 + "min": 36.02501982704608, + "max": 36.02639904965938, + "mean": 36.025792660106056 }, "winding_0_5": { - "min": 36.92624114087712, - "max": 36.92775185229564, - "mean": 36.92709379381279 + "min": 36.925233508278, + "max": 36.92674428842589, + "mean": 36.92608619870321 }, "winding_0_6": { - "min": 37.5133863425207, - "max": 37.51498555418796, - "mean": 37.51428866548357 + "min": 37.51233486710978, + "max": 37.51393415113341, + "mean": 37.513237228562495 }, "winding_0_7": { - "min": 37.59464370804763, - "max": 37.59576276363101, - "mean": 37.59536016152845 + "min": 37.59353649371656, + "max": 37.5946555890275, + "mean": 37.59425297156448 }, "winding_0_8": { - "min": 37.75134559638587, - "max": 37.75254978206427, - "mean": 37.75208505500915 + "min": 37.75021016100177, + "max": 37.75141438518102, + "mean": 37.75094964271953 }, "winding_0_9": { - "min": 37.69140277507309, - "max": 37.69261456747857, - "mean": 37.69212947957361 + "min": 37.6902548607486, + "max": 37.69146669207998, + "mean": 37.690981588035896 }, "winding_0_10": { - "min": 37.4061337481025, - "max": 37.40725660568974, - "mean": 37.40679883816214 + "min": 37.40498491964274, + "max": 37.40610781531272, + "mean": 37.40565003194282 }, "winding_0_11": { - "min": 36.87077207251087, - "max": 36.87176428330835, - "mean": 36.87135422195738 + "min": 36.86963349994669, + "max": 36.87062574800487, + "mean": 36.870215671643074 }, "winding_0_12": { - "min": 36.05008131335784, - "max": 36.0508538650035, - "mean": 36.050520278101224 + "min": 36.04896526943882, + "max": 36.04973785483598, + "mean": 36.049404255902765 }, "winding_0_13": { - "min": 34.93341786961528, - "max": 34.93398837945004, - "mean": 34.93370353531699 + "min": 34.93233986051474, + "max": 34.932910356262, + "mean": 34.93262551639092 }, "winding_0_14": { - "min": 33.49409286619181, - "max": 33.49471944924381, - "mean": 33.49438601646803 + "min": 33.49307508493219, + "max": 33.49370163878363, + "mean": 33.49336821892312 }, "winding_0_15": { - "min": 27.65773016025996, - "max": 27.65991760059499, - "mean": 27.658985310948992 + "min": 27.65727060086675, + "max": 27.6594579749151, + "mean": 27.658525712557584 }, "winding_0_16": { - "min": 31.82682086639856, - "max": 31.8283008571664, - "mean": 31.827616720914026 + "min": 31.82623179187363, + "max": 31.82771173669857, + "mean": 31.827027620234972 }, "winding_0_17": { - "min": 34.85544701234386, - "max": 34.85656268885798, - "mean": 34.85602639097002 + "min": 34.85475836932444, + "max": 34.85587401699728, + "mean": 34.85533773187919 }, "winding_0_18": { - "min": 37.04102081642354, - "max": 37.04189472568767, - "mean": 37.041450757789725 + "min": 37.04025643394496, + "max": 37.04113033719416, + "mean": 37.040686363301674 }, "winding_0_19": { - "min": 38.63498290649724, - "max": 38.63586193930618, - "mean": 38.63546568924797 + "min": 38.63416254250377, + "max": 38.63504161274005, + "mean": 38.634645349812466 }, "winding_0_20": { - "min": 39.79122768203122, - "max": 39.79212975744667, - "mean": 39.791735984107284 + "min": 39.79036745785469, + "max": 39.79126958089729, + "mean": 39.79087578763234 }, "winding_0_21": { - "min": 40.56562946380334, - "max": 40.56662139836986, - "mean": 40.56617967164298 + "min": 40.56474264642648, + "max": 40.5657346389491, + "mean": 40.56529288594689 }, "winding_1_0": { - "min": 28.11412459815289, - "max": 28.11779307801304, - "mean": 28.11622020360037 + "min": 28.11376492763688, + "max": 28.11743335865257, + "mean": 28.1158605072321 }, "winding_1_1": { - "min": 33.84416475686282, - "max": 33.84658038668439, - "mean": 33.84536859526631 + "min": 33.84370743623784, + "max": 33.84612301862831, + "mean": 33.84491125057954 }, "winding_1_2": { - "min": 38.24139040992681, - "max": 38.24303447616739, - "mean": 38.24223480465842 + "min": 38.240838311474, + "max": 38.24248233914423, + "mean": 38.24168268497724 }, "winding_1_3": { - "min": 40.92125929113724, - "max": 40.92225034881331, - "mean": 40.92173478008098 + "min": 40.92064115338171, + "max": 40.92163218327976, + "mean": 40.92111662613359 }, "winding_1_4": { - "min": 42.51142423469816, - "max": 42.51215195979808, - "mean": 42.511824736007895 + "min": 42.51076388867249, + "max": 42.51149158683882, + "mean": 42.511164370923986 }, "winding_1_5": { - "min": 43.31709869600027, - "max": 43.31774283483737, - "mean": 43.317527760975494 + "min": 43.3164207904992, + "max": 43.31706490017431, + "mean": 43.31684983446826 }, "winding_2_0": { - "min": 50.02894185968338, - "max": 50.02979325961362, - "mean": 50.02937910889492 + "min": 50.02827507681973, + "max": 50.02912646637876, + "mean": 50.02871231641881 }, "winding_2_1": { - "min": 51.42554152099285, - "max": 51.42610548958569, - "mean": 51.42591022931351 + "min": 51.42487768411975, + "max": 51.42544164083664, + "mean": 51.42524638169708 }, "winding_2_2": { - "min": 51.65066757116966, - "max": 51.65115529042797, - "mean": 51.65102995639717 + "min": 51.65000486538203, + "max": 51.65049257119929, + "mean": 51.65036724000022 }, "winding_2_3": { - "min": 50.77749576353401, - "max": 50.77817738205779, - "mean": 50.77786603667621 + "min": 50.7768343966171, + "max": 50.77751600375083, + "mean": 50.77720466001422 }, "winding_2_4": { - "min": 48.65710437319193, - "max": 48.65822080267768, - "mean": 48.65766112251633 + "min": 48.65644604203081, + "max": 48.65756246895655, + "mean": 48.657002789881226 }, "winding_2_5": { - "min": 44.83316482144008, - "max": 44.83516400264712, - "mean": 44.83423672406393 + "min": 44.8325128248227, + "max": 44.83451200035347, + "mean": 44.8335847236212 }, "winding_3_0": { - "min": 39.12102967984335, - "max": 39.12304394570236, - "mean": 39.121766279858186 + "min": 39.12039326674368, + "max": 39.1224075189123, + "mean": 39.12112985765316 }, "winding_4_0": { - "min": 24.98690079927257, - "max": 24.98810746792704, - "mean": 24.987598248399937 + "min": 24.98661759554721, + "max": 24.98782424322062, + "mean": 24.987315034780934 }, "winding_4_1": { - "min": 27.14154882044399, - "max": 27.14278996732319, - "mean": 27.14205254693659 + "min": 27.14123583712323, + "max": 27.14247695614485, + "mean": 27.14173955171012 }, "total": { - "min": 24.98690079927257, - "max": 51.65115529042797, - "mean": 37.72338727470653 + "min": 24.98661759554721, + "max": 51.65049257119929, + "mean": 37.72261641284163 } }, "misc": { @@ -208,8 +208,8 @@ "case_weight": -1 }, "insulations": { - "min": 22.42061136265915, - "max": 37.16610581024892, - "mean": 31.016212117624917 + "min": 22.42042438216057, + "max": 37.16495353213015, + "mean": 31.015398844310923 } }