Provides a derived type which representes the operator acting on velocity and its derivative with the Coriolis force. This can be used for preconditioning in the plume solver.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=1), | private, | parameter | :: | trans | = | 'N' | The LAPACK parameter indicating not to operate on the transpose of the matrix when solving for boundary conditions. |
type(uniform_scalar_field), | private | :: | zero |
Builds a Coriolis block which can be used to solve the inverse problem for the linear components of the plume momentum equations. The result can only be used with fields having the same grid as the template.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(in) | :: | phi | The dimensionless coriolis parameter |
||
real(kind=r8), | intent(in) | :: | nu | The dimensionless eddy diffusivity |
||
integer, | intent(in) | :: | velbound | Location code for the velocity's boundary condition. 1 indicates upper boundary, -1 indicates lower boundary. |
||
integer, | intent(in) | :: | dvelbound | Location code for the velocity's boundary condition. 1 indicates upper boundary, -1 indicates lower boundary. |
||
integer, | intent(in) | :: | integrate_bound | Location code for the boundary to perform integrations from. This should be the opposite boundary from where boundary data is stored. |
||
class(abstract_field), | intent(in) | :: | template | A scalar field with the same grid as any fields passed as arguments to the solve_for method. |
A data type representing a matrix operator for the momentum components of the linear parts plume equations, with the Coriolis force. It can be useful when preconditioning a the plume solver. It is inherently 1-D in its implementation, but has a transverse velocity component.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=r8), | private, | dimension(4) | :: | D_r | Real component of the diagonal matrix, , with only diagonal values stored |
||
real(kind=r8), | private, | dimension(4) | :: | D_i | Imaginary component of the diagonal matrix, , with only diagonal values stored |
||
type(cheb1d_scalar_field), | private, | dimension(4,4) | :: | emDxVinv_r | Real component of |
||
type(cheb1d_scalar_field), | private, | dimension(4,4) | :: | emDxVinv_i | Imaginary component of |
||
type(cheb1d_scalar_field), | private, | dimension(4) | :: | eDx_r | Real component of , with only diagonal values stored |
||
type(cheb1d_scalar_field), | private, | dimension(4) | :: | eDx_i | Imaginary component of , with only diagonal values stored |
||
real(kind=r8), | private, | dimension(4,4) | :: | V_r | Real component of the change of basis matrix, |
||
real(kind=r8), | private, | dimension(4,4) | :: | V_i | Imaginary component of the change of basis matrix, |
||
type(pseudospec_block), | private | :: | integrator | A pseudospectral differentiation block which can be used to perform integration |
|||
integer, | private | :: | vel_bound_loc | Location code for the velocity's boundary condition |
|||
integer, | private | :: | dvel_bound_loc | Location code for the velocity derivative's boundary condition |
|||
integer, | private | :: | integrate_bound | Location from which to perform the integration |
|||
real(kind=r8), | private, | dimension(4) | :: | xbounds | Boundary location for each component of the solution vector |
||
complex(kind=r8), | private, | dimension(4,4) | :: | bound_matrix | Matrix for the system to solve in order to satisfy the boundary conditions |
||
complex(kind=r8), | private, | dimension(4,4) | :: | bound_matrix_scaled | Matrix for the system to solve in order to satisfy the boundary conditions, which has been scaled by LAPACK95 to improve conditioning. |
||
complex(kind=r8), | private, | dimension(4,4) | :: | factored_matrix | Factored matrix for the system to solve in order to satisfy the boundary conditions |
||
integer, | private, | dimension(4) | :: | pivots | The pivots used in the factorisation of the matrix used to satisfy boundary conditions |
||
real(kind=r8), | private, | dimension(4) | :: | r_scales | Row scale factors from equilibrating the bound_matrix |
||
real(kind=r8), | private, | dimension(4) | :: | c_scales | Column scale factors from equilibrating the bound_matrix |
||
character(len=1), | private | :: | equed | The method used to equilibrate bound_matrix |
|||
integer, | private | :: | int |
private function constructor(phi, nu, velbound, dvelbound, integrate_bound, template) | Builds a Coriolis block which can be used to solve the inverse problem for the linear components of the plume momentum equations. The result can only be used with fields having the same grid as the template. |
procedure, public :: solve_for | |
procedure, private :: assign | |
generic, public :: assignment(=) => assign |
Builds a Coriolis block which can be used to solve the inverse problem for the linear components of the plume momentum equations. The result can only be used with fields having the same grid as the template.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(in) | :: | phi | The dimensionless coriolis parameter |
||
real(kind=r8), | intent(in) | :: | nu | The dimensionless eddy diffusivity |
||
integer, | intent(in) | :: | velbound | Location code for the velocity's boundary condition. 1 indicates upper boundary, -1 indicates lower boundary. |
||
integer, | intent(in) | :: | dvelbound | Location code for the velocity's boundary condition. 1 indicates upper boundary, -1 indicates lower boundary. |
||
integer, | intent(in) | :: | integrate_bound | Location code for the boundary to perform integrations from. This should be the opposite boundary from where boundary data is stored. |
||
class(abstract_field), | intent(in) | :: | template | A scalar field with the same grid as any fields passed as arguments to the solve_for method. |
Inverts the linear portions of the plume momentum equation with the provided data. This is done by solving the linear ODE described in the documentation for the coriolis_block type. The block object must first have been initialised using the constructor.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(coriolis_block), | intent(inout) | :: | this | |||
class(vector_field), | intent(inout) | :: | velocity | On input, the velocity value being preconditioned. On output, the preconditioned velocity. |
||
class(vector_field), | intent(inout) | :: | velocity_dx | On input, the velocity derivative being preconditioned. On output, the preconditioned velocity derivative. |
Safely assigns the value of one coriolis block to another.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(coriolis_block), | intent(inout) | :: | this | |||
class(coriolis_block), | intent(in) | :: | rhs | The value being assigned |