get_fixed_values Subroutine

private subroutine get_fixed_values(files, scheme, flow, bc, count)

Extract fixed value from the bc_**.md file

Arguments

Type IntentOptional AttributesName
type(filetype), intent(in) :: files
type(schemetype), intent(in) :: scheme
type(flowtype), intent(in) :: flow
type(boundarytype), intent(inout) :: bc
integer, intent(in) :: count

Calls

proc~~get_fixed_values~~CallsGraph proc~get_fixed_values get_fixed_values proc~set_value set_value proc~get_fixed_values->proc~set_value

Called by

proc~~get_fixed_values~~CalledByGraph proc~get_fixed_values get_fixed_values proc~read_fixed_values read_fixed_values proc~read_fixed_values->proc~get_fixed_values proc~setup_bc setup_bc proc~setup_bc->proc~read_fixed_values proc~setup_solver setup_solver proc~setup_solver->proc~setup_bc proc~start_run start_run proc~start_run->proc~setup_solver program~main main program~main->proc~start_run

Contents

Source Code


Source Code

    subroutine get_fixed_values(files, scheme, flow, bc, count)
      !< Extract fixed value from the bc_**.md file
      implicit none
      type(filetype), intent(in) :: files
      type(schemetype), intent(in) :: scheme
      type(flowtype), intent(in) :: flow
      type(boundarytype), intent(inout) :: bc
      integer, intent(in) :: count
      real(wp) :: fix_val
      integer :: ios
      do while(.true.)
        read(files%BOUNDARY_CONDITIONS_FILE_UNIT,"(A)") buf
        if(buf(1:2) == '- ') then 
          read(buf(index(buf(3:), ' ')+3:), *, iostat=ios) fix_val
          select case(buf(3:index(buf(3:), " ")+1))
            case ("FIX_DENSITY")
              call set_value(bc%fixed_density , fix_val, flow%density_inf , count, ios)

            case ("FIX_X_SPEED")
              call set_value(bc%fixed_x_speed , fix_val, flow%x_speed_inf , count, ios)

            case ("FIX_Y_SPEED")
              call set_value(bc%fixed_y_speed , fix_val, flow%y_speed_inf , count, ios)

            case ("FIX_Z_SPEED")
              call set_value(bc%fixed_z_speed , fix_val, flow%z_speed_inf , count, ios)

            case ("FIX_PRESSURE")
              call set_value(bc%fixed_pressure, fix_val, flow%pressure_inf, count, ios)

            case ("WALL_TEMPERATURE")
              call set_value(bc%fixed_wall_temperature, fix_val, 0.0, count, ios)

            case ("TOTAL_TEMPERATURE")
              call set_value(bc%fixed_Ttemperature, fix_val, 0.0, count, ios)

            case ("TOTAL_PRESSURE")
              call set_value(bc%fixed_Tpressure, fix_val, 0.0, count, ios)

          end select

          select case (scheme%turbulence)

            case ("none")
              !do nothing
              continue

            case ("sst", 'tw', 'sst2003')
              select case(buf(3:index(buf(3:), " ")+1))
                case ("FIX_tk")
                  call set_value(bc%fixed_tk      , fix_val, flow%tk_inf      , count, ios)
                case ("FIX_tw")
                  call set_value(bc%fixed_tw      , fix_val, flow%tw_inf      , count, ios)
                case DEFAULT
                  ! no a value to fix
                  continue
              end select
              
            case ("kkl")
              select case(buf(3:index(buf(3:), " ")+1))
                case ("FIX_tk")
                  call set_value(bc%fixed_tk      , fix_val, flow%tk_inf      , count, ios)
                case ("FIX_tkl")
                  call set_value(bc%fixed_tkl     , fix_val, flow%tkl_inf     , count, ios)
                case DEFAULT
                  ! no a value to fix
                  continue
              end select

            case ("sa", "saBC")
              select case(buf(3:index(buf(3:), " ")+1))
                case ("FIX_tv")
                  call set_value(bc%fixed_tk      , fix_val, flow%tv_inf      , count, ios)
                case DEFAULT
                  ! no a value to fix
                  continue
              end select

          end select

        else
          exit
        end if
      end do

    end subroutine get_fixed_values