gradients Module

Allocate memory to laminar gradients if flow is viscous and allocate memory to tubulence gradients base upon the model being used


Uses

  • module~~gradients~~UsesGraph module~gradients gradients module~utils utils module~gradients->module~utils module~vartypes vartypes module~gradients->module~vartypes iso_fortran_env iso_fortran_env module~vartypes->iso_fortran_env

Used by

  • module~~gradients~~UsedByGraph module~gradients gradients module~source source module~source->module~gradients module~viscosity viscosity module~source->module~viscosity module~plusgs plusgs module~plusgs->module~gradients module~plusgs->module~viscosity module~write_output_vtk write_output_vtk module~write_output_vtk->module~gradients module~write_output_vtk->module~viscosity module~write_output_tec write_output_tec module~write_output_tec->module~gradients module~write_output_tec->module~viscosity module~lusgs lusgs module~lusgs->module~gradients module~lusgs->module~viscosity module~solver solver module~solver->module~gradients module~solver->module~viscosity module~update update module~solver->module~update module~viscous viscous module~solver->module~viscous module~time time module~solver->module~time module~dump_solution dump_solution module~solver->module~dump_solution module~write_output_tec_node write_output_tec_node module~write_output_tec_node->module~gradients module~write_output_tec_node->module~viscosity module~viscosity->module~gradients module~update->module~gradients module~update->module~source module~update->module~plusgs module~update->module~lusgs module~update->module~viscosity module~update->module~viscous module~update->module~time module~viscous->module~gradients module~viscous->module~viscosity program~main main program~main->module~solver module~time->module~viscosity module~write_output write_output module~write_output->module~write_output_vtk module~write_output->module~write_output_tec module~write_output->module~write_output_tec_node module~dump_solution->module~write_output

Contents


Variables

TypeVisibility AttributesNameInitial
integer, public :: n_grad =4

Number of variable to store gradient for

real(kind=wp), public, dimension(:, :, :, :), allocatable, target:: gradqp_x

Store gradient of n_grad variables with respect to direction x

real(kind=wp), public, dimension(:, :, :, :), allocatable, target:: gradqp_y

Store gradient of n_grad variables with respect to direction y

real(kind=wp), public, dimension(:, :, :, :), allocatable, target:: gradqp_z

Store gradient of n_grad variables with respect to direction z

real(kind=wp), public, dimension(:, :, :), pointer:: gradu_x

Gradient of variable U with respect to direction x

real(kind=wp), public, dimension(:, :, :), pointer:: gradu_y

Gradient of variable U with respect to direction y

real(kind=wp), public, dimension(:, :, :), pointer:: gradu_z

Gradient of variable U with respect to direction z

real(kind=wp), public, dimension(:, :, :), pointer:: gradv_x

Gradient of variable V with respect to direction x

real(kind=wp), public, dimension(:, :, :), pointer:: gradv_y

Gradient of variable V with respect to direction y

real(kind=wp), public, dimension(:, :, :), pointer:: gradv_z

Gradient of variable V with respect to direction z

real(kind=wp), public, dimension(:, :, :), pointer:: gradw_x

Gradient of variable W with respect to direction x

real(kind=wp), public, dimension(:, :, :), pointer:: gradw_y

Gradient of variable W with respect to direction y

real(kind=wp), public, dimension(:, :, :), pointer:: gradw_z

Gradient of variable W with respect to direction z

real(kind=wp), public, dimension(:, :, :), pointer:: gradT_x

Gradient of variable Temperature with respect to direction x

real(kind=wp), public, dimension(:, :, :), pointer:: gradT_y

Gradient of variable Temperature with respect to direction y

real(kind=wp), public, dimension(:, :, :), pointer:: gradT_z

Gradient of variable Temperature with respect to direction z

real(kind=wp), public, dimension(:, :, :), pointer:: gradtk_x

Gradient of variable turbulent kinetic energy with respect to direction x

real(kind=wp), public, dimension(:, :, :), pointer:: gradtk_y

Gradient of variable turbulent kinetic energy with respect to direction y

real(kind=wp), public, dimension(:, :, :), pointer:: gradtk_z

Gradient of variable turbulent kinetic energy with respect to direction z

real(kind=wp), public, dimension(:, :, :), pointer:: gradtw_x

Gradient of variable dissipation rate with respect to direction x

real(kind=wp), public, dimension(:, :, :), pointer:: gradtw_y

Gradient of variable dissipation rate with respect to direction y

real(kind=wp), public, dimension(:, :, :), pointer:: gradtw_z

Gradient of variable dissipation rate with respect to direction z

real(kind=wp), public, dimension(:, :, :), pointer:: gradtkl_x

Gradient of variable kL with respect to direction x

real(kind=wp), public, dimension(:, :, :), pointer:: gradtkl_y

Gradient of variable kL with respect to direction y

real(kind=wp), public, dimension(:, :, :), pointer:: gradtkl_z

Gradient of variable kL with respect to direction z

real(kind=wp), public, dimension(:, :, :), pointer:: gradte_x

Gradient of variable turbulent energy dissiaption with respect to direction x

real(kind=wp), public, dimension(:, :, :), pointer:: gradte_y

Gradient of variable turbulent energy dissiaption with respect to direction y

real(kind=wp), public, dimension(:, :, :), pointer:: gradte_z

Gradient of variable turbulent energy dissiaption with respect to direction z

real(kind=wp), public, dimension(:, :, :), pointer:: gradtv_x

Gradient of variable turbulenct visocity(SA mode) with respect to direction x

real(kind=wp), public, dimension(:, :, :), pointer:: gradtv_y

Gradient of variable turbulenct visocity(SA mode) with respect to direction y

real(kind=wp), public, dimension(:, :, :), pointer:: gradtv_z

Gradient of variable turbulenct visocity(SA mode) with respect to direction z

real(kind=wp), public, dimension(:, :, :), pointer:: gradtgm_x

Gradient of variable intermittency with respect to direction x

real(kind=wp), public, dimension(:, :, :), pointer:: gradtgm_y

Gradient of variable intermittency with respect to direction y

real(kind=wp), public, dimension(:, :, :), pointer:: gradtgm_z

Gradient of variable intermittency with respect to direction z

real(kind=wp), public :: R_gas
integer, public :: imx
integer, public :: jmx
integer, public :: kmx
integer, public :: n_var

Derived Types

type, public :: singlesub

Components

TypeVisibility AttributesNameInitial
integer, public :: imin
integer, public :: imax
integer, public :: il
integer, public :: iu
integer, public :: jmin
integer, public :: jmax
integer, public :: jl
integer, public :: ju
integer, public :: kmin
integer, public :: kmax
integer, public :: kl
integer, public :: ku
integer, public :: sig =1

Subroutines

public subroutine setup_gradients(control, scheme, flow, dims)

Memoery allocation to the gradient variables and setup pointer to the slice to the main gradient variable based on the various models being used.

Read more…

Arguments

Type IntentOptional AttributesName
type(controltype), intent(in) :: control

Control parameters

type(schemetype), intent(in) :: scheme

finite-volume Schemes

type(flowtype), intent(in) :: flow

Information about fluid flow: freestream-speed, ref-viscosity,etc.

type(extent), intent(in) :: dims

Extent of the domain:imx,jmx,kmx

public subroutine get_n_grad(scheme)

Set number of variables for which gradient is required based on the being used

Arguments

Type IntentOptional AttributesName
type(schemetype), intent(in) :: scheme

finite-volume Schemes

public subroutine evaluate_all_gradients(qp, Temp, cells, Ifaces, Jfaces, Kfaces, scheme, bc, dims)

Call to all the required gradients and apply boundary condition for ghost cell gradients

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), dimension(-2:dims%imx+2, -2:dims%jmx+2, -2:dims%kmx+2, 1:dims%n_var), Target:: qp

Store primitive variable at cell center

real(kind=wp), intent(in), dimension(-2:dims%imx+2, -2:dims%jmx+2, -2:dims%kmx+2):: Temp

Store Temperature variable at cell center

type(celltype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+2):: cells

Input cell quantities: volume

type(facetype), intent(in), dimension(-2:dims%imx+3,-2:dims%jmx+2,-2:dims%kmx+2):: Ifaces

Input varaible which stores I faces' area and unit normal

type(facetype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+3,-2:dims%kmx+2):: Jfaces

Input varaible which stores J faces' area and unit normal

type(facetype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+3):: Kfaces

Input varaible which stores K faces' area and unit normal

type(schemetype), intent(in) :: scheme

finite-volume Schemes

type(boundarytype), intent(in) :: bc

boundary conditions and fixed values

type(extent), intent(in) :: dims

Extent of the domain:imx,jmx,kmx

public subroutine compute_gradient_G(grad, var, cells, Ifaces, Jfaces, Kfaces, dims, dir)

Compute gradient of any input scalar

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(out), dimension( 0:dims%imx , 0:dims%jmx , 0:dims%kmx ):: grad

Output variable storing the graident of var

real(kind=wp), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+2):: var

Input variable of which graident is required

type(celltype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+2):: cells

Input cell quantities: volume

type(facetype), intent(in), dimension(-2:dims%imx+3,-2:dims%jmx+2,-2:dims%kmx+2):: Ifaces

Input varaible which stores I faces' area and unit normal

type(facetype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+3,-2:dims%kmx+2):: Jfaces

Input varaible which stores J faces' area and unit normal

type(facetype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+3):: Kfaces

Input varaible which stores K faces' area and unit normal

type(extent), intent(in) :: dims
character(len=*), intent(in) :: dir

Direction with respect to which gradients are calculated

public subroutine apply_gradient_bc(qp, Temp, cells, Ifaces, Jfaces, Kfaces, bc, dims)

Call same subroutine for all the face Apply/set value of all gradient in the ghost cells gradqp_G = (qp_I - qp_G)Area_Wunit_normal_G/(volume_G) volume_G = volume_I

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+2, 1:dims%n_var):: qp

Input variable of which graident is required

real(kind=wp), intent(in), dimension(-2:dims%imx+2, -2:dims%jmx+2, -2:dims%kmx+2):: Temp

Intput Temperature variable

type(celltype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+2):: cells

Input cell quantities: volume

type(facetype), intent(in), dimension(-2:dims%imx+3,-2:dims%jmx+2,-2:dims%kmx+2):: Ifaces

Input varaible which stores I faces' area and unit normal

type(facetype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+3,-2:dims%kmx+2):: Jfaces

Input varaible which stores J faces' area and unit normal

type(facetype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+3):: Kfaces

Input varaible which stores K faces' area and unit normal

type(boundarytype), intent(in) :: bc
type(extent), intent(in) :: dims

Extent of the domain:imx,jmx,kmx

public subroutine apply_gradient_bc_face(qp, Temp, cells, faces, dims, domain, bc_id, fixed_temp)

Call same subroutine for all the face Apply/set value of all gradient in the ghost cells gradqp_G = (qp_I - qp_G)Area_Wunit_normal_G/(volume_G) volume_G = volume_I

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+2, 1:dims%n_var):: qp

Input variable of which graident is required

real(kind=wp), intent(in), dimension(-2:dims%imx+2, -2:dims%jmx+2, -2:dims%kmx+2):: Temp

Intput Temperature variable

type(celltype), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+2):: cells

Input cell quantities: volume

type(facetype), intent(in), dimension(-2:dims%imx+3,-2:dims%jmx+2,-2:dims%kmx+2):: faces

Input varaible which stores any(I,J,K) faces' area and unit normal

type(extent), intent(in) :: dims

Extent of the domain:imx,jmx,kmx

type(singlesub), intent(in) :: domain

flags for direction

integer, intent(in) :: bc_id
real(kind=wp), intent(in) :: fixed_temp