CC Module

In order to calculate pressure gradient in the transition model, two quantities are required: the distance of the cell-center from the wall andn the normal made by the distance vector field (from wall to cell-center). This module calucate both with gradient of V.n also.


Uses

  • module~~cc~~UsesGraph module~cc CC module~utils utils module~cc->module~utils module~vartypes vartypes module~cc->module~vartypes module~wall_dist wall_dist module~cc->module~wall_dist iso_fortran_env iso_fortran_env module~vartypes->iso_fortran_env module~wall_dist->module~utils module~wall_dist->module~vartypes

Used by

  • module~~cc~~UsedByGraph module~cc CC module~source source module~source->module~cc module~solver solver module~solver->module~cc module~update update module~solver->module~update program~main main program~main->module~solver module~update->module~source

Contents


Variables

TypeVisibility AttributesNameInitial
real(kind=wp), public, dimension(:, :, :), allocatable:: CCnormalX

Cell-Center normal nx with respect to wall; used for transition model (pressure gradient calcualtion)

real(kind=wp), public, dimension(:, :, :), allocatable:: CCnormalY

Cell-Center normal ny with respect to wall; used for transiton model (pressure gradient calculation)

real(kind=wp), public, dimension(:, :, :), allocatable:: CCnormalZ

Cell-Center normal nz with respect to wall; used for transiton model (pressure gradient calculation)

real(kind=wp), private, dimension(:, :, :), allocatable:: CCVn

Store value at Cell-Center of dot product between velocity vector and cell-center normal. {vec(Velocity).normal}

real(kind=wp), public, dimension(:, :, :), allocatable:: DCCVnX

Store Derivative of Cell-Center CCVn with respect to x

real(kind=wp), public, dimension(:, :, :), allocatable:: DCCVnY

Store Derivative of Cell-Center CCVn with respect to y

real(kind=wp), public, dimension(:, :, :), allocatable:: DCCVnZ

Store Derivative of Cell-Center CCVn with respect to z


Subroutines

public subroutine setupCC(scheme, cells, Ifaces, Jfaces, Kfaces, dims)

Allocate memory for the cell center variable only in case of transition model

Arguments

Type IntentOptional AttributesName
type(schemetype), intent(in) :: scheme
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

private subroutine find_CCnormal(cells, Ifaces, Jfaces, Kfaces, dims)

Find the cell-center unit normal

Arguments

Type IntentOptional AttributesName
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

private subroutine find_CCVn(qp, dims)

Taking a dot product between Cell-center velocity and unit normal

Arguments

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

public subroutine find_DCCVn(qp, cells, Ifaces, Jfaces, Kfaces, dims)

Find gradient of the dot product between cell velocity and unit normal

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), dimension(-2:dims%imx,-2:dims%jmx,-2:dims%kmx,-2:dims%n_var):: qp
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

private subroutine compute_gradient(grad, var, cells, Ifaces, Jfaces, Kfaces, dir, dims)

Generalized subroutine to calculate gradients

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(out), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+2):: grad
real(kind=wp), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+2):: var
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

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