SAMSIM
Functions/Subroutines
mo_mass Module Reference

Regulates mass transfers and their results. More...

Functions/Subroutines

subroutine, public mass_transfer (Nlayer, N_active, T, H_abs, S_abs, S_bu, T_bottom, S_bu_bottom, fl_m)
 Calculates the effects of mass transfers on H_abs and S_abs. More...
 
subroutine, public expulsion_flux (thick, V_ex, Nlayer, N_active, psi_g, fl_m, m)
 Generates the fluxes caused by expulsion. More...
 
subroutine, public bgc_advection (Nlayer, N_active, N_bgc, fl_brine_bgc, bgc_abs, psi_l, T, S_abs, m, thick, bgc_bottom)
 Calculates how the brine fluxes stored in fl_brine_bgc advect bgc tracers. More...
 

Detailed Description

Regulates mass transfers and their results.

Ultimately all processes which involve a mass flux should be stored here.

Author
Philipp Griewank

COPYRIGHT

This file is part of SAMSIM.

SAMSIM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

SAMSIM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with SAMSIM. If not, see http://www.gnu.org/licenses/.

Function/Subroutine Documentation

subroutine, public mo_mass::bgc_advection ( integer, intent(in)  Nlayer,
integer, intent(in)  N_active,
integer, intent(in)  N_bgc,
real(wp), dimension(nlayer+1,nlayer+1), intent(in)  fl_brine_bgc,
real(wp), dimension(nlayer,n_bgc), intent(inout)  bgc_abs,
real(wp), dimension(nlayer), intent(in)  psi_l,
real(wp), dimension(nlayer), intent(in)  T,
real(wp), dimension(nlayer), intent(in)  S_abs,
real(wp), dimension(nlayer), intent(in)  m,
real(wp), dimension(nlayer), intent(in)  thick,
real(wp), dimension(n_bgc), intent(in)  bgc_bottom 
)

Calculates how the brine fluxes stored in fl_brine_bgc advect bgc tracers.

A very simple upwind strategy is employed. To avoid negative tracer densities, the maximum amount of advection is restricted to the current tracer content in a layer divided by three. Three is chosen as a limit as currently each layer can have a maximum of three flows leaving the layer (to the layer above, the layer below, and the lowest layer). The advection scheme is likely overly diffusive, but given the limitations we are working with (e.g. changing brine volumes) nothing more sophisticated can be applied easily.

For gases it might make sense to limit the brine density to saturation value in advecting brine, to take bubble formation into account. This needs to be specified in bgc_advection, and is a first attempt (both scientifically and code wise) which should be used with caution!

Revision History
Brought to life by Philipp Griewank, IMPRS (2014-02-10)
subroutine, public mo_mass::expulsion_flux ( real(wp), dimension(nlayer), intent(in)  thick,
real(wp), dimension(nlayer), intent(in)  V_ex,
integer, intent(in)  Nlayer,
integer, intent(in)  N_active,
real(wp), dimension(nlayer), intent(inout)  psi_g,
real(wp), dimension(nlayer+1), intent(out)  fl_m,
real(wp), dimension(nlayer), intent(inout)  m 
)

Generates the fluxes caused by expulsion.

Brine displaced by expansion of a freezing mushy layer lead to a mass, enthalpy and salt flux. This subroutine calculates the amount of brine which moves between the layers caused by V_ex and how the mass in the layers changes. Vary basic assumptions are made. Brine always moves downward (negative), no horizontal movement are allowed and gas pockets can be filled. The upper boundary layer is not permeable but the bottom one is. This subroutine was started as a quick and dirty way to simulate the bottom freezing experiment described in Notz 2005 p. 85

Revision History
Brought to life by Philipp Griewank, IMPRS (2010-08-24)
Simplified by Philipp Griewank, IMPRS (2010-11-27)
subroutine, public mo_mass::mass_transfer ( integer, intent(in)  Nlayer,
integer, intent(in)  N_active,
real(wp), dimension(nlayer), intent(in)  T,
real(wp), dimension(nlayer), intent(inout)  H_abs,
real(wp), dimension(nlayer), intent(inout)  S_abs,
real(wp), dimension(nlayer), intent(in)  S_bu,
real(wp), intent(in)  T_bottom,
real(wp), intent(in)  S_bu_bottom,
real(wp), dimension(nlayer+1), intent(in)  fl_m 
)

Calculates the effects of mass transfers on H_abs and S_abs.

The effects of brine displaced by expulsion, flushing or drainage expansion lead to changes in mass, salt ans enthalpy. This subroutine calculates the effects on S_abs and H_abs. A very simple upwind strategy is employed, Brine from below has T and S_br of the lower layer, and brine from above T and S_br of the upper layer. To avoid negative salinity, the maximum amount of advective salt is the total salt content of the layer. The amount of mass transfered is calculated in other subroutines.

This subroutine was started as a quick and dirty way to simulate the bottom freezing experiment described in Notz 2005 p. 85 IMPORTANT: Before this subroutine expelled brine was removed from the system and its effects were determined in subroutine expulsion. S_bu must be up to date!

Revision History
Brought to life by Philipp Griewank, IMPRS (2010-08-24)
Modified to work with all processes by Philipp Griewank, IMPRS (2010-11-27)