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:
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.
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.
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 |
| |
|______________|_
Type | Intent | Optional | 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 |
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