submodules allow inter-module communication
This commit is contained in:
parent
7d6a57dc17
commit
ab1f0dc16b
|
@ -6,6 +6,7 @@
|
|||
module constitutive
|
||||
use prec
|
||||
use math
|
||||
use rotations
|
||||
use debug
|
||||
use numerics
|
||||
use IO
|
||||
|
@ -14,7 +15,6 @@ module constitutive
|
|||
use results
|
||||
use lattice
|
||||
use discretization
|
||||
use plastic_nonlocal
|
||||
use geometry_plastic_nonlocal
|
||||
use source_thermal_dissipation
|
||||
use source_thermal_externalheat
|
||||
|
@ -54,6 +54,9 @@ module constitutive
|
|||
module subroutine plastic_disloUCLA_init
|
||||
end subroutine plastic_disloUCLA_init
|
||||
|
||||
module subroutine plastic_nonlocal_init
|
||||
end subroutine plastic_nonlocal_init
|
||||
|
||||
|
||||
module subroutine plastic_isotropic_LpAndItsTangent(Lp,dLp_dMp,Mp,instance,of)
|
||||
real(pReal), dimension(3,3), intent(out) :: &
|
||||
|
@ -124,6 +127,23 @@ module constitutive
|
|||
of
|
||||
end subroutine plastic_disloUCLA_LpAndItsTangent
|
||||
|
||||
module subroutine plastic_nonlocal_LpAndItsTangent(Lp, dLp_dMp, &
|
||||
Mp, Temperature, volume, ip, el)
|
||||
real(pReal), dimension(3,3), intent(out) :: &
|
||||
Lp !< plastic velocity gradient
|
||||
real(pReal), dimension(3,3,3,3), intent(out) :: &
|
||||
dLp_dMp !< derivative of Lp with respect to the Mandel stress
|
||||
|
||||
real(pReal), dimension(3,3), intent(in) :: &
|
||||
Mp !< Mandel stress
|
||||
real(pReal), intent(in) :: &
|
||||
Temperature, &
|
||||
volume
|
||||
integer, intent(in) :: &
|
||||
ip, & !< current integration point
|
||||
el !< current element number
|
||||
end subroutine plastic_nonlocal_LpAndItsTangent
|
||||
|
||||
|
||||
module subroutine plastic_isotropic_LiAndItsTangent(Li,dLi_dMi,Mi,instance,of)
|
||||
real(pReal), dimension(3,3), intent(out) :: &
|
||||
|
@ -183,6 +203,21 @@ module constitutive
|
|||
of
|
||||
end subroutine plastic_disloUCLA_dotState
|
||||
|
||||
module subroutine plastic_nonlocal_dotState(Mp, Fe, Fp, Temperature, &
|
||||
timestep,ip,el)
|
||||
integer, intent(in) :: &
|
||||
ip, & !< current integration point
|
||||
el !< current element number
|
||||
real(pReal), intent(in) :: &
|
||||
Temperature, & !< temperature
|
||||
timestep !< substepped crystallite time increment
|
||||
real(pReal), dimension(3,3), intent(in) ::&
|
||||
Mp !< MandelStress
|
||||
real(pReal), dimension(3,3,homogenization_maxNgrains,discretization_nIP,discretization_nElem), intent(in) :: &
|
||||
Fe, & !< elastic deformation gradient
|
||||
Fp !< plastic deformation gradient
|
||||
end subroutine plastic_nonlocal_dotState
|
||||
|
||||
|
||||
module subroutine plastic_dislotwin_dependentState(T,instance,of)
|
||||
integer, intent(in) :: &
|
||||
|
@ -198,6 +233,15 @@ module constitutive
|
|||
of
|
||||
end subroutine plastic_disloUCLA_dependentState
|
||||
|
||||
module subroutine plastic_nonlocal_dependentState(Fe, Fp, ip, el)
|
||||
integer, intent(in) :: &
|
||||
ip, &
|
||||
el
|
||||
real(pReal), dimension(3,3), intent(in) :: &
|
||||
Fe, &
|
||||
Fp
|
||||
end subroutine plastic_nonlocal_dependentState
|
||||
|
||||
|
||||
module subroutine plastic_kinehardening_deltaState(Mp,instance,of)
|
||||
real(pReal), dimension(3,3), intent(in) :: &
|
||||
|
@ -207,6 +251,14 @@ module constitutive
|
|||
of
|
||||
end subroutine plastic_kinehardening_deltaState
|
||||
|
||||
module subroutine plastic_nonlocal_deltaState(Mp,ip,el)
|
||||
integer, intent(in) :: &
|
||||
ip, &
|
||||
el
|
||||
real(pReal), dimension(3,3), intent(in) :: &
|
||||
Mp
|
||||
end subroutine plastic_nonlocal_deltaState
|
||||
|
||||
|
||||
module function plastic_dislotwin_homogenizedC(ipc,ip,el) result(homogenizedC)
|
||||
real(pReal), dimension(6,6) :: &
|
||||
|
@ -217,6 +269,14 @@ module constitutive
|
|||
el !< element
|
||||
end function plastic_dislotwin_homogenizedC
|
||||
|
||||
module subroutine plastic_nonlocal_updateCompatibility(orientation,i,e)
|
||||
integer, intent(in) :: &
|
||||
i, &
|
||||
e
|
||||
type(rotation), dimension(1,discretization_nIP,discretization_nElem), intent(in) :: &
|
||||
orientation !< crystal orientation
|
||||
end subroutine plastic_nonlocal_updateCompatibility
|
||||
|
||||
|
||||
module subroutine plastic_isotropic_results(instance,group)
|
||||
integer, intent(in) :: instance
|
||||
|
@ -243,9 +303,15 @@ module constitutive
|
|||
character(len=*), intent(in) :: group
|
||||
end subroutine plastic_disloUCLA_results
|
||||
|
||||
module subroutine plastic_nonlocal_results(instance,group)
|
||||
integer, intent(in) :: instance
|
||||
character(len=*), intent(in) :: group
|
||||
end subroutine plastic_nonlocal_results
|
||||
|
||||
end interface
|
||||
|
||||
public :: &
|
||||
plastic_nonlocal_updateCompatibility, &
|
||||
constitutive_init, &
|
||||
constitutive_homogenizedC, &
|
||||
constitutive_microstructure, &
|
||||
|
@ -447,7 +513,6 @@ end subroutine constitutive_microstructure
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine constitutive_LpAndItsTangents(Lp, dLp_dS, dLp_dFi, &
|
||||
S, Fi, ipc, ip, el)
|
||||
|
||||
integer, intent(in) :: &
|
||||
ipc, & !< component-ID of integration point
|
||||
ip, & !< integration point
|
||||
|
|
|
@ -4,17 +4,8 @@
|
|||
!> @author Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH
|
||||
!> @brief material subroutine for plasticity including dislocation flux
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
module plastic_nonlocal
|
||||
use prec
|
||||
use IO
|
||||
use math
|
||||
use debug
|
||||
use material
|
||||
use lattice
|
||||
submodule(constitutive) plastic_nonlocal
|
||||
use rotations
|
||||
use config
|
||||
use lattice
|
||||
use discretization
|
||||
use geometry_plastic_nonlocal, only: &
|
||||
nIPneighbors => geometry_plastic_nonlocal_nIPneighbors, &
|
||||
IPneighborhood => geometry_plastic_nonlocal_IPneighborhood, &
|
||||
|
@ -22,8 +13,7 @@ module plastic_nonlocal
|
|||
IParea => geometry_plastic_nonlocal_IParea0, &
|
||||
IPareaNormal => geometry_plastic_nonlocal_IPareaNormal0
|
||||
|
||||
implicit none
|
||||
private
|
||||
|
||||
real(pReal), parameter :: &
|
||||
KB = 1.38e-23_pReal !< Physical parameter, Boltzmann constant in J/Kelvin
|
||||
|
||||
|
@ -205,17 +195,6 @@ module plastic_nonlocal
|
|||
integer(kind(undefined_ID)), dimension(:,:), allocatable :: &
|
||||
plastic_nonlocal_outputID !< ID of each post result output
|
||||
|
||||
public :: &
|
||||
plastic_nonlocal_init, &
|
||||
plastic_nonlocal_dependentState, &
|
||||
plastic_nonlocal_LpAndItsTangent, &
|
||||
plastic_nonlocal_dotState, &
|
||||
plastic_nonlocal_deltaState, &
|
||||
plastic_nonlocal_updateCompatibility, &
|
||||
plastic_nonlocal_results
|
||||
|
||||
private :: &
|
||||
plastic_nonlocal_kinetics
|
||||
|
||||
contains
|
||||
|
||||
|
@ -223,7 +202,7 @@ contains
|
|||
!> @brief module initialization
|
||||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine plastic_nonlocal_init
|
||||
module subroutine plastic_nonlocal_init
|
||||
|
||||
character(len=65536), dimension(0), parameter :: emptyStringArray = [character(len=65536)::]
|
||||
integer, dimension(0), parameter :: emptyIntArray = [integer::]
|
||||
|
@ -752,7 +731,7 @@ end subroutine plastic_nonlocal_init
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief calculates quantities characterizing the microstructure
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine plastic_nonlocal_dependentState(Fe, Fp, ip, el)
|
||||
module subroutine plastic_nonlocal_dependentState(Fe, Fp, ip, el)
|
||||
|
||||
integer, intent(in) :: &
|
||||
ip, &
|
||||
|
@ -1114,7 +1093,7 @@ end subroutine plastic_nonlocal_kinetics
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief calculates plastic velocity gradient and its tangent
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine plastic_nonlocal_LpAndItsTangent(Lp, dLp_dMp, &
|
||||
module subroutine plastic_nonlocal_LpAndItsTangent(Lp, dLp_dMp, &
|
||||
Mp, Temperature, volume, ip, el)
|
||||
|
||||
integer, intent(in) :: &
|
||||
|
@ -1244,7 +1223,7 @@ end subroutine plastic_nonlocal_LpAndItsTangent
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief (instantaneous) incremental change of microstructure
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine plastic_nonlocal_deltaState(Mp,ip,el)
|
||||
module subroutine plastic_nonlocal_deltaState(Mp,ip,el)
|
||||
|
||||
integer, intent(in) :: &
|
||||
ip, &
|
||||
|
@ -1360,7 +1339,7 @@ end subroutine plastic_nonlocal_deltaState
|
|||
!---------------------------------------------------------------------------------------------------
|
||||
!> @brief calculates the rate of change of microstructure
|
||||
!---------------------------------------------------------------------------------------------------
|
||||
subroutine plastic_nonlocal_dotState(Mp, Fe, Fp, Temperature, &
|
||||
module subroutine plastic_nonlocal_dotState(Mp, Fe, Fp, Temperature, &
|
||||
timestep,ip,el)
|
||||
|
||||
integer, intent(in) :: &
|
||||
|
@ -1809,13 +1788,13 @@ end subroutine plastic_nonlocal_dotState
|
|||
! plane normals and signed cosine of the angle between the slip directions. Only the largest values
|
||||
! that sum up to a total of 1 are considered, all others are set to zero.
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine plastic_nonlocal_updateCompatibility(orientation,i,e)
|
||||
module subroutine plastic_nonlocal_updateCompatibility(orientation,i,e)
|
||||
|
||||
integer, intent(in) :: &
|
||||
i, &
|
||||
e
|
||||
type(rotation), dimension(1,discretization_nIP,discretization_nElem), intent(in) :: &
|
||||
orientation ! crystal orientation in quaternions
|
||||
orientation ! crystal orientation
|
||||
|
||||
integer :: &
|
||||
Nneighbors, & ! number of neighbors
|
||||
|
@ -1974,13 +1953,13 @@ end function getRho
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief writes results to HDF5 output file
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine plastic_nonlocal_results(instance,group)
|
||||
module subroutine plastic_nonlocal_results(instance,group)
|
||||
#if defined(PETSc) || defined(DAMASK_HDF5)
|
||||
use results, only: &
|
||||
results_writeDataset
|
||||
|
||||
integer, intent(in) :: instance
|
||||
character(len=*) :: group
|
||||
character(len=*),intent(in) :: group
|
||||
integer :: o
|
||||
|
||||
associate(prm => param(instance),dst => microstructure(instance),stt=>state(instance))
|
||||
|
@ -2047,4 +2026,4 @@ subroutine plastic_nonlocal_results(instance,group)
|
|||
|
||||
end subroutine plastic_nonlocal_results
|
||||
|
||||
end module plastic_nonlocal
|
||||
end submodule plastic_nonlocal
|
|
@ -21,7 +21,6 @@ module crystallite
|
|||
use constitutive
|
||||
use discretization
|
||||
use lattice
|
||||
use plastic_nonlocal
|
||||
use results
|
||||
|
||||
implicit none
|
||||
|
|
|
@ -483,7 +483,8 @@ module lattice
|
|||
lattice_slip_normal, &
|
||||
lattice_slip_direction, &
|
||||
lattice_slip_transverse, &
|
||||
lattice_labels_slip
|
||||
lattice_labels_slip, &
|
||||
lattice_labels_twin
|
||||
|
||||
contains
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue