src.spyice.parameters.results_params#
- class src.spyice.parameters.results_params.ResultsParams[source]#
Bases:
objectClass to store the results of the simulation.
- Parameters:
iter_max (int) – The maximum number of iterations.
nz (int) – The number of depth levels.
- Variables:
error_temperature (ndarray) – An array of size nz to store the temperature errors.
error_temperature_sum (ndarray) – An array of size iter_max to store the sum of temperature errors.
error_temperature_sum_weighted (ndarray) – An array of size iter_max to store the weighted sum of temperature errors.
temp_grad (None) – A placeholder for the temperature gradient.
thickness_index_total (ndarray) – An array of size iter_max to store the total thickness index.
depth_stefan_all (ndarray) – An array of size iter_max to store the depth Stefan values.
t_stefan_prev (ndarray) – An array of size nz to store the previous Stefan temperature values.
t_k_prev (ndarray) – An array of size nz to store the previous temperature values.
t_stefan_diff (ndarray) – A 2D array of size (iter_max, nz) to store the differences in Stefan temperature values.
t_k_diff (ndarray) – A 2D array of size (iter_max, nz) to store the differences in temperature values.
t_stefan_list (ndarray) – A 2D array of size (iter_max, nz) to store the Stefan temperature values.
t_k_list (ndarray) – A 2D array of size (iter_max, nz) to store the temperature values.
t_k_buffo_list (ndarray) – A 2D array of size (iter_max, nz) to store the buffered temperature values.
thickness_list (ndarray) – An array of size iter_max to store the thickness values.
thickness_list_buffo (ndarray) – An array of size iter_max to store the buffered thickness values.
phi_k_list (ndarray) – A 2D array of size (iter_max, nz) to store the phi values.
phi_buffo_list (ndarray) – A 2D array of size (iter_max, nz) to store the buffered phi values.
s_k_list (ndarray) – A 2D array of size (iter_max, nz) to store the s values.
s_buffo_list (ndarray) – A 2D array of size (iter_max, nz) to store the buffered s values.
h_k_list (ndarray) – A 2D array of size (iter_max, nz) to store the h values.
h_solid_list (ndarray) – A 2D array of size (iter_max, nz) to store the solid h values.
temp_interface (ndarray) – An array of size iter_max to store the interface temperatures.
t_k_iter (list) – A list to store the temperature values at each iteration.
phi_k_iter (list) – A list to store the phi values at each iteration.
all_phi_iter (ndarray) – A 2D array of size (iter_max, nz) to store all phi values at each iteration.
t_k_iter_all (ndarray) – A 2D array of size (iter_max, nz) to store all temperature values at each iteration.
phi_k_iter_all (ndarray) – A 2D array of size (iter_max, nz) to store all phi values at each iteration.
all_phi_iter_all (ndarray) – A 2D array of size (iter_max, nz) to store all phi values at each iteration.
all_t (ndarray) – A 2D array of size (iter_max, nz) to store all temperature values.
all_s (ndarray) – A 2D array of size (iter_max, nz) to store all s values.
all_phi (ndarray) – A 2D array of size (iter_max, nz) to store all phi values.
all_h (ndarray) – A 2D array of size (iter_max, nz) to store all h values.
all_h_solid (ndarray) – A 2D array of size (iter_max, nz) to store all solid h values.
all_w (ndarray) – A 2D array of size (iter_max, nz) to store all w values.
all_thick (ndarray) – An array of size iter_max to store all thickness values.
all_t_passed (ndarray) – An array of size iter_max to store all passed temperature values.
- __init__(iter_max, nz)[source]#
- Parameters:
iter_max (int) – The maximum number of iterations.
nz (int) – The number of depth levels.
- Variables:
error_temperature (ndarray) – An array of size nz to store the temperature errors.
error_temperature_sum (ndarray) – An array of size iter_max to store the sum of temperature errors.
error_temperature_sum_weighted (ndarray) – An array of size iter_max to store the weighted sum of temperature errors.
temp_grad (None) – A placeholder for the temperature gradient.
thickness_index_total (ndarray) – An array of size iter_max to store the total thickness index.
depth_stefan_all (ndarray) – An array of size iter_max to store the depth Stefan values.
t_stefan_prev (ndarray) – An array of size nz to store the previous Stefan temperature values.
t_k_prev (ndarray) – An array of size nz to store the previous temperature values.
t_stefan_diff (ndarray) – A 2D array of size (iter_max, nz) to store the differences in Stefan temperature values.
t_k_diff (ndarray) – A 2D array of size (iter_max, nz) to store the differences in temperature values.
t_stefan_list (ndarray) – A 2D array of size (iter_max, nz) to store the Stefan temperature values.
t_k_list (ndarray) – A 2D array of size (iter_max, nz) to store the temperature values.
t_k_buffo_list (ndarray) – A 2D array of size (iter_max, nz) to store the buffered temperature values.
thickness_list (ndarray) – An array of size iter_max to store the thickness values.
thickness_list_buffo (ndarray) – An array of size iter_max to store the buffered thickness values.
phi_k_list (ndarray) – A 2D array of size (iter_max, nz) to store the phi values.
phi_buffo_list (ndarray) – A 2D array of size (iter_max, nz) to store the buffered phi values.
s_k_list (ndarray) – A 2D array of size (iter_max, nz) to store the s values.
s_buffo_list (ndarray) – A 2D array of size (iter_max, nz) to store the buffered s values.
h_k_list (ndarray) – A 2D array of size (iter_max, nz) to store the h values.
h_solid_list (ndarray) – A 2D array of size (iter_max, nz) to store the solid h values.
temp_interface (ndarray) – An array of size iter_max to store the interface temperatures.
t_k_iter (list) – A list to store the temperature values at each iteration.
phi_k_iter (list) – A list to store the phi values at each iteration.
all_phi_iter (ndarray) – A 2D array of size (iter_max, nz) to store all phi values at each iteration.
t_k_iter_all (ndarray) – A 2D array of size (iter_max, nz) to store all temperature values at each iteration.
phi_k_iter_all (ndarray) – A 2D array of size (iter_max, nz) to store all phi values at each iteration.
all_phi_iter_all (ndarray) – A 2D array of size (iter_max, nz) to store all phi values at each iteration.
all_t (ndarray) – A 2D array of size (iter_max, nz) to store all temperature values.
all_s (ndarray) – A 2D array of size (iter_max, nz) to store all s values.
all_phi (ndarray) – A 2D array of size (iter_max, nz) to store all phi values.
all_h (ndarray) – A 2D array of size (iter_max, nz) to store all h values.
all_h_solid (ndarray) – A 2D array of size (iter_max, nz) to store all solid h values.
all_w (ndarray) – A 2D array of size (iter_max, nz) to store all w values.
all_thick (ndarray) – An array of size iter_max to store all thickness values.
all_t_passed (ndarray) – An array of size iter_max to store all passed temperature values.
- static store_results(results_dataclass, temp, s_sw, phi, h, h_solid, w, thickness, t_passed, t)[source]#
Stores the results of the simulation in the given results_dataclass.
- Parameters:
results_dataclass – An instance of the ResultsDataClass where the results will be stored.
temp – The temperature values to be stored.
s_sw – The s_sw values to be stored.
phi – The phi values to be stored.
h – The h values to be stored.
h_solid – The h_solid values to be stored.
w – The w values to be stored.
thickness – The thickness value to be stored.
t_passed – The t_passed value to be stored.
t – The t value to be stored.
- Returns:
The updated results_dataclass with the stored results. - all_t: The temperature values. - all_s: The s_sw values. - all_phi: The phi values. - all_h: The h values. - all_h_solid: The h_solid values. - all_w: The w values. - all_thick: The thickness values. - all_t_passed: The t_passed values.
- static store_results_for_iter_t(results_dataclass, t, thickness_index, t_k, t_stefan, s_k, s_k_buffo, brine_velocity_k, nutrient_cn_multiple_layers, carbon_cc_multiple_layers, phi_k, phi_k_buffo, h_k, h_solid, thickness, thickness_buffo, thickness_stefan, t_k_buffo, temperature_liquid, temperature_solid, carbon_concentration, nutrient_concentration, photosynthetic_rate, radiation_algae, chla_bulk, radiation_all, salinity_source_term, buffo=False)[source]#
Stores the results for a given iteration ‘t’ in the ‘results_dataclass’.
- Parameters:
results_dataclass – An instance of the results dataclass.
t – The iteration number.
thickness_index – The index of the thickness.
t_k – The temperature values.
t_stefan – The Stefan temperature values.
s_k – The entropy values.
s_k_buffo – The entropy values for buffo.
phi_k – The phase fraction values.
phi_k_buffo – The phase fraction values for buffo.
h_k – The enthalpy values.
h_solid – The solid enthalpy values.
thickness – The thickness values.
thickness_buffo – The thickness values for buffo.
thickness_stefan – The Stefan thickness values.
t_k_buffo – The temperature values for buffo.
buffo – A boolean indicating if buffo is enabled (default is False).
- Returns:
The updated ‘results_dataclass’ with the stored results.