heat_transfer_simulation_inverse.py
def create_and_run_simulation(parameters,
                              heat_flux_plot=None,
                              temperature_plot=None,
                              progress_callback=None,
                              queue=None,
                              save_results: bool = False) -> dict:
    """
    Creates a new simulation object, passes it into the controller
        and makes sure the simulation will finish

    Args:
        parameters ... all defined parameters of simulation
        heat_flux_plot ... reference of heat flux plot
        temperature_plot ... reference of temperature plot
        progress_callback ... reference of progress callback
        queue ... reference of the shared queue
        save_results ... whether to save results at the end or not
    """

    my_material = Material(parameters["rho"], parameters["cp"], parameters["lmbd"])
    Sim = InverseSimulation(length=parameters["object_length"],
                            material=my_material,
                            N=parameters["number_of_elements"],
                            theta=parameters["theta"],
                            robin_alpha=parameters["robin_alpha"],
                            dt=parameters["dt"],
                            x0=parameters["place_of_interest"],
                            window_span=parameters["window_span"],
                            init_q_adjustment=parameters["init_q_adjustment"],
                            adjusting_value=parameters["adjusting_value"],
                            tolerance=parameters["tolerance"],
                            experiment_data_path=parameters["experiment_data_path"])

    sim_controller = SimulationController(Sim=Sim,
                                          parameters=parameters,
                                          progress_callback=progress_callback,
                                          temperature_plot=temperature_plot,
                                          heat_flux_plot=heat_flux_plot,
                                          queue=queue,
                                          save_results=save_results)

    result = sim_controller.complete_simulation()
    return result

    Creates a new simulation object, passes it into the controller
        and makes sure the simulation will finish

    Args:
        parameters ... all defined parameters of simulation
        heat_flux_plot ... reference of heat flux plot
        temperature_plot ... reference of temperature plot
        progress_callback ... reference of progress callback
        queue ... reference of the shared queue
        save_results ... whether to save results at the end or not
    
Creates a new simulation object, passes it into the controller
and makes sure the simulation will finish

parameters ... all defined parameters of simulation
heat_flux_plot ... reference of heat flux plot
temperature_plot ... reference of temperature plot
progress_callback ... reference of progress callback
queue ... reference of the shared queue
save_results ... whether to save results at the end or not
Creates a new simulation object passes it into the controller and makes sure the simulation will finish parameters ... all defined parameters of simulation heat_flux_plot ... reference of heat flux plot temperature_plot ... reference of temperature plot progress_callback ... reference of progress callback queue ... reference of the shared queue save_results ... whether to save results at the end or not
def create_and_run_simulation(parameters,
                              heat_flux_plot=None,
                              temperature_plot=None,
                              progress_callback=None,
                              queue=None,
                              save_results: bool = False) -> dict:
    my_material = Material(parameters["rho"], parameters["cp"], parameters["lmbd"])
    Sim = InverseSimulation(length=parameters["object_length"],
                            material=my_material,
                            N=parameters["number_of_elements"],
                            theta=parameters["theta"],
                            robin_alpha=parameters["robin_alpha"],
                            dt=parameters["dt"],
                            x0=parameters["place_of_interest"],
                            window_span=parameters["window_span"],
                            init_q_adjustment=parameters["init_q_adjustment"],
                            adjusting_value=parameters["adjusting_value"],
                            tolerance=parameters["tolerance"],
                            experiment_data_path=parameters["experiment_data_path"])
    sim_controller = SimulationController(Sim=Sim,
                                          parameters=parameters,
                                          progress_callback=progress_callback,
                                          temperature_plot=temperature_plot,
                                          heat_flux_plot=heat_flux_plot,
                                          queue=queue,
                                          save_results=save_results)
    result = sim_controller.complete_simulation()
    return result
def create_and_run_simulation ( parameters , heat_flux_plot = None , temperature_plot = None , progress_callback = None , queue = None , save_results : bool = False ) -> dict : my_material = Material ( parameters [ "rho" ] , parameters [ "cp" ] , parameters [ "lmbd" ] ) Sim = InverseSimulation ( length = parameters [ "object_length" ] , material = my_material , N = parameters [ "number_of_elements" ] , theta = parameters [ "theta" ] , robin_alpha = parameters [ "robin_alpha" ] , dt = parameters [ "dt" ] , x0 = parameters [ "place_of_interest" ] , window_span = parameters [ "window_span" ] , init_q_adjustment = parameters [ "init_q_adjustment" ] , adjusting_value = parameters [ "adjusting_value" ] , tolerance = parameters [ "tolerance" ] , experiment_data_path = parameters [ "experiment_data_path" ] ) sim_controller = SimulationController ( Sim = Sim , parameters = parameters , progress_callback = progress_callback , temperature_plot = temperature_plot , heat_flux_plot = heat_flux_plot , queue = queue , save_results = save_results ) result = sim_controller . complete_simulation ( ) return result
Creates a new simulation object, passes it into the controller
and makes sure the simulation will finish
Creates a new simulation object passes it into the controller and makes sure the simulation will finish
"""
    Creates a new simulation object, passes it into the controller
        and makes sure the simulation will finish

    Args:
        parameters ... all defined parameters of simulation
        heat_flux_plot ... reference of heat flux plot
        temperature_plot ... reference of temperature plot
        progress_callback ... reference of progress callback
        queue ... reference of the shared queue
        save_results ... whether to save results at the end or not
    """
parameters
heat_flux_plot
temperature_plot
progress_callback
queue
save_results
bool