Add analytical rigid plane contact

This commit is contained in:
shenw
2026-06-24 19:26:51 +08:00
parent 10777d836c
commit 29d4280236
10 changed files with 703 additions and 91 deletions
+35 -1
View File
@@ -8,6 +8,7 @@ program test_implicit_inp
contact_pair_friction, n_surface, surface_name, &
surface_start, surface_count, surface_target, &
surface_face, surface_owner, surface_type, &
surface_plane_normal, surface_plane_offset, &
n_contact_property, contact_property_name, &
contact_property_penalty, contact_property_damping, &
contact_property_search, contact_property_friction, &
@@ -462,9 +463,41 @@ contains
call check_node_surface_inp()
call check_contact_property_inp()
call check_contact_analytical_inp()
call check_contact_pair_input_errors()
end subroutine check_contact_pair_inp
subroutine check_contact_analytical_inp()
integer :: ierr
integer :: node_count
call fem_initialize(ierr)
if (ierr .ne. 0) call fail(560)
call fem_read_inp('tests/data/s4_contact_analytical_plane.inp', ierr)
if (ierr .ne. 0) call fail(561)
if (n_surface .ne. 2) call fail(562)
if (trim(surface_type(1)) .ne. 'NODE') call fail(563)
if (trim(surface_type(2)) .ne. 'ANALYTICAL') call fail(564)
if (trim(surface_target(2)) .ne. 'PLANE') call fail(565)
call check_close(surface_plane_normal(1,2), ZERO, 566)
call check_close(surface_plane_normal(2,2), ZERO, 567)
call check_close(surface_plane_normal(3,2), ONE, 568)
call check_close(surface_plane_offset(2), ZERO, 569)
if (trim(contact_pair_slave(1)) .ne. 'SLAVE_NODES') call fail(570)
if (trim(contact_pair_master(1)) .ne. 'RIGID_PLANE') call fail(571)
call fem_get_surface_node_count('SLAVE_NODES', node_count, ierr)
if (ierr .ne. 0) call fail(572)
if (node_count .ne. 1) call fail(573)
call fem_build_model(ierr)
if (ierr .ne. 0) call fail(574)
call fem_finalize(ierr)
if (ierr .ne. 0) call fail(575)
end subroutine check_contact_analytical_inp
subroutine check_contact_property_inp()
integer :: ierr
@@ -497,7 +530,8 @@ contains
call check_contact_pair_inp_error('tests/data/s4_contact_pair_missing_master.inp', 404)
call check_contact_pair_inp_error('tests/data/s4_contact_pair_missing_penalty.inp', 407)
call check_contact_pair_build_error('tests/data/s4_contact_pair_surface_bad_face.inp', 415)
call check_contact_pair_inp_error('tests/data/s4_contact_pair_surface_bad_type.inp', 445)
call check_contact_pair_inp_error( &
'tests/data/s4_contact_pair_surface_bad_analytical_line.inp', 445)
call check_contact_pair_build_error('tests/data/s4_contact_pair_unknown_property.inp', 548)
end subroutine check_contact_pair_input_errors