load_spatial_parabol Subroutine

private subroutine load_spatial_parabol(me, conf, thandle, nComp)

This subroutine load 3d parabola type variables from LUA file.

Specify amplitude to size of nComp in spatial block. If amplitude is not defined, it set to 1.0_rk for all components Valid definition:

  1. 2D parabola
 spatial = {predefined='parabol', shape = { center/origin={-5.0, 0.0, 0.0},
                                            vec={0.0, 1.0, 0.0}},
                                            amplitude = 0.01}
 where, center - line center.
        origin - line origin. (define either center or origin)
        vec    - length of the line.

Parabolic 2D profile at channel inlet.

parabol2d

  1. 3D parabola
 spatial = {
   predefined = 'parabol',
   shape = {
     center/origin = {-5.0, 0.0, 0.0},
     vec = {
       {0.0, 1.0, 0.0},
       {1.0, 0.0, 0.0}
     },
     amplitude = 0.01
  }
 where, center - plane center.
        origin - plane origin. (define either center or origin)
        vec    - length of the plane in 2 direction.
        amplitude - maximum value

Parabolic 3D profile at channel inlet. parabol3d

Example: Inlet velocity at inlet plane with velocity along x-dir with a maximum velocity 0.08. Inlet plane is normal to x-dir and located at offset of {-5,0,0} from origin. The plane spans -1 to 1 in both y and z-dir.

 boundary_condition = {
   {
     label = 'inlet',
     kind = 'inlet_ubb',
     velocityX = {
       kind = 'combined',
       spatial = {
         predefined='parabol',
         shape = {
           origin = {-5.0, 0.0, 0.0},
           vec={ {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0} }
         },
         amplitude = 0.01
       }
     },
     velocityY = 0.0
     velocityZ = 0.0
   }
 }
  _______vecB____
 |       |      |
 |       |      |
 |       |______|vecA
 |     center   |
 |              |
 |______________|_

Arguments

Type IntentOptional Attributes Name
type(spatial_parabol_type), intent(out) :: me

parabola3d spatial datas

type(flu_State) :: conf

lua state type

integer, intent(in) :: thandle

aotus parent handle

integer, intent(in) :: nComp

Number of components


Calls

proc~~load_spatial_parabol~~CallsGraph proc~load_spatial_parabol load_spatial_parabol interface~tem_load_shape tem_load_shape proc~load_spatial_parabol->interface~tem_load_shape interface~tem_tostr tem_toStr proc~load_spatial_parabol->interface~tem_tostr proc~load_spatial_asconst load_spatial_asConst proc~load_spatial_parabol->proc~load_spatial_asconst proc~tem_abort tem_abort proc~load_spatial_parabol->proc~tem_abort proc~tem_load_shape_single tem_load_shape_single interface~tem_load_shape->proc~tem_load_shape_single proc~tem_load_shapes tem_load_shapes interface~tem_load_shape->proc~tem_load_shapes proc~tem_b2str tem_b2str interface~tem_tostr->proc~tem_b2str proc~tem_b2str_arr tem_b2str_arr interface~tem_tostr->proc~tem_b2str_arr proc~tem_d2str tem_d2str interface~tem_tostr->proc~tem_d2str proc~tem_d2str_arr tem_d2str_arr interface~tem_tostr->proc~tem_d2str_arr proc~tem_i2str tem_i2str interface~tem_tostr->proc~tem_i2str proc~tem_i2str_arr tem_i2str_arr interface~tem_tostr->proc~tem_i2str_arr proc~tem_l2str tem_l2str interface~tem_tostr->proc~tem_l2str proc~tem_l2str_arr tem_l2str_arr interface~tem_tostr->proc~tem_l2str_arr proc~tem_r2str tem_r2str interface~tem_tostr->proc~tem_r2str proc~tem_r2str_arr tem_r2str_arr interface~tem_tostr->proc~tem_r2str_arr proc~load_spatial_asconst->proc~tem_abort aot_get_val aot_get_val proc~load_spatial_asconst->aot_get_val mpi_abort mpi_abort proc~tem_abort->mpi_abort proc~tem_load_shape_single->proc~tem_abort proc~tem_load_shape_single->aot_get_val aot_table_close aot_table_close proc~tem_load_shape_single->aot_table_close aot_table_open aot_table_open proc~tem_load_shape_single->aot_table_open interface~tem_load_canonicalnd tem_load_canonicalND proc~tem_load_shape_single->interface~tem_load_canonicalnd proc~tem_load_stl tem_load_stl proc~tem_load_shape_single->proc~tem_load_stl proc~tem_load_transformation tem_load_transformation proc~tem_load_shape_single->proc~tem_load_transformation proc~tem_shape_load_bclabels tem_shape_load_bcLabels proc~tem_load_shape_single->proc~tem_shape_load_bclabels proc~tem_shape_load_level tem_shape_load_level proc~tem_load_shape_single->proc~tem_shape_load_level proc~tem_shape_load_proplabel tem_shape_load_propLabel proc~tem_load_shape_single->proc~tem_shape_load_proplabel tem_load_cylinder tem_load_cylinder proc~tem_load_shape_single->tem_load_cylinder tem_load_ellipsoid tem_load_ellipsoid proc~tem_load_shape_single->tem_load_ellipsoid tem_load_sphere tem_load_sphere proc~tem_load_shape_single->tem_load_sphere tem_load_triangle tem_load_triangle proc~tem_load_shape_single->tem_load_triangle proc~tem_load_shapes->proc~tem_load_shape_single proc~tem_load_shapes->aot_table_close aot_table_length aot_table_length proc~tem_load_shapes->aot_table_length proc~tem_load_shapes->aot_table_open

Called by

proc~~load_spatial_parabol~~CalledByGraph proc~load_spatial_parabol load_spatial_parabol proc~load_spatial_predefined load_spatial_predefined proc~load_spatial_predefined->proc~load_spatial_parabol proc~tem_load_spatial tem_load_spatial proc~tem_load_spatial->proc~load_spatial_predefined proc~load_spacetime_predefined load_spacetime_predefined proc~load_spacetime_predefined->proc~tem_load_spatial proc~tem_load_ic tem_load_ic proc~tem_load_ic->proc~tem_load_spatial proc~tem_load_spacetime_single tem_load_spacetime_single proc~tem_load_spacetime_single->proc~load_spacetime_predefined

Source Code

  subroutine load_spatial_parabol( me, conf, thandle, nComp )
    ! -------------------------------------------------------------------- !
    !> parabola3d spatial datas
    type(spatial_parabol_type),intent(out) :: me
    !> lua state type
    type(flu_State) :: conf
    !> aotus parent handle
    integer, intent(in) :: thandle
    !> Number of components
    integer, intent(in) :: nComp
    ! -------------------------------------------------------------------- !
    integer :: iError
    ! -------------------------------------------------------------------- !

    ! load geometry
    call tem_load_shape( conf    = conf,       &
      &                  parent  = thandle,    &
      &                  me      = me%geometry )

    if (size(me%geometry%canoND) /= 1) then
      write(logUnit(1),*) 'Error: Requires single shape for spatial "parabol"'
      call tem_abort()
    end if

    call load_spatial_asConst( const   = me%amplitude, &
      &                        conf    = conf,         &
      &                        errCode = iError,       &
      &                        parent  = thandle,      &
      &                        key     = 'amplitude',  &
      &                        nComp   = nComp         )

    if ( iError /= 0 ) then
      write(logUnit(1),*) 'Warning: amplitude is not defined.'
      write(logUnit(1),*) '         Set to default value 1.0 for all components'
      me%amplitude = ref_amp
    end if

    if (nComp == 1) then
      write(logUnit(5),"(A)") ' amplitude = ' &
        & // trim(tem_toStr(me%amplitude(1)))
    else
      write(logUnit(5),"(A)") ' amplitude = ' &
        & // trim(tem_toStr(me%amplitude(1:nComp),','))
    end if

  end subroutine load_spatial_parabol