Provides a derived type which specifies the boundary conditions for a 1-D plume model. In order to avoid boundary layer effects, an ODE solver is used to integrate the plume a little way upstream, past the boundary layer.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(uniform_scalar_field), | private | :: | dummy |
Constructs a boundary condition object which integrates an IVP from actual boundary values to calculate the staet of the plume a little upstream. This can be used to avoid boundary layers.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
procedure(bound_vals) | :: | bound_calculator | Calculates the "actual" inflow boundary conditions, used to initiate the integration to find the values to use in the simulation. |
|||
real(kind=r8), | intent(in) | :: | distance | The distance upstream which the plume should be integrated. |
||
real(kind=r8), | intent(in), | optional | dimension(:) | :: | thresholds | The thresholds to use when evaluating the error of the
integration. This is done according to the formula
|
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(in) | :: | time | The time at which the boundary values are being calculated |
||
real(kind=r8), | intent(out) | :: | D | Plume thickness boundary condition |
||
real(kind=r8), | intent(out), | dimension(:), allocatable | :: | U | Plume velocity boundary condition |
|
real(kind=r8), | intent(out) | :: | T | Plume temperature boundary condition |
||
real(kind=r8), | intent(out) | :: | S | Plume salinity boundary condition |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(scalar_field), | intent(in) | :: | D | The plume thickness |
||
class(vector_field), | intent(in) | :: | U | The plume velocity |
||
class(scalar_field), | intent(in) | :: | T | The plume temperature |
||
class(scalar_field), | intent(in) | :: | S | The plume salinity |
||
class(scalar_field), | intent(in) | :: | b | The debth of the base of the ice shelf |
||
class(scalar_field), | intent(out) | :: | DU_x | The derivative of the product DU |
||
class(vector_field), | intent(out) | :: | DUU_x | The derivative of the product DUU |
||
class(scalar_field), | intent(out) | :: | DUT_x | The derivative of the product DUT |
||
class(scalar_field), | intent(out) | :: | DUS_x | The derivative of the product DUS |
A type with procedures for getting the boundary conditions of the plume model. For given boundary conditions, it integrates the plume upstream slightly and then returns these when asked for boundary values. This allows boundary layers, which can cause numerical difficulties, to be avoided. Inflow boundaries must be Dirichlet, while outflow boundaries for velocity, salinity, and temperature are set to have a gradient of zero.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
procedure(bound_vals), | private, | nopass, pointer | :: | get_boundaries | => | null() | Calculate the "actual" boundary values, used to initiate the integration, for the specified time. |
real(kind=r8), | private | :: | distance | = | 0.05_r8 | The distance upstream which the plume should be integrated |
|
real(kind=r8), | private | :: | thickness | = | 0.1_r8 | The thickness of the plume at the inflowing boundary |
|
real(kind=r8), | private, | dimension(:), allocatable | :: | velocity | The velocity of the plume at the inflowing boundary |
||
real(kind=r8), | private | :: | temperature | = | 0.0_r8 | The tempreature of the plume at the inflowing boundary |
|
real(kind=r8), | private | :: | salinity | = | 1.0_r8 | The salinity of the plume at the inflowing boundary |
|
real(kind=r8), | private | :: | boundary_time | The time at which the boundaries were most recently calculated |
|||
real(kind=r8), | private, | dimension(:), allocatable | :: | thresholds | Thresholds to use when calculating error in the integration. |
private pure function constructor(bound_calculator, distance, thresholds) | Constructs a boundary condition object which integrates an IVP from actual boundary values to calculate the staet of the plume a little upstream. This can be used to avoid boundary layers. |
procedure, public :: set_time | Specifies the time at which to calculate the boundary conditions. |
procedure, public :: thickness_bound_info => upstream_thickness_info | Indicates the type and depth of the thickness boundary at different locations. |
procedure, public :: velocity_bound_info => upstream_info | Indicates the type and depth of the thickness boundary at different locations. |
procedure, public :: temperature_bound_info => upstream_info | Indicates the type and depth of the thickness boundary at different locations. |
procedure, public :: salinity_bound_info => upstream_info | Indicates the type and depth of the thickness boundary at different locations. |
procedure, public :: thickness_bound => upstream_thickness_bound | Produces a field containing the boundary conditions for plume thickness at the specified location. |
procedure, public :: velocity_bound => upstream_velocity_bound | Produces a field containing the boundary conditions for plume velocity at the specified location. |
procedure, public :: temperature_bound => upstream_temperature_bound | Produces a field containing the boundary conditions for plume temperature at the specified location. |
procedure, public :: salinity_bound => upstream_salinity_bound | Produces a field containing the boundary conditions for plume salinity at the specified location. |
procedure, public :: calculate => upstream_calculate | Calculates the upstreamed boundary conditions for the given time and ice thickness. |
Constructs a boundary condition object which integrates an IVP from actual boundary values to calculate the staet of the plume a little upstream. This can be used to avoid boundary layers.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
procedure(bound_vals) | :: | bound_calculator | Calculates the "actual" inflow boundary conditions, used to initiate the integration to find the values to use in the simulation. |
|||
real(kind=r8), | intent(in) | :: | distance | The distance upstream which the plume should be integrated. |
||
real(kind=r8), | intent(in), | optional | dimension(:) | :: | thresholds | The thresholds to use when evaluating the error of the
integration. This is done according to the formula
|
Returns a field containing the thickness boundary values for the specified boundary location.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(upstream_plume_boundary), | intent(in) | :: | this | |||
integer, | intent(in) | :: | location | Which boundary information is to be provided for. The
boundary will be the one normal to dimension of number
|
Returns a field containing the velocity boundary values for the specified boundary location.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(upstream_plume_boundary), | intent(in) | :: | this | |||
integer, | intent(in) | :: | location | Which boundary information is to be provided for. The
boundary will be the one normal to dimension of number
|
Returns a field containing the temperature boundary values for the specified boundary location.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(upstream_plume_boundary), | intent(in) | :: | this | |||
integer, | intent(in) | :: | location | Which boundary information is to be provided for. The
boundary will be the one normal to dimension of number
|
Returns a field containing the salinity boundary values for the specified boundary location.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(upstream_plume_boundary), | intent(in) | :: | this | |||
integer, | intent(in) | :: | location | Which boundary information is to be provided for. The
boundary will be the one normal to dimension of number
|
Indicates that the lower boundary is Dirichlet and the upper boundary is free.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(upstream_plume_boundary), | intent(in) | :: | this | |||
integer, | intent(in) | :: | location | Which boundary information is to be provided for. The
boundary will be the one normal to dimension of number
|
||
integer, | intent(out) | :: | bound_type | An integer representing what sort of boundary condition is used. The integer value corresponding to each boundary type is specified in the boundary_types_mod. |
||
integer, | intent(out) | :: | bound_depth | The number of layers of data-points needed to specify the boundary condition. |
Indicates that the lower boundary is Dirichlet and the upper boundary is Neumann.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(upstream_plume_boundary), | intent(in) | :: | this | |||
integer, | intent(in) | :: | location | Which boundary information is to be provided for. The
boundary will be the one normal to dimension of number
|
||
integer, | intent(out) | :: | bound_type | An integer representing what sort of boundary condition is used. The integer value corresponding to each boundary type is specified in the boundary_types_mod. |
||
integer, | intent(out) | :: | bound_depth | The number of layers of data-points needed to specify the boundary condition. |
Calculates the boundary values to use at the current time with the current ice thickness.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(upstream_plume_boundary), | intent(inout) | :: | this | |||
real(kind=r8), | intent(in) | :: | t | The time at which to calculate the boundary values. |
||
procedure(non_diff) | :: | func | A function which returns the non-diffusive, non-inertial components of the ODEs describing the plume. |
|||
class(scalar_field), | intent(in) | :: | b | The depth of the ice shelf base. |