new variables for damage
This commit is contained in:
parent
219529a402
commit
32bb0d8c6e
2
PRIVATE
2
PRIVATE
|
@ -1 +1 @@
|
|||
Subproject commit 9e8011876b16896a18902737790eba8018e94f85
|
||||
Subproject commit 5fd23c60c721aada27bcd3a4ba96301753b7bd0d
|
|
@ -52,4 +52,5 @@
|
|||
#include "homogenization_mech_isostrain.f90"
|
||||
#include "homogenization_mech_RGC.f90"
|
||||
#include "homogenization_thermal.f90"
|
||||
#include "homogenization_damage.f90"
|
||||
#include "CPFEM.f90"
|
||||
|
|
|
@ -188,6 +188,11 @@ module constitutive
|
|||
real(pReal), dimension(3,3) :: P
|
||||
end function constitutive_mech_getP
|
||||
|
||||
module function constitutive_damage_get_phi(co,ip,el) result(phi)
|
||||
integer, intent(in) :: co, ip, el
|
||||
real(pReal) :: phi
|
||||
end function constitutive_damage_get_phi
|
||||
|
||||
module function thermal_T(ph,me) result(T)
|
||||
integer, intent(in) :: ph,me
|
||||
real(pReal) :: T
|
||||
|
@ -204,6 +209,11 @@ module constitutive
|
|||
integer, intent(in) :: co, ce
|
||||
end subroutine constitutive_thermal_setT
|
||||
|
||||
module subroutine constitutive_damage_set_phi(phi,co,ce)
|
||||
real(pReal), intent(in) :: phi
|
||||
integer, intent(in) :: co, ce
|
||||
end subroutine constitutive_damage_set_phi
|
||||
|
||||
! == cleaned:end ===================================================================================
|
||||
|
||||
module function thermal_stress(Delta_t,ph,me) result(converged_)
|
||||
|
@ -353,6 +363,8 @@ module constitutive
|
|||
constitutive_restartRead, &
|
||||
integrateDamageState, &
|
||||
constitutive_thermal_setT, &
|
||||
constitutive_damage_set_phi, &
|
||||
constitutive_damage_get_phi, &
|
||||
constitutive_mech_getP, &
|
||||
constitutive_mech_setF, &
|
||||
constitutive_mech_getF, &
|
||||
|
|
|
@ -10,9 +10,16 @@ submodule(constitutive) constitutive_damage
|
|||
DAMAGE_ANISODUCTILE_ID
|
||||
end enum
|
||||
|
||||
|
||||
type :: tDataContainer
|
||||
real(pReal), dimension(:), allocatable :: phi, d_phi_d_dot_phi
|
||||
end type tDataContainer
|
||||
|
||||
integer(kind(DAMAGE_UNDEFINED_ID)), dimension(:,:), allocatable :: &
|
||||
phase_source !< active sources mechanisms of each phase
|
||||
|
||||
type(tDataContainer), dimension(:), allocatable :: current
|
||||
|
||||
interface
|
||||
|
||||
module function source_damage_anisoBrittle_init(source_length) result(mySources)
|
||||
|
@ -152,7 +159,8 @@ contains
|
|||
module subroutine damage_init
|
||||
|
||||
integer :: &
|
||||
ph !< counter in phase loop
|
||||
ph, & !< counter in phase loop
|
||||
Nconstituents
|
||||
class(tNode), pointer :: &
|
||||
phases, &
|
||||
phase, &
|
||||
|
@ -161,10 +169,18 @@ module subroutine damage_init
|
|||
|
||||
phases => config_material%get('phase')
|
||||
|
||||
allocate(current(phases%length))
|
||||
|
||||
allocate(damageState (phases%length))
|
||||
allocate(phase_Nsources(phases%length),source = 0) ! same for kinematics
|
||||
|
||||
do ph = 1,phases%length
|
||||
|
||||
Nconstituents = count(material_phaseAt == ph) * discretization_nIPs
|
||||
|
||||
allocate(current(ph)%phi(Nconstituents),source=1.0_pReal)
|
||||
allocate(current(ph)%d_phi_d_dot_phi(Nconstituents),source=0.0_pReal)
|
||||
|
||||
phase => phases%get(ph)
|
||||
sources => phase%get('source',defaultVal=emptyList)
|
||||
phase_Nsources(ph) = sources%length
|
||||
|
@ -511,4 +527,28 @@ function source_active(source_label,src_length) result(active_source)
|
|||
end function source_active
|
||||
|
||||
|
||||
!----------------------------------------------------------------------------------------------
|
||||
!< @brief Set damage parameter
|
||||
!----------------------------------------------------------------------------------------------
|
||||
module subroutine constitutive_damage_set_phi(phi,co,ce)
|
||||
|
||||
real(pReal), intent(in) :: phi
|
||||
integer, intent(in) :: ce, co
|
||||
|
||||
|
||||
current(material_phaseAt2(co,ce))%phi(material_phaseMemberAt2(co,ce)) = phi
|
||||
|
||||
end subroutine constitutive_damage_set_phi
|
||||
|
||||
|
||||
module function constitutive_damage_get_phi(co,ip,el) result(phi)
|
||||
|
||||
integer, intent(in) :: co, ip, el
|
||||
real(pReal) :: phi
|
||||
|
||||
phi = current(material_phaseAt(co,el))%phi(material_phaseMemberAt(co,ip,el))
|
||||
|
||||
end function constitutive_damage_get_phi
|
||||
|
||||
|
||||
end submodule constitutive_damage
|
||||
|
|
|
@ -17,6 +17,7 @@ module grid_damage_spectral
|
|||
use discretization_grid
|
||||
use damage_nonlocal
|
||||
use YAML_types
|
||||
use homogenization
|
||||
use config
|
||||
|
||||
implicit none
|
||||
|
@ -197,6 +198,7 @@ function grid_damage_spectral_solution(timeinc) result(solution)
|
|||
do k = 1, grid3; do j = 1, grid(2); do i = 1,grid(1)
|
||||
cell = cell + 1
|
||||
call damage_nonlocal_putNonLocalDamage(phi_current(i,j,k),1,cell)
|
||||
homogenization_phi(cell) = phi_current(i,j,k)
|
||||
enddo; enddo; enddo
|
||||
|
||||
call VecMin(solution_vec,devNull,phi_min,ierr); CHKERRQ(ierr)
|
||||
|
@ -234,6 +236,7 @@ subroutine grid_damage_spectral_forward(cutBack)
|
|||
do k = 1, grid3; do j = 1, grid(2); do i = 1,grid(1)
|
||||
cell = cell + 1
|
||||
call damage_nonlocal_putNonLocalDamage(phi_current(i,j,k),1,cell)
|
||||
homogenization_phi(cell) = phi_current(i,j,k)
|
||||
enddo; enddo; enddo
|
||||
else
|
||||
phi_lastInc = phi_current
|
||||
|
|
|
@ -64,6 +64,9 @@ module homogenization
|
|||
module subroutine thermal_init
|
||||
end subroutine thermal_init
|
||||
|
||||
module subroutine damage_init
|
||||
end subroutine damage_init
|
||||
|
||||
module subroutine mech_partition(subF,ip,el)
|
||||
real(pReal), intent(in), dimension(3,3) :: &
|
||||
subF
|
||||
|
@ -77,6 +80,11 @@ module homogenization
|
|||
integer, intent(in) :: ce
|
||||
end subroutine thermal_partition
|
||||
|
||||
module subroutine damage_partition(phi,ce)
|
||||
real(pReal), intent(in) :: phi
|
||||
integer, intent(in) :: ce
|
||||
end subroutine damage_partition
|
||||
|
||||
module subroutine thermal_homogenize(ip,el)
|
||||
integer, intent(in) :: ip,el
|
||||
end subroutine thermal_homogenize
|
||||
|
@ -120,7 +128,7 @@ contains
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief module initialization
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine homogenization_init
|
||||
subroutine homogenization_init()
|
||||
|
||||
class (tNode) , pointer :: &
|
||||
num_homog, &
|
||||
|
@ -144,6 +152,7 @@ subroutine homogenization_init
|
|||
|
||||
call mech_init(num_homog)
|
||||
call thermal_init()
|
||||
call damage_init()
|
||||
|
||||
if (any(thermal_type == THERMAL_isothermal_ID)) call thermal_isothermal_init(homogenization_T)
|
||||
if (any(thermal_type == THERMAL_conduction_ID)) call thermal_conduction_init(homogenization_T)
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @author Martin Diehl, KU Leuven
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
submodule(homogenization) homogenization_damage
|
||||
|
||||
|
||||
contains
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief Allocate variables and set parameters.
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
module subroutine damage_init()
|
||||
|
||||
|
||||
print'(/,a)', ' <<<+- homogenization_damage init -+>>>'
|
||||
|
||||
allocate(homogenization_phi(discretization_nIPs*discretization_Nelems))
|
||||
allocate(homogenization_dot_phi(discretization_nIPs*discretization_Nelems))
|
||||
|
||||
end subroutine damage_init
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief Partition temperature onto the individual constituents.
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
module subroutine damage_partition(phi,ce)
|
||||
|
||||
real(pReal), intent(in) :: phi
|
||||
integer, intent(in) :: ce
|
||||
|
||||
integer :: co
|
||||
|
||||
do co = 1, homogenization_Nconstituents(material_homogenizationAt2(ce))
|
||||
call constitutive_damage_set_phi(phi,co,ce)
|
||||
enddo
|
||||
|
||||
end subroutine damage_partition
|
||||
|
||||
|
||||
end submodule homogenization_damage
|
Loading…
Reference in New Issue