3333class InductorOptimization :
3434 """Reluctance model and FEM simulation for the inductor optimization."""
3535
36+ # Saturation threshold for calculation with Inductor optimization
37+ _IO_SATURATION_THRESHOLD = 0.8
38+
3639 @staticmethod
3740 def filter_df (df : pd .DataFrame , x : str = "values_0" , y : str = "values_1" , factor_min_dc_losses : float = 1.2 ,
3841 factor_max_dc_losses : float = 10 ) -> pd .DataFrame :
@@ -437,9 +440,9 @@ def single_reluctance_model_simulation_dc_offset(reluctance_input: IoReluctanceM
437440 previous_dynamic_mu_r_abs = dynamic_mu_r_abs
438441
439442 # Do not cross out saturation, as the genetic algorithm is missing bad results to improve its suggestions
440- if flux_avg_density > 0.8 * reluctance_input .initial_mag_curve ["b" ].iloc [- 1 ] or dynamic_mu_r_abs < 0 :
441- print (f"Average flux density is too high (80 % of b_sat) : { flux_avg_density } "
442- f"T > 0.8 * { reluctance_input .initial_mag_curve ['b' ].iloc [- 1 ]} T mur={ dynamic_mu_r_abs } " )
443+ if flux_avg_density > reluctance_input .initial_mag_curve ["b" ].iloc [- 1 ] or dynamic_mu_r_abs < 0 :
444+ logger . info (f"Average flux density exceeds range of initial magnetization curve : { flux_avg_density } "
445+ f"T > { reluctance_input .initial_mag_curve ['b' ].iloc [- 1 ]} T mur={ dynamic_mu_r_abs } " )
443446 reluctance_model_output = IoReluctanceModelOutput (
444447 p_loss_total = float ('nan' ),
445448 volume = float ('nan' ),
@@ -469,22 +472,6 @@ def single_reluctance_model_simulation_dc_offset(reluctance_input: IoReluctanceM
469472 flux_amplitude = (flux .max () - flux .min ())/ 2
470473 flux_amplitude_density = flux_amplitude / core_cross_section
471474
472- # Do not cross out saturation, as the genetic algorithm is missing bad results to improve its suggestions
473- if (flux_avg_density + flux_amplitude_density ) > 0.8 * reluctance_input .initial_mag_curve ["b" ].iloc [- 1 ]:
474- print (f"Maximum flux density is too high (80 % of b_sat): { flux_avg_density + flux_amplitude_density } "
475- f"T > 0.8 * { reluctance_input .initial_mag_curve ['b' ].iloc [- 1 ]} T mur={ dynamic_mu_r_abs } " )
476- reluctance_model_output = IoReluctanceModelOutput (
477- p_loss_total = float ('nan' ),
478- volume = float ('nan' ),
479- area_to_heat_sink = float ('nan' ),
480- p_winding = float ('nan' ),
481- p_hyst = float ('nan' ),
482- l_air_gap = float ('nan' ),
483- flux_density_peak = flux_avg_density + flux_amplitude_density ,
484- dynamic_mu_r_abs = float ('nan' )
485- )
486- return reluctance_model_output
487-
488475 # p_loss calculation
489476 # get power loss in W/m³ and estimated H wave in A/m
490477 p_density_cmp , _ = reluctance_input .magnet_material_model (flux_density , reluctance_input .fundamental_frequency , reluctance_input .temperature )
@@ -1449,7 +1436,7 @@ def filter_combined_loss_list_df(df: pd.DataFrame, factor_min_dc_losses: float =
14491436
14501437 @staticmethod
14511438 def full_simulation (df_geometry : pd .DataFrame , current_waveform : list , inductor_config_filepath : str , process_number : int = 1 ,
1452- print_derivations : bool = False , saturation_threshold : float = 0.7 ) -> tuple :
1439+ print_derivations : bool = False ) -> tuple :
14531440 """
14541441 FEM simulation (winding losses and hysteresis losses from magnet model) for geometries from df_geometry.
14551442
@@ -1463,8 +1450,6 @@ def full_simulation(df_geometry: pd.DataFrame, current_waveform: list, inductor_
14631450 :type process_number: int
14641451 :param print_derivations: True to print derivation from FEM simulation to reluctance model
14651452 :type print_derivations: bool
1466- :param saturation_threshold: Threshold of maximum material saturation (default: 0.7)
1467- :type saturation_threshold: float
14681453 :return: volume, loss
14691454 :rtype: tuple
14701455 """
@@ -1534,7 +1519,7 @@ def full_simulation(df_geometry: pd.DataFrame, current_waveform: list, inductor_
15341519 time_vec = target_and_fix_parameters .time_extracted_vec ,
15351520 current_vec = target_and_fix_parameters .current_extracted_vec ,
15361521 current_offset = target_and_fix_parameters .current_offset ,
1537- saturation_threshold = saturation_threshold
1522+ saturation_threshold = InductorOptimization . _IO_SATURATION_THRESHOLD
15381523 )
15391524
15401525 # Load reluctance model input for magnet model and litz wire resistance calculation
0 commit comments