src.spyice.rhs#

src.spyice.rhs.apply_boundary_condition(argument, x_initial, source, thickness_index, factor1, factor2, factor3, a, delta_upwind, w, nz, t_passed, salinity_initial, temperature_top, is_stefan, is_buffo=False, is_voller=False, bc_neumann=None, top_temp_type='Stefan')[source]#

Creates the right hand side of the matrix equation considering source terms.

Parameters:
  • argument (str) – Either ‘salinity’ for salt equation or ‘temperature’ for temperature equation.

  • x_initial (float) – Value of X at the last time step.

  • source (float) – Source term.

  • factor1 (float) – Factor 1.

  • factor3 (float) – Factor 3.

  • a (float) – A parameter.

  • delta_upwind (float) – Difference of ice volume fraction between this and the last time step.

  • w (float) – W parameter.

  • nz (int) – Number of computational nodes.

  • t_passed (float) – Time passed in seconds.

  • salinity_initial (float) – Initial salinity value.

  • temperature_top (float) – Top temperature value.

  • is_stefan (bool) – Indicates if Stefan condition is used.

  • is_buffo (bool, optional) – Indicates if Buffo condition is used. Defaults to False.

  • bc_neumann (float, optional) – Neumann boundary condition. Defaults to None.

  • top_temp_type (str, optional) – Stefan problem with Dirichlet conditions at top boundary

src.spyice.rhs.correct_for_brine_movement(argument, x_initial, w, t_passed, nz, salinity_initial, top_temp, top_temp_type='Stefan')[source]#

Corrects for brine movement based on the given arguments.

Parameters:
  • argument (str) – The argument for correction, either “salinity” or “temperature”.

  • x_initial (numpy.ndarray) – The initial values of x.

  • w (numpy.ndarray) – The values of w.

  • t_passed (float) – The time passed.

  • nz (int) – The number of elements.

  • salinity_initial (float) – The initial salinity value.

  • top_temp (float) – The top temperature value.

Returns:

The corrected values of x.

Return type:

numpy.ndarray

Raises:

None