linear_eos_mod Module

Provides an abstract derived type which can be subtyped in order to implement an equation of state.


Uses

  • module~~linear_eos_mod~~UsesGraph module~linear_eos_mod linear_eos_mod factual_mod factual_mod module~linear_eos_mod->factual_mod iso_fortran_env iso_fortran_env module~linear_eos_mod->iso_fortran_env module~equation_of_state_mod equation_of_state_mod module~linear_eos_mod->module~equation_of_state_mod module~equation_of_state_mod->factual_mod module~equation_of_state_mod->iso_fortran_env

Used by

  • module~~linear_eos_mod~~UsedByGraph module~linear_eos_mod linear_eos_mod module~asymmetric_plume_mod asymmetric_plume_mod module~asymmetric_plume_mod->module~linear_eos_mod module~static_plume_mod static_plume_mod module~static_plume_mod->module~linear_eos_mod module~plume_mod plume_mod module~plume_mod->module~linear_eos_mod

Contents


Variables

TypeVisibility AttributesNameInitial
real(kind=r8), private, parameter:: absolute_zero =-273.15_r8

Interfaces

public interface linear_eos

  • private pure function constructor(ref_rho, ref_t, ref_s, beta_t, beta_s) result(this)

    Arguments

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

    The density for the temperature and salinity about which the equation of state was linearised, .

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

    The temperature about which the equation of state was linearised, .

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

    The salinity about which the equation of state was linearised, .

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

    The thermal contraction coefficient, .

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

    The haline contraction coefficient, .

    Return Value type(linear_eos)


Derived Types

type, public, extends(equation_of_state) :: linear_eos

A linearised implementation of the equation of state, of the form

Components

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

The density for the temperature and salinity about which the equation of state was linearised, .

real(kind=r8), private :: ref_t =0.0_r8

The temperature about which the equation of state was linearised, .

real(kind=r8), private :: ref_s =0.0_r8

The salinity about which the equation of state was linearised, .

real(kind=r8), private :: beta_t =0.0_r8

The thermal contraction coefficient, .

real(kind=r8), private :: beta_s =1.0_r8

The haline contraction coefficient, .

Constructor

private pure function constructor(ref_rho, ref_t, ref_s, beta_t, beta_s)

Type-Bound Procedures

procedure, public :: water_density => linear_water_density
procedure, public :: water_density_derivative => linear_water_deriv
procedure, public :: haline_contraction => linear_haline_contraction
procedure, public :: thermal_contraction => linear_thermal_contraction

Functions

private pure function constructor(ref_rho, ref_t, ref_s, beta_t, beta_s) result(this)

Arguments

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

The density for the temperature and salinity about which the equation of state was linearised, .

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

The temperature about which the equation of state was linearised, .

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

The salinity about which the equation of state was linearised, .

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

The thermal contraction coefficient, .

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

The haline contraction coefficient, .

Return Value type(linear_eos)

private function linear_water_density(this, temperature, salinity) result(density)

Author
Chris MacMackin
Date
November 2016

Calculates the density of the water from the temperature and salinity, using a linear equatino of state,

Arguments

Type IntentOptional AttributesName
class(linear_eos), 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

private function linear_water_deriv(this, temperature, d_temperature, salinity, d_salinity, dir) result(d_density)

Author
Chris MacMackin
Date
November 2016

Calculates the derivative of the water density from the temperature and salinity, using a linear equatino of state,

Arguments

Type IntentOptional AttributesName
class(linear_eos), 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 density of the water

private function linear_haline_contraction(this, temperature, salinity) result(coef)

Author
Chris MacMackin
Date
June 2017

Returns the haline contraction coefficient.

Arguments

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

Return Value class(scalar_field), allocatable

private function linear_thermal_contraction(this, temperature, salinity) result(coef)

Author
Chris MacMackin
Date
June 2017

Returns the thermal contraction coefficient.

Arguments

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

Return Value class(scalar_field), allocatable