Checkpoint V5.11 shell redesign baseline
This commit is contained in:
@@ -15,11 +15,16 @@ program test_implicit_inp
|
||||
contact_property_friction_reg, &
|
||||
contact_property_aug_factor, contact_pair_friction_reg, &
|
||||
contact_pair_aug_factor, &
|
||||
contact_pair_property
|
||||
contact_pair_property, n_section_layer, section_type, &
|
||||
section_thickness, section_layer_start, &
|
||||
section_layer_count, section_layer_thickness, &
|
||||
section_layer_material_name, section_layer_material, &
|
||||
elem_mat, fint
|
||||
use fem_database_surface, only: db_contact_facet_match, &
|
||||
db_contact_facet_normal_sign, &
|
||||
db_contact_facet_has_side
|
||||
use fem_inp_helpers, only: parse_nlc_header
|
||||
use fem_inp_nlc, only: parse_nlc_header
|
||||
use fem_element_internal, only: element_compute_internal_force
|
||||
use fem_sparse_csr_diagnostics, only: CSR_CLASS_GENERAL, &
|
||||
CSR_CLASS_SPD_CAND
|
||||
implicit none
|
||||
@@ -35,10 +40,13 @@ program test_implicit_inp
|
||||
call check_shell_static_patch('tests/data/s3_static_patch.inp', 2, 160)
|
||||
call check_shell_static_patch('tests/data/s6_static_patch.inp', 2, 190)
|
||||
call check_shell_static_patch('tests/data/s8_static_patch.inp', 2, 220)
|
||||
call check_s4_comp_section_inp()
|
||||
call check_static_nonlinear_elastic()
|
||||
call check_static_nonlinear_j2_disp()
|
||||
call check_nlc_inp()
|
||||
call check_arc_disp_continuation_api()
|
||||
call check_s4_curved_nonlinear_path()
|
||||
call check_sph_zero_int()
|
||||
call check_implicit_newmark_inp()
|
||||
call check_contact_pair_inp()
|
||||
|
||||
@@ -215,6 +223,34 @@ contains
|
||||
if (ierr .ne. 0) call fail(54)
|
||||
end subroutine check_static_linear_inp
|
||||
|
||||
subroutine check_s4_comp_section_inp()
|
||||
integer :: ierr
|
||||
|
||||
call fem_initialize(ierr)
|
||||
if (ierr .ne. 0) call fail(2301)
|
||||
|
||||
call fem_read_inp('tests/data/s4_composite_section.inp', ierr)
|
||||
if (ierr .ne. 0) call fail(2302)
|
||||
if (n_section_layer .ne. 2) call fail(2303)
|
||||
if (trim(section_type(1)) .ne. 'SHELL_COMPOSITE') call fail(2304)
|
||||
if (section_layer_start(1) .ne. 1) call fail(2305)
|
||||
if (section_layer_count(1) .ne. 2) call fail(2306)
|
||||
call check_close(section_thickness(1), 0.2_rk, 2307)
|
||||
call check_close(section_layer_thickness(1), 0.1_rk, 2308)
|
||||
call check_close(section_layer_thickness(2), 0.1_rk, 2309)
|
||||
if (trim(section_layer_material_name(1)) .ne. 'LOW') call fail(2310)
|
||||
if (trim(section_layer_material_name(2)) .ne. 'HIGH') call fail(2311)
|
||||
if (elem_mat(1) .ne. 1) call fail(2312)
|
||||
|
||||
call fem_build_model(ierr)
|
||||
if (ierr .ne. 0) call fail(2313)
|
||||
if (section_layer_material(1) .ne. 1) call fail(2314)
|
||||
if (section_layer_material(2) .ne. 2) call fail(2315)
|
||||
|
||||
call fem_finalize(ierr)
|
||||
if (ierr .ne. 0) call fail(2316)
|
||||
end subroutine check_s4_comp_section_inp
|
||||
|
||||
subroutine check_static_nonlinear_elastic()
|
||||
integer :: ierr
|
||||
integer :: iter
|
||||
@@ -433,9 +469,15 @@ contains
|
||||
end subroutine check_implicit_newmark_inp
|
||||
|
||||
subroutine check_nlc_inp()
|
||||
call check_nlc_file_defaults()
|
||||
call check_nlc_method_ids()
|
||||
call check_nlc_method_symbols()
|
||||
call check_nlc_valid_options()
|
||||
call check_nlc_error_rollbacks()
|
||||
end subroutine check_nlc_inp
|
||||
|
||||
subroutine check_nlc_file_defaults()
|
||||
integer :: ierr
|
||||
integer :: method
|
||||
character(len=256) :: header
|
||||
|
||||
call fem_initialize(ierr)
|
||||
if (ierr .ne. 0) call fail(1100)
|
||||
@@ -455,6 +497,12 @@ contains
|
||||
NLC_ADAPT_NEWTON) call fail(1112)
|
||||
call fem_finalize(ierr)
|
||||
if (ierr .ne. 0) call fail(1113)
|
||||
end subroutine check_nlc_file_defaults
|
||||
|
||||
subroutine check_nlc_method_ids()
|
||||
integer :: ierr
|
||||
integer :: method
|
||||
character(len=256) :: header
|
||||
|
||||
do method = NLC_TWO_STAGE, NLC_MC_SUBSTEP
|
||||
call control_set_defaults()
|
||||
@@ -463,7 +511,9 @@ contains
|
||||
if (ierr .ne. 0) call fail(1120 + method)
|
||||
if (nonlinear_continuation_method .ne. method) call fail(1130 + method)
|
||||
end do
|
||||
end subroutine check_nlc_method_ids
|
||||
|
||||
subroutine check_nlc_method_symbols()
|
||||
call check_nlc_symbol('TWO_STAGE_LOAD_STRENGTH', &
|
||||
NLC_TWO_STAGE, 1140)
|
||||
call check_nlc_symbol('ADAPTIVE_TARGET_NEWTON', &
|
||||
@@ -474,6 +524,10 @@ contains
|
||||
NLC_ARC_DISP, 1170)
|
||||
call check_nlc_symbol('MC_SUBSTEPPING_SEMISMOOTH', &
|
||||
NLC_MC_SUBSTEP, 1180)
|
||||
end subroutine check_nlc_method_symbols
|
||||
|
||||
subroutine check_nlc_valid_options()
|
||||
integer :: ierr
|
||||
|
||||
call control_set_defaults()
|
||||
call parse_nlc_header( &
|
||||
@@ -519,16 +573,22 @@ contains
|
||||
call control_set_defaults()
|
||||
call parse_nlc_header( &
|
||||
'*NONLINEAR CONTINUATION, METHOD=ARC_LENGTH_OR_DISPLACEMENT_CONTROL,'// &
|
||||
' SHELL_GEOMETRIC=YES', ierr)
|
||||
' ARC_LENGTH=0.35, ARC_LOAD_SCALE=2.5, SHELL_GEOMETRIC=YES', ierr)
|
||||
if (ierr .ne. 0) call fail(1260)
|
||||
if (nonlinear_continuation_method .ne. NLC_ARC_DISP) call fail(1261)
|
||||
if (.not. shell_geometric_nonlinear) call fail(1262)
|
||||
call check_close(nlc_arc_length_radius, 0.35_rk, 1267)
|
||||
call check_close(nlc_arc_load_scale, 2.5_rk, 1268)
|
||||
|
||||
call parse_nlc_header( &
|
||||
'*NONLINEAR CONTINUATION, METHOD=ARC_LENGTH_OR_DISPLACEMENT_CONTROL,'// &
|
||||
' COROTATIONAL_SHELL=NO', ierr)
|
||||
if (ierr .ne. 0) call fail(1263)
|
||||
if (shell_geometric_nonlinear) call fail(1264)
|
||||
end subroutine check_nlc_valid_options
|
||||
|
||||
subroutine check_nlc_error_rollbacks()
|
||||
integer :: ierr
|
||||
|
||||
shell_geometric_nonlinear = .true.
|
||||
call parse_nlc_header( &
|
||||
@@ -601,7 +661,7 @@ contains
|
||||
if (ierr .eq. 0) call fail(1236)
|
||||
if (nlc_mc_min_substeps .ne. 4) call fail(1237)
|
||||
if (nlc_mc_max_substeps .ne. 16) call fail(1238)
|
||||
end subroutine check_nlc_inp
|
||||
end subroutine check_nlc_error_rollbacks
|
||||
|
||||
subroutine check_nlc_symbol(symbol, expected, code_base)
|
||||
character(len=*), intent(in) :: symbol
|
||||
@@ -703,6 +763,122 @@ contains
|
||||
if (ierr .ne. 0) call fail(1255)
|
||||
end subroutine check_arc_disp_continuation_api
|
||||
|
||||
subroutine check_s4_curved_nonlinear_path()
|
||||
integer :: ierr
|
||||
integer :: iter
|
||||
integer :: path_count
|
||||
integer :: row
|
||||
integer :: row_step
|
||||
integer :: control_dof_count
|
||||
integer :: row_iteration
|
||||
integer :: status_code
|
||||
integer :: failure_code
|
||||
real(rk) :: res_norm
|
||||
real(rk) :: rel_norm
|
||||
real(rk) :: contact_gap
|
||||
real(rk) :: combined_norm
|
||||
real(rk) :: row_time
|
||||
real(rk) :: control_parameter
|
||||
real(rk) :: prescribed_l2
|
||||
real(rk) :: prescribed_max
|
||||
real(rk) :: actual_l2
|
||||
real(rk) :: actual_max
|
||||
real(rk) :: residual_linf
|
||||
real(rk) :: residual_l2
|
||||
real(rk) :: reaction_sum
|
||||
real(rk) :: reaction_generalized
|
||||
real(rk) :: work
|
||||
real(rk) :: residual_norm
|
||||
real(rk) :: relative_residual
|
||||
real(rk) :: correction_norm
|
||||
real(rk) :: first_secant
|
||||
real(rk) :: last_secant
|
||||
real(rk) :: max_secant
|
||||
real(rk) :: secant
|
||||
|
||||
call fem_initialize(ierr)
|
||||
if (ierr .ne. 0) call fail(2400)
|
||||
|
||||
call fem_read_inp('tests/data/s4_curved_nonlinear_patch.inp', ierr)
|
||||
if (ierr .ne. 0) call fail(2401)
|
||||
if (nonlinear_continuation_method .ne. NLC_ARC_DISP) call fail(2402)
|
||||
if (.not. shell_geometric_nonlinear) call fail(2403)
|
||||
|
||||
call fem_build_model(ierr)
|
||||
if (ierr .ne. 0) call fail(2404)
|
||||
|
||||
call fem_solve_static_nonlinear(20, 120, 1.0e-8_rk, iter, res_norm, ierr)
|
||||
if (ierr .ne. 0) call fail(2405)
|
||||
if (iter .le. 20) call fail(2406)
|
||||
call fem_get_convergence_metrics(rel_norm, contact_gap, combined_norm, ierr)
|
||||
if (ierr .ne. 0) call fail(2407)
|
||||
if (rel_norm .gt. 1.0e-8_rk) call fail(2424)
|
||||
|
||||
call fem_get_continuation_path_count(path_count, ierr)
|
||||
if (ierr .ne. 0) call fail(2408)
|
||||
if (path_count .ne. 20) call fail(2409)
|
||||
|
||||
first_secant = ZERO
|
||||
last_secant = ZERO
|
||||
max_secant = ZERO
|
||||
do row = 1, path_count
|
||||
call fem_get_continuation_path_row(row, row_step, row_time, &
|
||||
control_parameter, control_dof_count, prescribed_l2, prescribed_max, &
|
||||
actual_l2, actual_max, residual_linf, residual_l2, reaction_sum, &
|
||||
reaction_generalized, work, row_iteration, residual_norm, &
|
||||
relative_residual, correction_norm, status_code, failure_code, ierr)
|
||||
if (ierr .ne. 0) call fail(2410)
|
||||
if (row_step .ne. row) call fail(2411)
|
||||
if (control_dof_count .ne. 1) call fail(2412)
|
||||
if (residual_linf .gt. 1.0e-10_rk) call fail(2413)
|
||||
if (residual_l2 .gt. 1.0e-10_rk) call fail(2414)
|
||||
if (reaction_sum .ge. ZERO) call fail(2415)
|
||||
if (row_iteration .le. 0) call fail(2416)
|
||||
if (status_code .ne. CONVERGENCE_STATUS_CONVERGED) call fail(2417)
|
||||
if (failure_code .ne. CONV_FAIL_NONE) call fail(2418)
|
||||
if (relative_residual .gt. 1.0e-8_rk) call fail(2425)
|
||||
if (abs(actual_l2 - prescribed_l2) .gt. &
|
||||
1.0e-10_rk * max(ONE, prescribed_l2)) call fail(2419)
|
||||
if (prescribed_l2 .gt. TOL) then
|
||||
secant = abs(reaction_generalized) / prescribed_l2
|
||||
if (row .eq. 1) first_secant = secant
|
||||
last_secant = secant
|
||||
max_secant = max(max_secant, secant)
|
||||
end if
|
||||
end do
|
||||
|
||||
call check_close(prescribed_l2, 1.5_rk, 2420)
|
||||
if (last_secant .le. 1.05_rk * first_secant) call fail(2421)
|
||||
if (max_secant .lt. last_secant) call fail(2422)
|
||||
|
||||
call fem_finalize(ierr)
|
||||
if (ierr .ne. 0) call fail(2423)
|
||||
end subroutine check_s4_curved_nonlinear_path
|
||||
|
||||
subroutine check_sph_zero_int()
|
||||
integer :: ierr
|
||||
real(rk) :: max_force
|
||||
|
||||
call fem_initialize(ierr)
|
||||
if (ierr .ne. 0) call fail(1400)
|
||||
call fem_read_inp('examples/spherical_cap_with_central_point_load/'// &
|
||||
'spherical_cap_displacement_control_shell4.inp', ierr)
|
||||
if (ierr .ne. 0) call fail(1401)
|
||||
call fem_build_model(ierr)
|
||||
if (ierr .ne. 0) call fail(1402)
|
||||
|
||||
call element_compute_internal_force(ierr)
|
||||
if (ierr .ne. FEM_SUCCESS) call fail(1403)
|
||||
max_force = maxval(abs(fint))
|
||||
if (max_force .gt. 1.0e-7_rk) then
|
||||
write(*,'(A,ES16.8)') 'spherical zero internal max force=', max_force
|
||||
call fail(1404)
|
||||
end if
|
||||
|
||||
call fem_finalize(ierr)
|
||||
if (ierr .ne. 0) call fail(1405)
|
||||
end subroutine check_sph_zero_int
|
||||
|
||||
subroutine check_contact_pair_inp()
|
||||
integer :: ierr
|
||||
|
||||
|
||||
Reference in New Issue
Block a user