This commit is contained in:
@@ -26,6 +26,7 @@ module fem_inp_reader
|
||||
integer, parameter :: MODE_RATE_DEPENDENT = 16
|
||||
integer, parameter :: MODE_SPECIFIC_HEAT = 17
|
||||
integer, parameter :: MODE_INELASTIC_HEAT_FRACTION = 18
|
||||
integer, parameter :: MODE_STATIC = 19
|
||||
|
||||
contains
|
||||
|
||||
@@ -243,6 +244,8 @@ contains
|
||||
mode = MODE_DLOAD
|
||||
else if (starts_with(upper, '*DYNAMIC')) then
|
||||
mode = MODE_DYNAMIC
|
||||
else if (starts_with(upper, '*STATIC')) then
|
||||
mode = MODE_STATIC
|
||||
else if (starts_with(upper, '*AMPLITUDE')) then
|
||||
mode = MODE_AMPLITUDE
|
||||
amplitude_count = amplitude_count + 1
|
||||
@@ -445,6 +448,13 @@ contains
|
||||
close(unit_id)
|
||||
return
|
||||
end if
|
||||
else if (mode .eq. MODE_STATIC) then
|
||||
call parse_static_line(clean, ierr)
|
||||
mode = MODE_NONE
|
||||
if (ierr .ne. FEM_SUCCESS) then
|
||||
close(unit_id)
|
||||
return
|
||||
end if
|
||||
else if (mode .eq. MODE_AMPLITUDE) then
|
||||
call parse_amplitude_line(clean, current_amp, amp_pos, ierr)
|
||||
if (ierr .ne. FEM_SUCCESS) then
|
||||
@@ -621,7 +631,11 @@ contains
|
||||
else if (starts_with(line, '*DLOAD')) then
|
||||
mode = MODE_DLOAD
|
||||
else if (starts_with(line, '*DYNAMIC')) then
|
||||
analysis_type = ANALYSIS_EXPLICIT_DYNAMIC
|
||||
mode = MODE_DYNAMIC
|
||||
else if (starts_with(line, '*STATIC')) then
|
||||
call set_static_defaults()
|
||||
mode = MODE_STATIC
|
||||
else if (starts_with(line, '*AMPLITUDE')) then
|
||||
mode = MODE_AMPLITUDE
|
||||
call get_keyword_value(line, 'NAME', name_value)
|
||||
@@ -1184,6 +1198,98 @@ contains
|
||||
ierr = FEM_SUCCESS
|
||||
end subroutine parse_dynamic_line
|
||||
|
||||
subroutine set_static_defaults()
|
||||
analysis_type = ANALYSIS_STATIC_LINEAR
|
||||
static_initial_increment = ONE
|
||||
static_min_increment = ZERO
|
||||
static_max_increment = ONE
|
||||
load_factor = ONE
|
||||
dt_user = ONE
|
||||
time_end = ONE
|
||||
use_user_dt = .true.
|
||||
nstep_max = 1
|
||||
max_increment = 1
|
||||
end subroutine set_static_defaults
|
||||
|
||||
subroutine parse_static_line(line, ierr)
|
||||
character(len=*), intent(in) :: line
|
||||
integer, intent(out) :: ierr
|
||||
character(len=LINE_LEN) :: token
|
||||
real(rk) :: value
|
||||
real(rk) :: ratio
|
||||
integer :: ios
|
||||
|
||||
call set_static_defaults()
|
||||
|
||||
call csv_token(line, 1, token)
|
||||
if (len_trim(token) .eq. 0) then
|
||||
ierr = FEM_SUCCESS
|
||||
return
|
||||
end if
|
||||
read(token,*,iostat=ios) value
|
||||
if (ios .ne. 0) then
|
||||
call error_set(FEM_ERR_INPUT, 'failed to parse *STATIC initial increment', ierr)
|
||||
return
|
||||
end if
|
||||
if (value .le. ZERO) then
|
||||
call error_set(FEM_ERR_INPUT, '*STATIC initial increment must be positive', ierr)
|
||||
return
|
||||
end if
|
||||
static_initial_increment = value
|
||||
dt_user = value
|
||||
|
||||
call csv_token(line, 2, token)
|
||||
if (len_trim(token) .gt. 0) then
|
||||
read(token,*,iostat=ios) value
|
||||
if (ios .ne. 0) then
|
||||
call error_set(FEM_ERR_INPUT, 'failed to parse *STATIC total time', ierr)
|
||||
return
|
||||
end if
|
||||
if (value .le. ZERO) then
|
||||
call error_set(FEM_ERR_INPUT, '*STATIC total time must be positive', ierr)
|
||||
return
|
||||
end if
|
||||
time_end = value
|
||||
end if
|
||||
|
||||
call csv_token(line, 3, token)
|
||||
if (len_trim(token) .gt. 0) then
|
||||
read(token,*,iostat=ios) value
|
||||
if (ios .ne. 0) then
|
||||
call error_set(FEM_ERR_INPUT, 'failed to parse *STATIC minimum increment', ierr)
|
||||
return
|
||||
end if
|
||||
if (value .lt. ZERO) then
|
||||
call error_set(FEM_ERR_INPUT, '*STATIC minimum increment must be non-negative', ierr)
|
||||
return
|
||||
end if
|
||||
static_min_increment = value
|
||||
end if
|
||||
|
||||
call csv_token(line, 4, token)
|
||||
if (len_trim(token) .gt. 0) then
|
||||
read(token,*,iostat=ios) value
|
||||
if (ios .ne. 0) then
|
||||
call error_set(FEM_ERR_INPUT, 'failed to parse *STATIC maximum increment', ierr)
|
||||
return
|
||||
end if
|
||||
if (value .le. ZERO) then
|
||||
call error_set(FEM_ERR_INPUT, '*STATIC maximum increment must be positive', ierr)
|
||||
return
|
||||
end if
|
||||
static_max_increment = value
|
||||
end if
|
||||
|
||||
ratio = time_end / static_initial_increment
|
||||
nstep_max = int(ratio)
|
||||
if (real(nstep_max, rk) * static_initial_increment .lt. &
|
||||
time_end * (ONE - 1.0e-10_rk)) nstep_max = nstep_max + 1
|
||||
if (nstep_max .lt. 1) nstep_max = 1
|
||||
max_increment = nstep_max
|
||||
|
||||
ierr = FEM_SUCCESS
|
||||
end subroutine parse_static_line
|
||||
|
||||
subroutine parse_shell_section_line(line, section_index, ierr)
|
||||
character(len=*), intent(in) :: line
|
||||
integer, intent(in) :: section_index
|
||||
|
||||
Reference in New Issue
Block a user