Skip to content

Commit

Permalink
update mesh_accuracy in sto
Browse files Browse the repository at this point in the history
  • Loading branch information
gituser789 committed Nov 15, 2023
1 parent 528bc11 commit 2c91a07
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions femmt/optimization/sto.py
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,8 @@ def re_simulate_single_result(study_name: str, config: StoSingleInputConfig, num
verbosity=femmt.Verbosity.Silent, simulation_name=f"Single_Case_{loaded_trial._trial_id - 1}")
# Note: The _trial_id starts counting from 1, while the normal cases count from zero. So a correction needs to be made

geo.update_mesh_accuracies(mesh_accuracy, mesh_accuracy, mesh_accuracy, mesh_accuracy)

core_dimensions = femmt.dtos.StackedCoreDimensions(core_inner_diameter=core_inner_diameter, window_w=window_w,
window_h_top=window_h_top, window_h_bot=window_h_bot)

Expand Down Expand Up @@ -718,7 +720,7 @@ def re_simulate_single_result(study_name: str, config: StoSingleInputConfig, num
winding_temperature=config.temperature)

geo.set_insulation(insulation)
geo.set_winding_windows([coil_window, transformer_window], mesh_accuracy=mesh_accuracy)
geo.set_winding_windows([coil_window, transformer_window])

geo.create_model(freq=target_and_fixed_parameters.fundamental_frequency, pre_visualize_geometry=True)

Expand Down Expand Up @@ -814,6 +816,8 @@ def re_simulate_from_df(df: pd.DataFrame, config: StoSingleInputConfig, number_t
verbosity=femmt.Verbosity.Silent, simulation_name=f"Single_Case_{loaded_trial_params['number']}")
# Note: The _trial_id starts counting from 1, while the normal cases count from zero. So a correction needs to be made

geo.update_mesh_accuracies(mesh_accuracy, mesh_accuracy, mesh_accuracy, mesh_accuracy)

core_dimensions = femmt.dtos.StackedCoreDimensions(core_inner_diameter=core_inner_diameter, window_w=window_w,
window_h_top=window_h_top, window_h_bot=window_h_bot)

Expand Down Expand Up @@ -868,7 +872,7 @@ def re_simulate_from_df(df: pd.DataFrame, config: StoSingleInputConfig, number_t
winding_temperature=config.temperature)

geo.set_insulation(insulation)
geo.set_winding_windows([coil_window, transformer_window], mesh_accuracy=mesh_accuracy)
geo.set_winding_windows([coil_window, transformer_window])

geo.create_model(freq=target_and_fixed_parameters.fundamental_frequency, pre_visualize_geometry=show_simulation_results)

Expand Down

0 comments on commit 2c91a07

Please sign in to comment.