diffusion

This module contains the code for the diffusion scheme models.

code to handle diffusion (heat, enthalpy) calls solver Draws from Numerical Heat Transfer and Heat Flow (Patankar, 1980) Enthalpy from Voller, Swaminathan, and Thomas (1990) Isotope diffusion now has its own class.

diffusion.LWC_correct(self)

* TEST FUNCTION * If there is LWC in a layer after temperature diffusion and the temperature is less than zero, one option is to just balance the energy to increase the temperature and lower the LWC. It isn’t the best way to solve the problem but it is one way.

This should be vectorized but that is not a priority.

diffusion.enthalpyDiff(self, iii)

enthalpy diffusion function, new 1/30/19 - method from Voller and Swaminathan LWC is in volume (m^3) thermal diffusivity: alpha = K_firn / (rho*c_firn)

diffusion.firnConductivity(self, iii, K_ice)

Function to set the firn’s thermal conductivity based on one of a number of parameterizations.

Choose your favorite! Default is Calonne et al. 2019. References are provided at the end of this script.

diffusion.heatDiff(self, iii)

Heat diffusion function

Parameters:
  • z
  • dz
  • Ts
  • rho
Returns self.Tz:
 
Returns self.T10m:
 

thermal diffusivity: alpha = K_firn / (rho*c_firn)

diffusion.heatDiff_LWCcorr(self, iii, iters, correct_therm_prop)

IN DEVELOPMENT

just run the heat diffusion as normal and then balance energy.

diffusion.heatDiff_Teff(self, iii)

IN DEVELOPMENT artificially set the temperature of volumes with liquid water to be higher than T_melt

diffusion.heatDiff_highC(self, iii)

IN DEVELOPMENT

One way of dealing with liquid water in the firn is to just set the heat capacity to be very high.