Read flow.md control file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(filetype), | intent(in) | :: | files | |||
type(controltype), | intent(inout) | :: | control | |||
type(flowtype), | intent(inout) | :: | flow |
subroutine read_flow(files, control, flow)
!< Read flow.md control file
!--------------------------------------------
implicit none
type(filetype), intent(in) :: files
type(controltype), intent(inout) :: control
type(flowtype), intent(inout) :: flow
character(len=STRING_BUFFER_LENGTH) :: buf
DebugCall('read_flow')
open(files%FLOW_FILE_UNIT, file=files%flow_file, status='old', action='read')
! ignoring file header
read(files%FLOW_FILE_UNIT,*)
read(files%FLOW_FILE_UNIT,*)
read(files%FLOW_FILE_UNIT,*)
! read number of variable
call get_next_token(files%FLOW_FILE_UNIT, buf)
read(buf, *) control%n_var
DebugInfo('Number of variables = '//trim(buf))
! read rho_inf
call get_next_token(files%FLOW_FILE_UNIT, buf)
read(buf, *) flow%density_inf
DebugInfo('free_stream_density = '//trim(buf))
! read u_inf
call get_next_token(files%FLOW_FILE_UNIT, buf)
read(buf, *) flow%x_speed_inf
DebugInfo('free_stream_x_speed = '//trim(buf))
! read v_inf
call get_next_token(files%FLOW_FILE_UNIT, buf)
read(buf, *) flow%y_speed_inf
DebugInfo('free_stream_y_speed = '//trim(buf))
! read w_inf
call get_next_token(files%FLOW_FILE_UNIT, buf)
read(buf, *) flow%z_speed_inf
DebugInfo('free_stream_z_speed = '//trim(buf))
! read P_inf
call get_next_token(files%FLOW_FILE_UNIT, buf)
read(buf, *) flow%pressure_inf
DebugInfo('free_stream_pressure = '//trim(buf))
! read turbulence intensity in percentage
call get_next_token(files%FLOW_FILE_UNIT, buf)
read(buf, *) flow%tu_inf
DebugInfo('free_stream_Turb_intensity = '//trim(buf))
! read viscosity ratio
call get_next_token(files%FLOW_FILE_UNIT, buf)
read(buf, *) flow%mu_ratio_inf
DebugInfo('free_stream_mu_ratio = '//trim(buf))
! read intermittency
call get_next_token(files%FLOW_FILE_UNIT, buf)
read(buf, *) flow%tgm_inf
DebugInfo('free_stream_Intermittency = '//trim(buf))
! read reference viscosity
call get_next_token(files%FLOW_FILE_UNIT, buf)
read(buf, *) flow%mu_ref
DebugInfo('mu_reference = '//trim(buf))
! Type of variation for viscosity
call get_next_token(files%FLOW_FILE_UNIT, buf)
read(buf, *) flow%mu_variation
DebugInfo('mu_variation = '//trim(buf))
! read T_red
call get_next_token(files%FLOW_FILE_UNIT, buf)
read(buf, *) flow%T_ref
DebugInfo('T_reference = '//trim(buf))
! read Sutherland temp
call get_next_token(files%FLOW_FILE_UNIT, buf)
read(buf, *) flow%Sutherland_temp
DebugInfo('Sutherland temperature = '//trim(buf))
! read prandtl number
call get_next_token(files%FLOW_FILE_UNIT, buf)
read(buf, *) flow%Pr, flow%tPr
DebugInfo('Prandtl Number = '//trim(buf))
! read gamma
call get_next_token(files%FLOW_FILE_UNIT, buf)
read(buf, *) flow%gm
DebugInfo('gamma = '//trim(buf))
! read universal gas constant
call get_next_token(files%FLOW_FILE_UNIT, buf)
read(buf, *) flow%R_gas
DebugInfo('R_gas = '//trim(buf))
close(files%FLOW_FILE_UNIT)
end subroutine read_flow