Add Shell local frame and rotation kinematics

This commit is contained in:
Codex
2026-07-03 21:17:45 +08:00
parent db995ab978
commit 4619fdf4ac
7 changed files with 710 additions and 35 deletions
+36
View File
@@ -28,6 +28,7 @@ module sph_input_reader
sph_shell_set_johnson_cook, sph_shell_set_failure, &
sph_shell_set_control, sph_shell_build_state, &
sph_shell_add_orientation, sph_shell_set_director_for_set, &
sph_shell_set_rotation_for_set, &
sph_shell_count_unbound_materials, sph_shell_count_unused_orientations
use sph_solid_dynamics, only: sph_solid_set_body_force, &
sph_solid_build_reference_state, sph_solid_update_diagnostics
@@ -355,6 +356,8 @@ contains
call sph_input_parse_ignition(line, ierr)
else if (index(upper_line, 'SHELL DIRECTOR') > 0) then
call sph_input_parse_shell_director(line, ierr)
else if (index(upper_line, 'SHELL ROTATION') > 0) then
call sph_input_parse_shell_rotation(line, ierr)
else if (index(upper_line, 'SHELL CONTROL') > 0) then
call sph_input_parse_shell_control(line, ierr)
else if (index(upper_line, 'SOLID CONTROL') > 0) then
@@ -753,6 +756,39 @@ contains
call sph_shell_set_director_for_set(set_name, director, ierr)
end subroutine sph_input_parse_shell_director
subroutine sph_input_parse_shell_rotation(line, ierr)
character(len=*), intent(in) :: line
integer, intent(out) :: ierr
character(len=SPH_INPUT_FIELD_LEN) :: set_name
real(rk) :: omega_value(SPH_NDIM)
real(rk) :: alpha_value(SPH_NDIM)
ierr = SPH_SUCCESS
omega_value = 0.0_rk
alpha_value = 0.0_rk
call sph_input_get_option(line, 'SET', set_name)
if (len_trim(set_name) == 0) call sph_input_get_option(line, 'NSET', set_name)
if (len_trim(set_name) == 0) call sph_input_get_option(line, 'ELSET', set_name)
if (len_trim(set_name) == 0) then
call sph_input_set_error('Shell rotation is missing SET option')
ierr = SPH_ERROR_INPUT
return
end if
call sph_input_get_required_real(line, 'OX', omega_value(1), ierr)
if (ierr /= SPH_SUCCESS) return
call sph_input_get_required_real(line, 'OY', omega_value(2), ierr)
if (ierr /= SPH_SUCCESS) return
call sph_input_get_required_real(line, 'OZ', omega_value(3), ierr)
if (ierr /= SPH_SUCCESS) return
call sph_input_get_optional_real(line, 'AX', alpha_value(1), ierr)
if (ierr /= SPH_SUCCESS) return
call sph_input_get_optional_real(line, 'AY', alpha_value(2), ierr)
if (ierr /= SPH_SUCCESS) return
call sph_input_get_optional_real(line, 'AZ', alpha_value(3), ierr)
if (ierr /= SPH_SUCCESS) return
call sph_shell_set_rotation_for_set(set_name, omega_value, alpha_value, ierr)
end subroutine sph_input_parse_shell_rotation
subroutine sph_input_parse_orientation(line, ierr)
character(len=*), intent(in) :: line
integer, intent(out) :: ierr