@@ -947,11 +947,13 @@ def single_fem_simulation(fem_input: IoFemInput, show_visual_outputs: bool = Fal
947947 plot_interpolation = False , show_fem_simulation_results = show_visual_outputs )
948948
949949 # read the flux per mesh cell and transfer it into losses with the help of the magnet model
950- hyst_losses_custom = geo .calc_hystersis_losses_with_MagNet_model_PB_based_on_mesh_results (b_wave = fmt .WaveformType .Custom ,
950+ hyst_losses_magnet = geo .calc_hystersis_losses_with_MagNet_model_PB_based_on_mesh_results (b_wave = fmt .WaveformType .Custom ,
951951 custom_b_wave = normalized_current_interp )
952-
953952 result_dict_hyst = geo .read_log ()
954953
954+ core_eddy_current_losses = result_dict_hyst ['total_losses' ]['eddy_core' ]
955+ core_loss_magnet_eddy = hyst_losses_magnet + core_eddy_current_losses
956+
955957 # get the winding losses
956958 geo .excitation_sweep (frequency_list = fem_input .fft_frequency_list , current_list_list = current_amplitudes ,
957959 phi_deg_list_list = phases , show_last_fem_simulation = show_visual_outputs )
@@ -961,7 +963,7 @@ def single_fem_simulation(fem_input: IoFemInput, show_visual_outputs: bool = Fal
961963 inductance = result_dict ['single_sweeps' ][0 ]['winding1' ]['flux_over_current' ][0 ],
962964 p_loss_winding = result_dict ['total_losses' ]['winding1' ]['total' ],
963965 p_core_sine = result_dict_hyst ['total_losses' ]['core' ],
964- p_core_magnet = hyst_losses_custom ,
966+ p_core_magnet = core_loss_magnet_eddy ,
965967 volume = result_dict ["misc" ]["core_2daxi_total_volume" ]
966968 )
967969 return fem_output
@@ -990,7 +992,7 @@ def filter_combined_loss_list_df(df: pd.DataFrame, factor_min_dc_losses: float =
990992 def full_simulation (df_geometry : pd .DataFrame , current_waveform : list , inductor_config_filepath : str , process_number : int = 1 ,
991993 print_derivations : bool = False ) -> tuple :
992994 """
993- Reluctance model (hysteresis losses) and FEM simulation (winding losses and eddy current losses) for geometries from df_geometry.
995+ FEM simulation (winding losses and hysteresis losses from magnet model ) for geometries from df_geometry.
994996
995997 :param df_geometry: Pandas dataframe with only one single geometries
996998 :type df_geometry: pd.DataFrame
@@ -1104,8 +1106,7 @@ def full_simulation(df_geometry: pd.DataFrame, current_waveform: list, inductor_
11041106
11051107 reluctance_output : IoReluctanceModelOutput = InductorOptimization .ReluctanceModel .single_reluctance_model_simulation (reluctance_model_input )
11061108
1107- p_core = reluctance_output .p_hyst + fem_output .p_core_sine
1108- p_total = p_core + fem_output .p_loss_winding
1109+ p_total = fem_output .p_core_magnet + fem_output .p_loss_winding
11091110
11101111 if print_derivations :
11111112 logger .info (f"Inductance reluctance: { local_config .target_inductance } " )
@@ -1122,4 +1123,4 @@ def full_simulation(df_geometry: pd.DataFrame, current_waveform: list, inductor_
11221123 logger .info (f"P_hyst FEM: { fem_output .p_core_magnet } " )
11231124 logger .info (f"P_hyst derivation: { (reluctance_output .p_hyst - fem_output .p_core_magnet ) / reluctance_output .p_hyst * 100 } %" )
11241125
1125- return reluctance_output .volume , p_total , reluctance_output .area_to_heat_sink , fem_output .p_loss_winding , p_core
1126+ return reluctance_output .volume , p_total , reluctance_output .area_to_heat_sink , fem_output .p_loss_winding , fem_output . p_core_magnet
0 commit comments