glens_law_viscosity Derived Type

type, public, extends(abstract_viscosity) :: glens_law_viscosity

An implementation of Glen's flow law to describe glacier viscosity. It takes the form where is the second invarient of the strain rate Here, is treated as a constant, although it may be parameterised as a function of temperature.


Inherits

type~~glens_law_viscosity~~InheritsGraph type~glens_law_viscosity glens_law_viscosity type~abstract_viscosity abstract_viscosity type~glens_law_viscosity->type~abstract_viscosity

Contents

Source Code


Components

TypeVisibility AttributesNameInitial
real(kind=r8), private :: b_val =1.0_r8
real(kind=r8), private :: index =3._r8

Constructor

public interface glens_law_viscosity

  • private pure function constructor(b_val, index) result(this)

    Author
    Christopher MacMackin
    Date
    April 2017

    Instantiates an instance of a viscosity object implementing Glen's flow law.

    Arguments

    Type IntentOptional AttributesName
    real(kind=r8), intent(in) :: b_val

    The coefficient, , in Glen's flow law.

    real(kind=r8), intent(in) :: index

    The index, , in the exponent of Glen's flow law.

    Return Value type(glens_law_viscosity)

    The viscosity object being created.


Type-Bound Procedures

procedure, public :: ice_viscosity => glens_ice_viscosity

Returns the viscosity for the ice.

  • private function glens_ice_viscosity(this, velocity, temperature, time) result(viscosity)

    Author
    Christopher MacMackin
    Date
    April 2017

    Calculates the viscosity of ice using Glen's flow law. See the documentation of the glens_law_viscosity object for a description of this parameterisation.

    Arguments

    Type IntentOptional AttributesName
    class(glens_law_viscosity), intent(in) :: this
    class(vector_field), intent(in) :: velocity

    The velocity field of the ice for which the velocity is being calculated

    real(kind=r8), intent(in) :: temperature

    The temperature of the ice for which viscosity is being calculated.

    real(kind=r8), intent(in), optional :: time

    The time at which the viscosity is being calculated. If not present then assumed to be same as previous value passed.

    Return Value class(scalar_field), pointer

    The value of the viscosity

Source Code

  type, extends(abstract_viscosity), public :: glens_law_viscosity
    !* Author: Christopher MacMackin
    !  Date: April 2017
    !
    ! An implementation of Glen's flow law to describe glacier
    ! viscosity. It takes the form $$\eta = \frac{1}{2}BD^{1/n-1},$$
    ! where \(D = \sqrt{D_{ij}D_{ij}/2\) is the second invarient of
    ! the strain rate $$D_{ij} = \frac{1}{2}\left(\frac{\partial
    ! u_i}{\partial x_j} + \frac{\partial u_j}{\partial x_i}
    ! \right).$$ Here, \(B\) is treated as a constant, although it may
    ! be parameterised as a function of temperature.
    !
    private
    real(r8) :: b_val = 1.0_r8
    real(r8) :: index = 3._r8
  contains
    procedure :: ice_viscosity => glens_ice_viscosity
      !! Returns the viscosity for the ice.
  end type glens_law_viscosity