Advance V5 core capabilities and planning

This commit is contained in:
shenw
2026-06-26 00:48:57 +08:00
parent 38623b518a
commit 26639d8dc2
139 changed files with 41386 additions and 1328 deletions
+1
View File
@@ -25,4 +25,5 @@ module fem_inp_defs
integer, parameter :: MODE_SURFACE = 20
integer, parameter :: MODE_CONTACT_PAIR = 21
integer, parameter :: MODE_CONTACT_FRICTION = 22
integer, parameter :: MODE_MOHR_COULOMB = 23
end module fem_inp_defs
+106
View File
@@ -460,6 +460,112 @@ subroutine start_nset(set_index, item_pos, set_name_value)
ierr = FEM_SUCCESS
end subroutine parse_jc_plastic_line
subroutine parse_mc_line(line, material_index, ierr)
character(len=*), intent(in) :: line
integer, intent(in) :: material_index
integer, intent(out) :: ierr
character(len=LINE_LEN) :: token
real(rk) :: pi
real(rk) :: angle_scale
integer :: ios
if (material_index .le. 0) then
call error_set(FEM_ERR_INPUT, 'Mohr-Coulomb data appears before *MATERIAL', ierr)
return
end if
pi = acos(-ONE)
angle_scale = pi / 180.0_rk
call csv_token(line, 1, token)
read(token,*,iostat=ios) mat_mc_phi(material_index)
if (ios .ne. 0) then
call error_set(FEM_ERR_INPUT, 'failed to parse Mohr-Coulomb friction angle', ierr)
return
end if
mat_mc_phi(material_index) = mat_mc_phi(material_index) * angle_scale
call csv_token(line, 2, token)
read(token,*,iostat=ios) mat_mc_cohesion(material_index)
if (ios .ne. 0) then
call error_set(FEM_ERR_INPUT, 'failed to parse Mohr-Coulomb cohesion', ierr)
return
end if
call csv_token(line, 3, token)
if (len_trim(token) .gt. 0) then
read(token,*,iostat=ios) mat_mc_dilation(material_index)
if (ios .ne. 0) then
call error_set(FEM_ERR_INPUT, 'failed to parse Mohr-Coulomb dilation angle', ierr)
return
end if
mat_mc_dilation(material_index) = mat_mc_dilation(material_index) * angle_scale
else
mat_mc_dilation(material_index) = ZERO
end if
call csv_token(line, 4, token)
if (len_trim(token) .gt. 0) then
read(token,*,iostat=ios) mat_mc_tension(material_index)
if (ios .ne. 0) then
call error_set(FEM_ERR_INPUT, 'failed to parse Mohr-Coulomb tensile strength', ierr)
return
end if
else
mat_mc_tension(material_index) = ZERO
end if
call csv_token(line, 5, token)
if (len_trim(token) .gt. 0) then
read(token,*,iostat=ios) mat_mc_res_phi(material_index)
if (ios .ne. 0) then
call error_set(FEM_ERR_INPUT, 'failed to parse residual friction angle', ierr)
return
end if
mat_mc_res_phi(material_index) = mat_mc_res_phi(material_index) * angle_scale
else
mat_mc_res_phi(material_index) = ZERO
end if
call csv_token(line, 6, token)
if (len_trim(token) .gt. 0) then
read(token,*,iostat=ios) mat_mc_res_cohesion(material_index)
if (ios .ne. 0) then
call error_set(FEM_ERR_INPUT, 'failed to parse residual cohesion', ierr)
return
end if
else
mat_mc_res_cohesion(material_index) = ZERO
end if
call csv_token(line, 7, token)
if (len_trim(token) .gt. 0) then
read(token,*,iostat=ios) mat_mc_res_dilation(material_index)
if (ios .ne. 0) then
call error_set(FEM_ERR_INPUT, 'failed to parse residual dilation angle', ierr)
return
end if
mat_mc_res_dilation(material_index) = &
mat_mc_res_dilation(material_index) * angle_scale
else
mat_mc_res_dilation(material_index) = ZERO
end if
call csv_token(line, 8, token)
if (len_trim(token) .gt. 0) then
read(token,*,iostat=ios) mat_mc_reduction(material_index)
if (ios .ne. 0) then
call error_set(FEM_ERR_INPUT, 'failed to parse strength reduction factor', ierr)
return
end if
else
mat_mc_reduction(material_index) = ONE
end if
mat_yield0(material_index) = mat_mc_cohesion(material_index)
ierr = FEM_SUCCESS
end subroutine parse_mc_line
subroutine parse_rate_dependent_line(line, material_index, ierr)
character(len=*), intent(in) :: line
integer, intent(in) :: material_index
+22
View File
@@ -239,6 +239,10 @@ contains
else
mode = MODE_PLASTIC
end if
else if (starts_with(upper, '*MOHR COULOMB') .or. &
starts_with(upper, '*MOHR-COULOMB') .or. &
starts_with(upper, '*MOHR_COULOMB')) then
mode = MODE_MOHR_COULOMB
else if (starts_with(upper, '*DAMAGE INITIATION')) then
mode = MODE_DAMAGE_INIT
else if (starts_with(upper, '*RATE DEPENDENT')) then
@@ -533,6 +537,9 @@ contains
else if (mode .eq. MODE_JC_PLASTIC) then
call parse_jc_plastic_line(clean, current_material, ierr)
mode = MODE_NONE
else if (mode .eq. MODE_MOHR_COULOMB) then
call parse_mc_line(clean, current_material, ierr)
mode = MODE_NONE
else if (mode .eq. MODE_DAMAGE_INIT) then
call parse_damage_init_line(clean, current_material, ierr)
mode = MODE_NONE
@@ -745,6 +752,10 @@ contains
mode = MODE_ELASTIC
else if (starts_with(line, '*PLASTIC')) then
call fill_plastic_keyword(line, mode, current_material, ierr)
else if (starts_with(line, '*MOHR COULOMB') .or. &
starts_with(line, '*MOHR-COULOMB') .or. &
starts_with(line, '*MOHR_COULOMB')) then
call fill_mc_keyword(mode, current_material, ierr)
else if (starts_with(line, '*DAMAGE INITIATION')) then
call fill_damage_keyword(line, mode, current_material, ierr)
else if (starts_with(line, '*RATE DEPENDENT')) then
@@ -777,6 +788,17 @@ contains
end if
end subroutine fill_plastic_keyword
subroutine fill_mc_keyword(mode, current_material, ierr)
integer, intent(out) :: mode
integer, intent(in) :: current_material
integer, intent(out) :: ierr
call require_material_keyword(current_material, '*MOHR COULOMB', ierr)
if (ierr .ne. FEM_SUCCESS) return
mat_plastic_model(current_material) = 'MOHR_COULOMB'
mode = MODE_MOHR_COULOMB
end subroutine fill_mc_keyword
subroutine fill_damage_keyword(line, mode, current_material, ierr)
character(len=*), intent(in) :: line
integer, intent(out) :: mode