equation_of_state Derived Type

type, public, abstract :: equation_of_state

An abstract type with a procedure for calculating water density from its temperature and salinity.


Inherited by

type~~equation_of_state~~InheritedByGraph type~equation_of_state equation_of_state type~asym_plume asym_plume type~asym_plume->type~equation_of_state eos type~linear_eos linear_eos type~linear_eos->type~equation_of_state type~static_plume static_plume type~static_plume->type~equation_of_state eos type~prescribed_eos prescribed_eos type~prescribed_eos->type~equation_of_state type~ave_linear_eos ave_linear_eos type~ave_linear_eos->type~equation_of_state type~plume plume type~plume->type~equation_of_state eos

Contents

Source Code


Type-Bound Procedures

procedure(get_property), public, deferred :: water_density

Returns the water density for the given temperature and salinity.

  • function get_property(this, temperature, salinity) result(density) Prototype

    Arguments

    Type IntentOptional AttributesName
    class(equation_of_state), intent(in) :: this
    class(scalar_field), intent(in) :: temperature

    A field containing the temperature of the water

    class(scalar_field), intent(in) :: salinity

    A field containing the salinity of the water

    Return Value class(scalar_field), pointer

    A field containing the density of the water

procedure(get_property_dx), public, deferred :: water_density_derivative

Returns the derivative of the water density for the given temperature and salinity.

  • function get_property_dx(this, temperature, d_temperature, salinity, d_salinity, dir) result(d_density) Prototype

    Arguments

    Type IntentOptional AttributesName
    class(equation_of_state), intent(in) :: this
    class(scalar_field), intent(in) :: temperature

    A field containing the temperature of the water

    class(scalar_field), intent(in) :: d_temperature

    A field containing the derivative of the temperature of the water, in teh same direction as dir

    class(scalar_field), intent(in) :: salinity

    A field containing the salinity of the water

    class(scalar_field), intent(in) :: d_salinity

    A field containing the derivative of the salinity of the water, in the same direction as dir

    integer, intent(in) :: dir

    The direction in which to take the derivative

    Return Value class(scalar_field), pointer

    A field containing the derivative of the density of the water in direction dir

procedure(get_coef), public, deferred :: haline_contraction

Returns a (possibly approximated) haline contraction coefficient.

  • function get_coef(this, temperature, salinity) result(coef) Prototype

    Arguments

    Type IntentOptional AttributesName
    class(equation_of_state), intent(in) :: this
    class(scalar_field), intent(in) :: temperature
    class(scalar_field), intent(in) :: salinity

    Return Value class(scalar_field), allocatable

procedure(get_coef), public, deferred :: thermal_contraction

Returns a (possibly approximated) therma contraction coefficient.

  • function get_coef(this, temperature, salinity) result(coef) Prototype

    Arguments

    Type IntentOptional AttributesName
    class(equation_of_state), intent(in) :: this
    class(scalar_field), intent(in) :: temperature
    class(scalar_field), intent(in) :: salinity

    Return Value class(scalar_field), allocatable

Source Code

  type, abstract, public :: equation_of_state
    !* Author: Chris MacMackin
    !  Date: April 2016
    !
    ! An abstract type with a procedure for calculating water density
    ! from its temperature and salinity.
    !
  contains
    procedure(get_property), deferred :: water_density
      !! Returns the water density for the given temperature and salinity.
    procedure(get_property_dx), deferred :: water_density_derivative
      !! Returns the derivative of the water density for the given
      !! temperature and salinity.
    procedure(get_coef), deferred    :: haline_contraction
      !! Returns a (possibly approximated) haline contraction coefficient.
    procedure(get_coef), deferred    :: thermal_contraction
      !! Returns a (possibly approximated) therma contraction coefficient.
 end type equation_of_state