Skip to content

Commit

Permalink
Merge pull request #62 from upb-lea/core_loss_split
Browse files Browse the repository at this point in the history
Fix P/Q for f=0, Fix core loss summary for several core parts
  • Loading branch information
gituser789 authored Nov 9, 2023
2 parents 1f4c5a0 + 6f82a50 commit 4ced7e3
Show file tree
Hide file tree
Showing 15 changed files with 1,107 additions and 740 deletions.
157 changes: 81 additions & 76 deletions femmt/component.py

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions femmt/optimization/ito_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ def set_up_folder_structure(working_directory: str) -> WorkingDirectories:
electro_magnetic_folder_general = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir, "electro_magnetic"))
strands_coefficients_folder_general = os.path.join(electro_magnetic_folder_general, "Strands_Coefficients")

print(f"{electro_magnetic_folder_general = }")
print(f"{strands_coefficients_folder_general = }")

if not os.path.isdir(working_directory):
os.mkdir(working_directory)

Expand Down
1,432 changes: 864 additions & 568 deletions femmt/optimization/sto.py

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions femmt/optimization/sto_dtos.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from materialdatabase.dtos import MaterialCurve
from femmt.enumerations import *


@dataclass
class StoInsulation:
iso_top_core: float
Expand All @@ -18,6 +19,7 @@ class StoInsulation:
iso_primary_to_secondary: float
iso_primary_inner_bobbin: float


@dataclass
class StoSingleInputConfig:
"""
Expand Down Expand Up @@ -65,6 +67,16 @@ class StoSingleInputConfig:
permittivity_measurement_setup: MeasurementSetup


@dataclass
class ThermalConfig:
thermal_conductivity_dict: dict
case_gap_top: float
case_gap_right: float
case_gap_bot: float
boundary_temperatures: dict
boundary_flags: dict


@dataclass
class WorkingDirectories:
"""
Expand All @@ -77,6 +89,7 @@ class WorkingDirectories:
fem_thermal_simulation_results_directory: str
fem_thermal_filtered_simulation_results_directory: str


@dataclass
class StoTargetAndFixedParameters:
"""
Expand All @@ -96,3 +109,13 @@ class StoTargetAndFixedParameters:
fundamental_frequency: float
target_inductance_matrix: np.ndarray
working_directories: WorkingDirectories


@dataclass
class CurrentWorkingPoint:
"""
Stores the working point of currents together with a human-readable name
"""
name: str
time_current_1_vec: np.ndarray | list
time_current_2_vec: np.ndarray | list
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,18 @@
"all_windings": 0.4709150486451306,
"eddy_core": 0.01571862829606287,
"total_core_part_1": 0.47677033841409433,
"total_eddy_core_part_1": 0.00657139049155327,
"total_hyst_core_part_1": 0.4701989479225411,
"total_core_part_2": 0.2075621117123285,
"total_eddy_core_part_2": 0.00914723780450959,
"total_hyst_core_part_2": 0.1984148739078189,
"hyst_core_fundamental_freq": 0.6686138218303596,
"core": 0.6843324501264224,
"total_losses": 1.155247498771553
},
"simulation_settings": {
"simulation_name": null,
"date": "2023-11-03 14:33:47",
"date": "2023-11-08 18:18:04",
"component_type": "Inductor",
"working_directory": "/home/nikolasf/Dokumente/01_git/30_Python/FEMMT/tests/integration/temp",
"core": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
"core_hyst_losses": 2.227725967733116,
"core_parts": {
"core_part_1": {
"eddy_losses": 0.05498444728977709,
"hyst_losses": 2.227725967733116,
"total_core_part_1": 2.2827104150228927
}
},
Expand Down Expand Up @@ -70,13 +72,15 @@
"all_windings": 1.371127986412009,
"eddy_core": 0.05498444728977709,
"total_core_part_1": 2.2827104150228927,
"total_eddy_core_part_1": 0.05498444728977709,
"total_hyst_core_part_1": 2.227725967733116,
"hyst_core_fundamental_freq": 2.227725967733116,
"core": 2.2827104150228927,
"total_losses": 3.6538384014349017
},
"simulation_settings": {
"simulation_name": null,
"date": "2023-11-08 12:49:22",
"date": "2023-11-08 19:08:12",
"component_type": "Inductor",
"working_directory": "/home/nikolasf/Dokumente/01_git/30_Python/FEMMT/tests/integration/temp",
"core": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
"core_hyst_losses": 0.3805400084075918,
"core_parts": {
"core_part_1": {
"eddy_losses": 0.00934704409965321,
"hyst_losses": 0.3805400084075918,
"total_core_part_1": 0.389887052507245
}
},
Expand All @@ -56,13 +58,15 @@
"all_windings": 0.1272686604504369,
"eddy_core": 0.00934704409965321,
"total_core_part_1": 0.389887052507245,
"total_eddy_core_part_1": 0.00934704409965321,
"total_hyst_core_part_1": 0.3805400084075918,
"hyst_core_fundamental_freq": 0.3805400084075918,
"core": 0.389887052507245,
"total_losses": 0.5171557129576818
},
"simulation_settings": {
"simulation_name": null,
"date": "2023-11-08 12:47:07",
"date": "2023-11-08 19:07:10",
"component_type": "Inductor",
"working_directory": "/home/nikolasf/Dokumente/01_git/30_Python/FEMMT/tests/integration/temp",
"core": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,18 @@
"all_windings": 0.1120278132410119,
"eddy_core": 0.01606920614810965,
"total_core_part_1": 0.4865760714240864,
"total_eddy_core_part_1": 0.006588393845274102,
"total_hyst_core_part_1": 0.4799876775788123,
"total_core_part_2": 0.21548365847423454,
"total_eddy_core_part_2": 0.00948081230283554,
"total_hyst_core_part_2": 0.206002846171399,
"hyst_core_fundamental_freq": 0.685990523750212,
"core": 0.7020597298983217,
"total_losses": 0.8140875431393335
},
"simulation_settings": {
"simulation_name": null,
"date": "2023-11-03 14:34:18",
"date": "2023-11-08 18:30:17",
"component_type": "Inductor",
"working_directory": "/home/nikolasf/Dokumente/01_git/30_Python/FEMMT/tests/integration/temp",
"core": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,18 @@
"all_windings": 0.4706851404414779,
"eddy_core": 0.005238272112541359,
"total_core_part_1": 0.1387459737341604,
"total_eddy_core_part_1": 0.002189318573992297,
"total_hyst_core_part_1": 0.1365566551601681,
"total_core_part_2": 0.0656497288201208,
"total_eddy_core_part_2": 0.003048953538549063,
"total_hyst_core_part_2": 0.06260077528157174,
"hyst_core_fundamental_freq": 0.1991574304417403,
"core": 0.20439570255428166,
"total_losses": 0.6750808429957595
},
"simulation_settings": {
"simulation_name": null,
"date": "2023-11-03 14:32:22",
"date": "2023-11-08 18:16:45",
"component_type": "Inductor",
"working_directory": "/home/nikolasf/Dokumente/01_git/30_Python/FEMMT/tests/integration/temp",
"core": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,18 @@
"all_windings": 0.4580489999164769,
"eddy_core": 0.005970074514340104,
"total_core_part_1": 0.29678762989474966,
"total_eddy_core_part_1": 0.002491994027811744,
"total_hyst_core_part_1": 0.2942956358669379,
"total_core_part_2": 0.13298701155082568,
"total_eddy_core_part_2": 0.003478080486528357,
"total_hyst_core_part_2": 0.1295089310642973,
"hyst_core_fundamental_freq": 0.4238045669312349,
"core": 0.42977464144557503,
"total_losses": 0.8878236413620519
},
"simulation_settings": {
"simulation_name": null,
"date": "2023-11-03 14:33:17",
"date": "2023-11-08 18:17:34",
"component_type": "Inductor",
"working_directory": "/home/nikolasf/Dokumente/01_git/30_Python/FEMMT/tests/integration/temp",
"core": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@
"core_hyst_losses": 0.0302902495099854,
"core_parts": {
"core_part_1": {
"eddy_losses": 0.003742574947502717,
"hyst_losses": 0.0302902495099854,
"total_core_part_1": 0.03403282445748812
}
},
Expand Down Expand Up @@ -116,13 +118,15 @@
"all_windings": 6.80486776861339,
"eddy_core": 0.003742574947502717,
"total_core_part_1": 0.03403282445748812,
"total_eddy_core_part_1": 0.003742574947502717,
"total_hyst_core_part_1": 0.0302902495099854,
"hyst_core_fundamental_freq": 0.0302902495099854,
"core": 0.03403282445748812,
"total_losses": 6.8389005930708775
},
"simulation_settings": {
"simulation_name": null,
"date": "2023-11-03 14:37:40",
"date": "2023-11-08 19:09:03",
"component_type": "Transformer",
"working_directory": "/home/nikolasf/Dokumente/01_git/30_Python/FEMMT/tests/integration/temp",
"core": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,18 @@
"all_windings": 1.3648193493804854,
"eddy_core": 0.0008530748745437754,
"total_core_part_1": 0.008215272937120988,
"total_eddy_core_part_1": 0.0007634983801010015,
"total_hyst_core_part_1": 0.007451774557019985,
"total_core_part_2": 0.0004057344089877404,
"total_eddy_core_part_2": 8.957649444277318e-05,
"total_hyst_core_part_2": 0.0003161579145449672,
"hyst_core_fundamental_freq": 0.007767932471564947,
"core": 0.008621007346108722,
"total_losses": 1.3734403567265943
},
"simulation_settings": {
"simulation_name": null,
"date": "2023-11-03 14:38:43",
"date": "2023-11-08 18:19:56",
"component_type": "IntegratedTransformer",
"working_directory": "/home/nikolasf/Dokumente/01_git/30_Python/FEMMT/tests/integration/temp",
"core": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@
"core_hyst_losses": 0.003942034545531867,
"core_parts": {
"core_part_1": {
"eddy_losses": 0.000450816615417936,
"hyst_losses": 0.003942034545531867,
"total_core_part_1": 0.004392851160949803
}
},
Expand Down Expand Up @@ -132,13 +134,15 @@
"all_windings": 5.921688250167905,
"eddy_core": 0.000450816615417936,
"total_core_part_1": 0.004392851160949803,
"total_eddy_core_part_1": 0.000450816615417936,
"total_hyst_core_part_1": 0.003942034545531867,
"hyst_core_fundamental_freq": 0.003942034545531867,
"core": 0.004392851160949803,
"total_losses": 5.926081101328855
},
"simulation_settings": {
"simulation_name": null,
"date": "2023-11-03 14:38:15",
"date": "2023-11-08 19:09:46",
"component_type": "Transformer",
"working_directory": "/home/nikolasf/Dokumente/01_git/30_Python/FEMMT/tests/integration/temp",
"core": {
Expand Down
Loading

0 comments on commit 4ced7e3

Please sign in to comment.