newtonian_viscosity Derived Type

type, public, extends(abstract_viscosity) :: newtonian_viscosity

An implementation of Newtonian (constant) viscosity for a glacier.


Inherits

type~~newtonian_viscosity~~InheritsGraph type~newtonian_viscosity newtonian_viscosity type~abstract_viscosity abstract_viscosity type~newtonian_viscosity->type~abstract_viscosity

Contents

Source Code


Components

TypeVisibility AttributesNameInitial
real(kind=r8), private :: viscosity_value =1.0_r8

Constructor

public interface newtonian_viscosity

  • private pure function constructor(viscosity_value) result(this)

    Arguments

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

    The numerical value of the viscosity which this type is meant to return.

    Return Value type(newtonian_viscosity)

    The viscosity object being created.


Type-Bound Procedures

procedure, public :: ice_viscosity => newtonian_ice_viscosity

Returns the viscosity for the ice.

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

    Arguments

    Type IntentOptional AttributesName
    class(newtonian_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 :: newtonian_viscosity
    !* Author: Christopher MacMackin
    !  Date: October 2016
    !
    ! An implementation of Newtonian (constant) viscosity for a glacier. 
    !
    private
    real(r8) :: viscosity_value = 1.0_r8
  contains
    procedure :: ice_viscosity => newtonian_ice_viscosity
      !! Returns the viscosity for the ice.
  end type newtonian_viscosity