add_source_term_residue Subroutine

public subroutine add_source_term_residue(qp, residue, cells, Ifaces, Jfaces, Kfaces, scheme, flow, dims)

Call to add different source terms to the residual of different equations.

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

Store primitive variable at cell center

real(kind=wp), intent(inout), dimension(:, :, :, :):: residue

Store residue at each 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(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


Calls

proc~~add_source_term_residue~~CallsGraph proc~add_source_term_residue add_source_term_residue proc~add_sst_source_lctm2015 add_sst_source_lctm2015 proc~add_source_term_residue->proc~add_sst_source_lctm2015 proc~add_kkl_source add_kkl_source proc~add_source_term_residue->proc~add_kkl_source proc~add_sst_bc_source add_sst_bc_source proc~add_source_term_residue->proc~add_sst_bc_source proc~add_sabc_source add_saBC_source proc~add_source_term_residue->proc~add_sabc_source proc~add_sst_source add_sst_source proc~add_source_term_residue->proc~add_sst_source debugcall debugcall proc~add_source_term_residue->debugcall proc~add_sa_source add_sa_source proc~add_source_term_residue->proc~add_sa_source proc~find_dccvn find_DCCVn proc~add_sst_source_lctm2015->proc~find_dccvn proc~compute_gradient compute_gradient proc~find_dccvn->proc~compute_gradient proc~find_ccvn find_CCVn proc~find_dccvn->proc~find_ccvn

Called by

proc~~add_source_term_residue~~CalledByGraph proc~add_source_term_residue add_source_term_residue proc~get_total_conservative_residue get_total_conservative_Residue proc~get_total_conservative_residue->proc~add_source_term_residue proc~get_next_solution get_next_solution proc~get_next_solution->proc~get_total_conservative_residue proc~iterate_one_more_time_step iterate_one_more_time_step proc~iterate_one_more_time_step->proc~get_next_solution program~main main program~main->proc~iterate_one_more_time_step

Contents


Source Code

    subroutine add_source_term_residue(qp, residue, cells, Ifaces,Jfaces,Kfaces,scheme,flow, dims)
      !< Call to add different source terms to the residual of different equations.

      implicit none
      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
      real(wp), dimension(-2:dims%imx+2, -2:dims%jmx+2, -2:dims%kmx+2, 1:dims%n_var), intent(in) :: qp
      !< Store primitive variable at cell center
      real(wp), dimension(:, :, :, :), intent(inout)  :: residue
      !< Store residue at each cell-center
      type(celltype), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+2), intent(in) :: cells
      !< Input cell quantities: volume
      type(facetype), dimension(-2:dims%imx+3,-2:dims%jmx+2,-2:dims%kmx+2), intent(in) :: Ifaces
      !< Input varaible which stores I faces' area and unit normal
      type(facetype), dimension(-2:dims%imx+2,-2:dims%jmx+3,-2:dims%kmx+2), intent(in) :: Jfaces
      !< Input varaible which stores J faces' area and unit normal
      type(facetype), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+3), intent(in) :: Kfaces
      !< Input varaible which stores K faces' area and unit normal

      DebugCall('add_source_term_residue')

      select case (trim(scheme%turbulence))

        case ('none')
          !do nothing
          continue

        case ('sa')
          select case(trim(scheme%transition))
            case('none')
              call add_sa_source(qp, residue, cells, Ifaces,Jfaces,Kfaces,dims)
            case('bc')
              call add_saBC_source(qp, residue, cells, Ifaces,Jfaces,Kfaces,flow, dims)
            case DEFAULT
              Fatal_error
          end select

        case ('sst', 'sst2003')
          select case(trim(scheme%transition))
            case('none')
              call add_sst_source(qp, residue, cells,scheme, dims)
            case('lctm2015')
              call add_sst_source_lctm2015(qp, residue, cells,Ifaces,Jfaces,Kfaces,scheme, dims)
            case('bc')
              call add_sst_bc_source(qp, residue, cells,flow,dims)
            case DEFAULT
              Fatal_error
          end select

        case ('kkl')
          call add_kkl_source(qp, residue, cells, Ifaces,Jfaces,Kfaces, dims)

        case DEFAULT
          Fatal_error

      end select

    end subroutine add_source_term_residue