changed comments to doxygen style
This commit is contained in:
parent
08c7be7d15
commit
cd0da03ebc
|
@ -16,49 +16,40 @@
|
||||||
! You should have received a copy of the GNU General Public License
|
! You should have received a copy of the GNU General Public License
|
||||||
! along with DAMASK. If not, see <http://www.gnu.org/licenses/>.
|
! along with DAMASK. If not, see <http://www.gnu.org/licenses/>.
|
||||||
!
|
!
|
||||||
!##############################################################
|
!--------------------------------------------------------------------------------------------------
|
||||||
!* $Id$
|
! $Id$
|
||||||
!***************************************
|
!--------------------------------------------------------------------------------------------------
|
||||||
!* Module: HOMOGENIZATION *
|
!> @author Franz Roters, Max-Planck-Institut für Eisenforschung GmbH
|
||||||
!***************************************
|
!> @author Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH
|
||||||
!* contains: *
|
!> @author Denny Tjahjanto, Max-Planck-Institut für Eisenforschung GmbH
|
||||||
!* - _init *
|
!> @brief homogenization manager, organizing deformation partitioning and stress homogenization
|
||||||
!* - materialpoint_stressAndItsTangent *
|
!--------------------------------------------------------------------------------------------------
|
||||||
!* - _partitionDeformation *
|
module homogenization
|
||||||
!* - _updateState *
|
|
||||||
!* - _averageStressAndItsTangent *
|
|
||||||
!* - _postResults *
|
|
||||||
!***************************************
|
|
||||||
|
|
||||||
MODULE homogenization
|
|
||||||
|
|
||||||
!*** Include other modules ***
|
|
||||||
use prec, only: pInt,pReal,p_vec
|
use prec, only: pInt,pReal,p_vec
|
||||||
use IO, only: IO_write_jobBinaryFile
|
use IO, only: IO_write_jobBinaryFile
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
! General variables for the homogenization at a material point
|
||||||
implicit none
|
implicit none
|
||||||
|
type(p_vec), dimension(:,:), allocatable :: homogenization_state0, & !< pointer array to homogenization state at start of FE increment
|
||||||
|
homogenization_subState0, & !< pointer array to homogenization state at start of homogenization increment
|
||||||
|
homogenization_state !< pointer array to current homogenization state (end of converged time step)
|
||||||
|
integer(pInt), dimension(:,:), allocatable :: homogenization_sizeState, & !< size of state array per grain
|
||||||
|
homogenization_sizePostResults !< size of postResults array per material point
|
||||||
|
|
||||||
! ****************************************************************
|
real(pReal), dimension(:,:,:,:,:,:), allocatable :: materialpoint_dPdF !< tangent of first P--K stress at IP
|
||||||
! *** General variables for the homogenization at a ***
|
real(pReal), dimension(:,:,:,:), allocatable :: materialpoint_F0, & !< def grad of IP at start of FE increment
|
||||||
! *** material point ***
|
materialpoint_F, & !< def grad of IP to be reached at end of FE increment
|
||||||
! ****************************************************************
|
materialpoint_subF0, & !< def grad of IP at beginning of homogenization increment
|
||||||
type(p_vec), dimension(:,:), allocatable :: homogenization_state0, & ! pointer array to homogenization state at start of FE increment
|
materialpoint_subF, & !< def grad of IP to be reached at end of homog inc
|
||||||
homogenization_subState0, & ! pointer array to homogenization state at start of homogenization increment
|
materialpoint_P !< first P--K stress of IP
|
||||||
homogenization_state ! pointer array to current homogenization state (end of converged time step)
|
real(pReal), dimension(:,:), allocatable :: materialpoint_Temperature, & !< temperature at IP
|
||||||
integer(pInt), dimension(:,:), allocatable :: homogenization_sizeState, & ! size of state array per grain
|
|
||||||
homogenization_sizePostResults ! size of postResults array per material point
|
|
||||||
|
|
||||||
real(pReal), dimension(:,:,:,:,:,:), allocatable :: materialpoint_dPdF ! tangent of first P--K stress at IP
|
|
||||||
real(pReal), dimension(:,:,:,:), allocatable :: materialpoint_F0, & ! def grad of IP at start of FE increment
|
|
||||||
materialpoint_F, & ! def grad of IP to be reached at end of FE increment
|
|
||||||
materialpoint_subF0, & ! def grad of IP at beginning of homogenization increment
|
|
||||||
materialpoint_subF, & ! def grad of IP to be reached at end of homog inc
|
|
||||||
materialpoint_P ! first P--K stress of IP
|
|
||||||
real(pReal), dimension(:,:), allocatable :: materialpoint_Temperature, & ! temperature at IP
|
|
||||||
materialpoint_subFrac, &
|
materialpoint_subFrac, &
|
||||||
materialpoint_subStep, &
|
materialpoint_subStep, &
|
||||||
materialpoint_subdt
|
materialpoint_subdt
|
||||||
|
|
||||||
real(pReal), dimension(:,:,:), allocatable :: materialpoint_results ! results array of material point
|
real(pReal), dimension(:,:,:), allocatable :: materialpoint_results !< results array of material point
|
||||||
|
|
||||||
logical, dimension(:,:), allocatable :: materialpoint_requested, &
|
logical, dimension(:,:), allocatable :: materialpoint_requested, &
|
||||||
materialpoint_converged
|
materialpoint_converged
|
||||||
|
@ -66,12 +57,23 @@ MODULE homogenization
|
||||||
integer(pInt) homogenization_maxSizeState, &
|
integer(pInt) homogenization_maxSizeState, &
|
||||||
homogenization_maxSizePostResults, &
|
homogenization_maxSizePostResults, &
|
||||||
materialpoint_sizeResults
|
materialpoint_sizeResults
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
! functions and subroutines in the module
|
||||||
|
public :: homogenization_init, &
|
||||||
|
materialpoint_stressAndItsTangent, &
|
||||||
|
materialpoint_postResults
|
||||||
|
private :: homogenization_partitionDeformation, &
|
||||||
|
homogenization_updateState, &
|
||||||
|
homogenization_averageStressAndItsTangent, &
|
||||||
|
homogenization_averageTemperature, &
|
||||||
|
homogenization_postResults
|
||||||
|
|
||||||
CONTAINS
|
contains
|
||||||
|
|
||||||
!**************************************
|
|
||||||
!* Module initialization *
|
!--------------------------------------------------------------------------------------------------
|
||||||
!**************************************
|
!> @brief module initialization
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine homogenization_init(Temperature)
|
subroutine homogenization_init(Temperature)
|
||||||
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
||||||
use math, only: math_I3
|
use math, only: math_I3
|
||||||
|
@ -85,7 +87,6 @@ use homogenization_isostrain
|
||||||
use homogenization_RGC
|
use homogenization_RGC
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
real(pReal) Temperature
|
real(pReal) Temperature
|
||||||
integer(pInt), parameter :: fileunit = 200
|
integer(pInt), parameter :: fileunit = 200
|
||||||
integer(pInt) e,i,p,myInstance
|
integer(pInt) e,i,p,myInstance
|
||||||
|
@ -93,9 +94,8 @@ integer(pInt), dimension(:,:), pointer :: thisSize
|
||||||
character(len=64), dimension(:,:), pointer :: thisOutput
|
character(len=64), dimension(:,:), pointer :: thisOutput
|
||||||
logical knownHomogenization
|
logical knownHomogenization
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
! --- PARSE HOMOGENIZATIONS FROM CONFIG FILE ---
|
! parse homogenization from config file
|
||||||
|
|
||||||
if (.not. IO_open_jobFile_stat(fileunit,material_localFileExt)) then ! no local material configuration present...
|
if (.not. IO_open_jobFile_stat(fileunit,material_localFileExt)) then ! no local material configuration present...
|
||||||
call IO_open_file(fileunit,material_configFile) ! ... open material.config file
|
call IO_open_file(fileunit,material_configFile) ! ... open material.config file
|
||||||
endif
|
endif
|
||||||
|
@ -103,9 +103,8 @@ call homogenization_isostrain_init(fileunit)
|
||||||
call homogenization_RGC_init(fileunit)
|
call homogenization_RGC_init(fileunit)
|
||||||
close(fileunit)
|
close(fileunit)
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
! --- WRITE DESCRIPTION FILE FOR HOMOGENIZATION OUTPUT ---
|
! write description file for homogenization output
|
||||||
|
|
||||||
call IO_write_jobFile(fileunit,'outputHomogenization')
|
call IO_write_jobFile(fileunit,'outputHomogenization')
|
||||||
do p = 1,material_Nhomogenization
|
do p = 1,material_Nhomogenization
|
||||||
i = homogenization_typeInstance(p) ! which instance of this homogenization type
|
i = homogenization_typeInstance(p) ! which instance of this homogenization type
|
||||||
|
@ -133,37 +132,49 @@ do p = 1,material_Nhomogenization
|
||||||
enddo
|
enddo
|
||||||
close(fileunit)
|
close(fileunit)
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
! --- ALLOCATE AND INITIALIZE GLOBAL VARIABLES ---
|
! allocate and initialize global variables
|
||||||
|
|
||||||
allocate(homogenization_state0(mesh_maxNips,mesh_NcpElems))
|
allocate(homogenization_state0(mesh_maxNips,mesh_NcpElems))
|
||||||
allocate(homogenization_subState0(mesh_maxNips,mesh_NcpElems))
|
allocate(homogenization_subState0(mesh_maxNips,mesh_NcpElems))
|
||||||
allocate(homogenization_state(mesh_maxNips,mesh_NcpElems))
|
allocate(homogenization_state(mesh_maxNips,mesh_NcpElems))
|
||||||
allocate(homogenization_sizeState(mesh_maxNips,mesh_NcpElems)); homogenization_sizeState = 0_pInt
|
allocate(homogenization_sizeState(mesh_maxNips,mesh_NcpElems))
|
||||||
allocate(homogenization_sizePostResults(mesh_maxNips,mesh_NcpElems)); homogenization_sizePostResults = 0_pInt
|
homogenization_sizeState = 0_pInt
|
||||||
|
allocate(homogenization_sizePostResults(mesh_maxNips,mesh_NcpElems))
|
||||||
|
homogenization_sizePostResults = 0_pInt
|
||||||
|
|
||||||
allocate(materialpoint_dPdF(3,3,3,3,mesh_maxNips,mesh_NcpElems)); materialpoint_dPdF = 0.0_pReal
|
allocate(materialpoint_dPdF(3,3,3,3,mesh_maxNips,mesh_NcpElems))
|
||||||
allocate(materialpoint_F0(3,3,mesh_maxNips,mesh_NcpElems));
|
materialpoint_dPdF = 0.0_pReal
|
||||||
allocate(materialpoint_F(3,3,mesh_maxNips,mesh_NcpElems)); materialpoint_F = 0.0_pReal
|
allocate(materialpoint_F0(3,3,mesh_maxNips,mesh_NcpElems))
|
||||||
allocate(materialpoint_subF0(3,3,mesh_maxNips,mesh_NcpElems)); materialpoint_subF0 = 0.0_pReal
|
allocate(materialpoint_F(3,3,mesh_maxNips,mesh_NcpElems))
|
||||||
allocate(materialpoint_subF(3,3,mesh_maxNips,mesh_NcpElems)); materialpoint_subF = 0.0_pReal
|
materialpoint_F = 0.0_pReal
|
||||||
allocate(materialpoint_P(3,3,mesh_maxNips,mesh_NcpElems)); materialpoint_P = 0.0_pReal
|
allocate(materialpoint_subF0(3,3,mesh_maxNips,mesh_NcpElems))
|
||||||
allocate(materialpoint_Temperature(mesh_maxNips,mesh_NcpElems)); materialpoint_Temperature = Temperature
|
materialpoint_subF0 = 0.0_pReal
|
||||||
allocate(materialpoint_subFrac(mesh_maxNips,mesh_NcpElems)); materialpoint_subFrac = 0.0_pReal
|
allocate(materialpoint_subF(3,3,mesh_maxNips,mesh_NcpElems))
|
||||||
allocate(materialpoint_subStep(mesh_maxNips,mesh_NcpElems)); materialpoint_subStep = 0.0_pReal
|
materialpoint_subF = 0.0_pReal
|
||||||
allocate(materialpoint_subdt(mesh_maxNips,mesh_NcpElems)); materialpoint_subdt = 0.0_pReal
|
allocate(materialpoint_P(3,3,mesh_maxNips,mesh_NcpElems))
|
||||||
allocate(materialpoint_requested(mesh_maxNips,mesh_NcpElems)); materialpoint_requested = .false.
|
materialpoint_P = 0.0_pReal
|
||||||
allocate(materialpoint_converged(mesh_maxNips,mesh_NcpElems)); materialpoint_converged = .true.
|
allocate(materialpoint_Temperature(mesh_maxNips,mesh_NcpElems))
|
||||||
allocate(materialpoint_doneAndHappy(2,mesh_maxNips,mesh_NcpElems)); materialpoint_doneAndHappy = .true.
|
materialpoint_Temperature = Temperature
|
||||||
|
allocate(materialpoint_subFrac(mesh_maxNips,mesh_NcpElems))
|
||||||
|
materialpoint_subFrac = 0.0_pReal
|
||||||
|
allocate(materialpoint_subStep(mesh_maxNips,mesh_NcpElems))
|
||||||
|
materialpoint_subStep = 0.0_pReal
|
||||||
|
allocate(materialpoint_subdt(mesh_maxNips,mesh_NcpElems))
|
||||||
|
materialpoint_subdt = 0.0_pReal
|
||||||
|
allocate(materialpoint_requested(mesh_maxNips,mesh_NcpElems))
|
||||||
|
materialpoint_requested = .false.
|
||||||
|
allocate(materialpoint_converged(mesh_maxNips,mesh_NcpElems))
|
||||||
|
materialpoint_converged = .true.
|
||||||
|
allocate(materialpoint_doneAndHappy(2,mesh_maxNips,mesh_NcpElems))
|
||||||
|
materialpoint_doneAndHappy = .true.
|
||||||
|
|
||||||
forall (i = 1:mesh_maxNips,e = 1:mesh_NcpElems)
|
forall (i = 1:mesh_maxNips,e = 1:mesh_NcpElems)
|
||||||
materialpoint_F0(1:3,1:3,i,e) = math_I3
|
materialpoint_F0(1:3,1:3,i,e) = math_I3
|
||||||
materialpoint_F(1:3,1:3,i,e) = math_I3
|
materialpoint_F(1:3,1:3,i,e) = math_I3
|
||||||
end forall
|
end forall
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
! --- ALLOCATE AND INITIALIZE GLOBAL STATE AND POSTRESULTS VARIABLES ----------
|
! allocate and initialize global state and postrestuls variables
|
||||||
|
|
||||||
!$OMP PARALLEL DO PRIVATE(myInstance)
|
!$OMP PARALLEL DO PRIVATE(myInstance)
|
||||||
do e = 1,mesh_NcpElems ! loop over elements
|
do e = 1,mesh_NcpElems ! loop over elements
|
||||||
myInstance = homogenization_typeInstance(mesh_element(3,e))
|
myInstance = homogenization_typeInstance(mesh_element(3,e))
|
||||||
|
@ -194,11 +205,11 @@ end forall
|
||||||
enddo
|
enddo
|
||||||
!$OMP END PARALLEL DO
|
!$OMP END PARALLEL DO
|
||||||
|
|
||||||
!---write state size file out---------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
! write state size file out
|
||||||
call IO_write_jobBinaryFile(777,'sizeStateHomog',size(homogenization_sizeState))
|
call IO_write_jobBinaryFile(777,'sizeStateHomog',size(homogenization_sizeState))
|
||||||
write (777,rec=1) homogenization_sizeState
|
write (777,rec=1) homogenization_sizeState
|
||||||
close(777)
|
close(777)
|
||||||
!--------------------------------------------------------------
|
|
||||||
|
|
||||||
homogenization_maxSizeState = maxval(homogenization_sizeState)
|
homogenization_maxSizeState = maxval(homogenization_sizeState)
|
||||||
homogenization_maxSizePostResults = maxval(homogenization_sizePostResults)
|
homogenization_maxSizePostResults = maxval(homogenization_sizePostResults)
|
||||||
|
@ -243,18 +254,13 @@ allocate(materialpoint_results(materialpoint_sizeResults,mesh_maxNips,mesh_NcpEl
|
||||||
call flush(6)
|
call flush(6)
|
||||||
!$OMP END CRITICAL (write2out)
|
!$OMP END CRITICAL (write2out)
|
||||||
|
|
||||||
endsubroutine
|
end subroutine homogenization_init
|
||||||
|
|
||||||
|
|
||||||
!********************************************************************
|
!--------------------------------------------------------------------------------------------------
|
||||||
!* parallelized calculation of
|
!> @brief parallelized calculation of stress and corresponding tangent at material points
|
||||||
!* stress and corresponding tangent
|
!--------------------------------------------------------------------------------------------------
|
||||||
!* at material points
|
subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
|
||||||
!********************************************************************
|
|
||||||
subroutine materialpoint_stressAndItsTangent(&
|
|
||||||
updateJaco,& ! flag to initiate Jacobian updating
|
|
||||||
dt & ! time increment
|
|
||||||
)
|
|
||||||
|
|
||||||
use numerics, only: subStepMinHomog, &
|
use numerics, only: subStepMinHomog, &
|
||||||
subStepSizeHomog, &
|
subStepSizeHomog, &
|
||||||
|
@ -305,23 +311,25 @@ use debug, only: debug_level, &
|
||||||
use math, only: math_pDecomposition
|
use math, only: math_pDecomposition
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
|
real(pReal), intent(in) :: dt !< time increment
|
||||||
real(pReal), intent(in) :: dt
|
logical, intent(in) :: updateJaco !< initiating Jacobian update
|
||||||
logical, intent(in) :: updateJaco
|
|
||||||
logical :: rate_sensitivity
|
logical :: rate_sensitivity
|
||||||
integer(pInt) NiterationHomog,NiterationMPstate
|
integer(pInt) NiterationHomog,NiterationMPstate
|
||||||
integer(pInt) g,i,e,myNgrains
|
integer(pInt) g,i,e,myNgrains
|
||||||
|
|
||||||
! ------ initialize to starting condition ------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
! initialize to starting condition
|
||||||
if (iand(debug_level(debug_homogenization), debug_levelBasic) /= 0_pInt &
|
if (iand(debug_level(debug_homogenization), debug_levelBasic) /= 0_pInt .and. &
|
||||||
.and. debug_e > 0 .and. debug_e <= mesh_NcpElems .and. debug_i > 0 .and. debug_i <= mesh_maxNips) then
|
debug_e > 0 .and. debug_e <= mesh_NcpElems .and. debug_i > 0 .and. debug_i <= mesh_maxNips) then
|
||||||
!$OMP CRITICAL (write2out)
|
!$OMP CRITICAL (write2out)
|
||||||
write (6,*)
|
write (6,*)
|
||||||
write (6,'(a,i5,1x,i2)') '<< HOMOG >> Material Point start at el ip ', debug_e, debug_i
|
write (6,'(a,i5,1x,i2)') '<< HOMOG >> Material Point start at el ip ', debug_e, debug_i
|
||||||
write (6,'(a,/,12x,f14.9)') '<< HOMOG >> Temp0', materialpoint_Temperature(debug_i,debug_e)
|
write (6,'(a,/,12x,f14.9)') '<< HOMOG >> Temp0', &
|
||||||
write (6,'(a,/,3(12x,3(f14.9,1x)/))') '<< HOMOG >> F0', math_transpose33(materialpoint_F0(1:3,1:3,debug_i,debug_e))
|
materialpoint_Temperature(debug_i,debug_e)
|
||||||
write (6,'(a,/,3(12x,3(f14.9,1x)/))') '<< HOMOG >> F', math_transpose33(materialpoint_F(1:3,1:3,debug_i,debug_e))
|
write (6,'(a,/,3(12x,3(f14.9,1x)/))') '<< HOMOG >> F0', &
|
||||||
|
math_transpose33(materialpoint_F0(1:3,1:3,debug_i,debug_e))
|
||||||
|
write (6,'(a,/,3(12x,3(f14.9,1x)/))') '<< HOMOG >> F', &
|
||||||
|
math_transpose33(materialpoint_F(1:3,1:3,debug_i,debug_e))
|
||||||
!$OMP END CRITICAL (write2out)
|
!$OMP END CRITICAL (write2out)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -336,7 +344,8 @@ use debug, only: debug_level, &
|
||||||
crystallite_partionedTemperature0(1:myNgrains,i,e) = materialpoint_Temperature(i,e) ! ...temperatures
|
crystallite_partionedTemperature0(1:myNgrains,i,e) = materialpoint_Temperature(i,e) ! ...temperatures
|
||||||
crystallite_partionedFp0(1:3,1:3,1:myNgrains,i,e) = crystallite_Fp0(1:3,1:3,1:myNgrains,i,e) ! ...plastic def grads
|
crystallite_partionedFp0(1:3,1:3,1:myNgrains,i,e) = crystallite_Fp0(1:3,1:3,1:myNgrains,i,e) ! ...plastic def grads
|
||||||
crystallite_partionedLp0(1:3,1:3,1:myNgrains,i,e) = crystallite_Lp0(1:3,1:3,1:myNgrains,i,e) ! ...plastic velocity grads
|
crystallite_partionedLp0(1:3,1:3,1:myNgrains,i,e) = crystallite_Lp0(1:3,1:3,1:myNgrains,i,e) ! ...plastic velocity grads
|
||||||
crystallite_partioneddPdF0(1:3,1:3,1:3,1:3,1:myNgrains,i,e) = crystallite_dPdF0(1:3,1:3,1:3,1:3,1:myNgrains,i,e) ! ...stiffness
|
crystallite_partioneddPdF0(1:3,1:3,1:3,1:3,1:myNgrains,i,e) = &
|
||||||
|
crystallite_dPdF0(1:3,1:3,1:3,1:3,1:myNgrains,i,e) ! ...stiffness
|
||||||
crystallite_partionedF0(1:3,1:3,1:myNgrains,i,e) = crystallite_F0(1:3,1:3,1:myNgrains,i,e) ! ...def grads
|
crystallite_partionedF0(1:3,1:3,1:myNgrains,i,e) = crystallite_F0(1:3,1:3,1:myNgrains,i,e) ! ...def grads
|
||||||
crystallite_partionedTstar0_v(1:6,1:myNgrains,i,e) = crystallite_Tstar0_v(1:6,1:myNgrains,i,e) ! ...2nd PK stress
|
crystallite_partionedTstar0_v(1:6,1:myNgrains,i,e) = crystallite_Tstar0_v(1:6,1:myNgrains,i,e) ! ...2nd PK stress
|
||||||
|
|
||||||
|
@ -355,8 +364,8 @@ use debug, only: debug_level, &
|
||||||
|
|
||||||
NiterationHomog = 0_pInt
|
NiterationHomog = 0_pInt
|
||||||
|
|
||||||
! ------ cutback loop ------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
! cutback loop
|
||||||
do while (.not. terminallyIll .and. &
|
do while (.not. terminallyIll .and. &
|
||||||
any(materialpoint_subStep(:,FEsolving_execELem(1):FEsolving_execElem(2)) > subStepMinHomog)) ! cutback loop for material points
|
any(materialpoint_subStep(:,FEsolving_execELem(1):FEsolving_execElem(2)) > subStepMinHomog)) ! cutback loop for material points
|
||||||
|
|
||||||
|
@ -380,7 +389,7 @@ use debug, only: debug_level, &
|
||||||
materialpoint_subFrac(i,e) = materialpoint_subFrac(i,e) + materialpoint_subStep(i,e)
|
materialpoint_subFrac(i,e) = materialpoint_subFrac(i,e) + materialpoint_subStep(i,e)
|
||||||
!$OMP FLUSH(materialpoint_subFrac)
|
!$OMP FLUSH(materialpoint_subFrac)
|
||||||
materialpoint_subStep(i,e) = min(1.0_pReal-materialpoint_subFrac(i,e), &
|
materialpoint_subStep(i,e) = min(1.0_pReal-materialpoint_subFrac(i,e), &
|
||||||
stepIncreaseHomog*materialpoint_subStep(i,e)) ! <<introduce flexibility for step increase/acceleration>>
|
stepIncreaseHomog*materialpoint_subStep(i,e)) ! introduce flexibility for step increase/acceleration
|
||||||
!$OMP FLUSH(materialpoint_subStep)
|
!$OMP FLUSH(materialpoint_subStep)
|
||||||
|
|
||||||
! still stepping needed
|
! still stepping needed
|
||||||
|
@ -551,13 +560,12 @@ use debug, only: debug_level, &
|
||||||
endif
|
endif
|
||||||
return
|
return
|
||||||
|
|
||||||
endsubroutine
|
end subroutine materialpoint_stressAndItsTangent
|
||||||
|
|
||||||
|
|
||||||
!********************************************************************
|
!--------------------------------------------------------------------------------------------------
|
||||||
!* parallelized calculation of
|
!> @brief parallelized calculation of result array at material points
|
||||||
!* result array at material points
|
!--------------------------------------------------------------------------------------------------
|
||||||
!********************************************************************
|
|
||||||
subroutine materialpoint_postResults(dt)
|
subroutine materialpoint_postResults(dt)
|
||||||
|
|
||||||
use FEsolving, only: FEsolving_execElem, FEsolving_execIP
|
use FEsolving, only: FEsolving_execElem, FEsolving_execIP
|
||||||
|
@ -598,16 +606,13 @@ subroutine materialpoint_postResults(dt)
|
||||||
enddo
|
enddo
|
||||||
!$OMP END PARALLEL DO
|
!$OMP END PARALLEL DO
|
||||||
|
|
||||||
endsubroutine
|
end subroutine materialpoint_postResults
|
||||||
|
|
||||||
|
|
||||||
!********************************************************************
|
!--------------------------------------------------------------------------------------------------
|
||||||
! partition material point def grad onto constituents
|
!> @brief partition material point def grad onto constituents
|
||||||
!********************************************************************
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine homogenization_partitionDeformation(&
|
subroutine homogenization_partitionDeformation(ip,el)
|
||||||
ip, & ! integration point
|
|
||||||
el & ! element
|
|
||||||
)
|
|
||||||
|
|
||||||
use mesh, only: mesh_element
|
use mesh, only: mesh_element
|
||||||
use material, only: homogenization_type, homogenization_maxNgrains
|
use material, only: homogenization_type, homogenization_maxNgrains
|
||||||
|
@ -617,12 +622,14 @@ subroutine homogenization_partitionDeformation(&
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
integer(pInt), intent(in) :: ip,el
|
integer(pInt), intent(in) :: ip, & !< integration point
|
||||||
|
el !< element
|
||||||
|
|
||||||
select case(homogenization_type(mesh_element(3,el)))
|
select case(homogenization_type(mesh_element(3,el)))
|
||||||
case (homogenization_isostrain_label)
|
case (homogenization_isostrain_label)
|
||||||
!* isostrain
|
!* isostrain
|
||||||
call homogenization_isostrain_partitionDeformation(crystallite_partionedF(1:3,1:3,1:homogenization_maxNgrains,ip,el), &
|
call homogenization_isostrain_partitionDeformation(&
|
||||||
|
crystallite_partionedF(1:3,1:3,1:homogenization_maxNgrains,ip,el), &
|
||||||
crystallite_partionedF0(1:3,1:3,1:homogenization_maxNgrains,ip,el),&
|
crystallite_partionedF0(1:3,1:3,1:homogenization_maxNgrains,ip,el),&
|
||||||
materialpoint_subF(1:3,1:3,ip,el),&
|
materialpoint_subF(1:3,1:3,ip,el),&
|
||||||
homogenization_state(ip,el), &
|
homogenization_state(ip,el), &
|
||||||
|
@ -638,26 +645,24 @@ subroutine homogenization_partitionDeformation(&
|
||||||
el)
|
el)
|
||||||
end select
|
end select
|
||||||
|
|
||||||
endsubroutine
|
end subroutine homogenization_partitionDeformation
|
||||||
|
|
||||||
|
|
||||||
!********************************************************************
|
!--------------------------------------------------------------------------------------------------
|
||||||
! update the internal state of the homogenization scheme
|
!> @brief update the internal state of the homogenization scheme and tell whether "done" and
|
||||||
! and tell whether "done" and "happy" with result
|
!> "happy" with result
|
||||||
!********************************************************************
|
!--------------------------------------------------------------------------------------------------
|
||||||
function homogenization_updateState(&
|
function homogenization_updateState(ip,el)
|
||||||
ip, & ! integration point
|
|
||||||
el & ! element
|
|
||||||
)
|
|
||||||
use mesh, only: mesh_element
|
use mesh, only: mesh_element
|
||||||
use material, only: homogenization_type, homogenization_maxNgrains
|
use material, only: homogenization_type, homogenization_maxNgrains
|
||||||
use crystallite, only: crystallite_P,crystallite_dPdF,crystallite_partionedF,crystallite_partionedF0 ! modified <<<updated 31.07.2009>>>
|
use crystallite, only: crystallite_P,crystallite_dPdF,crystallite_partionedF,crystallite_partionedF0
|
||||||
|
|
||||||
use homogenization_isostrain
|
use homogenization_isostrain
|
||||||
use homogenization_RGC
|
use homogenization_RGC
|
||||||
implicit none
|
|
||||||
|
|
||||||
integer(pInt), intent(in) :: ip,el
|
implicit none
|
||||||
|
integer(pInt), intent(in) :: ip, & !< integration point
|
||||||
|
el !< element
|
||||||
logical, dimension(2) :: homogenization_updateState
|
logical, dimension(2) :: homogenization_updateState
|
||||||
|
|
||||||
select case(homogenization_type(mesh_element(3,el)))
|
select case(homogenization_type(mesh_element(3,el)))
|
||||||
|
@ -684,18 +689,13 @@ function homogenization_updateState(&
|
||||||
el)
|
el)
|
||||||
end select
|
end select
|
||||||
|
|
||||||
return
|
end function homogenization_updateState
|
||||||
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
|
|
||||||
!********************************************************************
|
!--------------------------------------------------------------------------------------------------
|
||||||
! derive average stress and stiffness from constituent quantities
|
!> @brief derive average stress and stiffness from constituent quantities
|
||||||
!********************************************************************
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine homogenization_averageStressAndItsTangent(&
|
subroutine homogenization_averageStressAndItsTangent(ip,el)
|
||||||
ip, & ! integration point
|
|
||||||
el & ! element
|
|
||||||
)
|
|
||||||
use mesh, only: mesh_element
|
use mesh, only: mesh_element
|
||||||
use material, only: homogenization_type, homogenization_maxNgrains
|
use material, only: homogenization_type, homogenization_maxNgrains
|
||||||
use crystallite, only: crystallite_P,crystallite_dPdF
|
use crystallite, only: crystallite_P,crystallite_dPdF
|
||||||
|
@ -704,7 +704,8 @@ subroutine homogenization_averageStressAndItsTangent(&
|
||||||
use homogenization_isostrain
|
use homogenization_isostrain
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
integer(pInt), intent(in) :: ip,el
|
integer(pInt), intent(in) :: ip, & !< integration point
|
||||||
|
el !< element
|
||||||
|
|
||||||
select case(homogenization_type(mesh_element(3,el)))
|
select case(homogenization_type(mesh_element(3,el)))
|
||||||
!* isostrain
|
!* isostrain
|
||||||
|
@ -725,18 +726,13 @@ subroutine homogenization_averageStressAndItsTangent(&
|
||||||
el)
|
el)
|
||||||
end select
|
end select
|
||||||
|
|
||||||
return
|
end subroutine homogenization_averageStressAndItsTangent
|
||||||
|
|
||||||
endsubroutine
|
|
||||||
|
|
||||||
|
|
||||||
!********************************************************************
|
!--------------------------------------------------------------------------------------------------
|
||||||
! derive average stress and stiffness from constituent quantities
|
!> @brief derive average stress and stiffness from constituent quantities
|
||||||
!********************************************************************
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine homogenization_averageTemperature(&
|
subroutine homogenization_averageTemperature(ip,el)
|
||||||
ip, & ! integration point
|
|
||||||
el & ! element
|
|
||||||
)
|
|
||||||
use mesh, only: mesh_element
|
use mesh, only: mesh_element
|
||||||
use material, only: homogenization_type, homogenization_maxNgrains
|
use material, only: homogenization_type, homogenization_maxNgrains
|
||||||
use crystallite, only: crystallite_Temperature
|
use crystallite, only: crystallite_Temperature
|
||||||
|
@ -745,7 +741,8 @@ subroutine homogenization_averageTemperature(&
|
||||||
use homogenization_RGC
|
use homogenization_RGC
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
integer(pInt), intent(in) :: ip,el
|
integer(pInt), intent(in) :: ip, & !< integration point
|
||||||
|
el !< element
|
||||||
|
|
||||||
select case(homogenization_type(mesh_element(3,el)))
|
select case(homogenization_type(mesh_element(3,el)))
|
||||||
!* isostrain
|
!* isostrain
|
||||||
|
@ -758,27 +755,22 @@ subroutine homogenization_averageTemperature(&
|
||||||
homogenization_RGC_averageTemperature(crystallite_Temperature(1:homogenization_maxNgrains,ip,el), ip, el)
|
homogenization_RGC_averageTemperature(crystallite_Temperature(1:homogenization_maxNgrains,ip,el), ip, el)
|
||||||
end select
|
end select
|
||||||
|
|
||||||
return
|
end subroutine homogenization_averageTemperature
|
||||||
|
|
||||||
endsubroutine
|
|
||||||
|
|
||||||
|
|
||||||
!********************************************************************
|
!--------------------------------------------------------------------------------------------------
|
||||||
! return array of homogenization results for post file inclusion
|
!> @brief return array of homogenization results for post file inclusion. call only,
|
||||||
! call only, if homogenization_sizePostResults(ip,el) > 0 !!
|
!> if homogenization_sizePostResults(ip,el) > 0 !!
|
||||||
!********************************************************************
|
!--------------------------------------------------------------------------------------------------
|
||||||
function homogenization_postResults(&
|
function homogenization_postResults(ip,el)
|
||||||
ip, & ! integration point
|
|
||||||
el & ! element
|
|
||||||
)
|
|
||||||
use mesh, only: mesh_element
|
use mesh, only: mesh_element
|
||||||
use material, only: homogenization_type
|
use material, only: homogenization_type
|
||||||
use homogenization_isostrain
|
use homogenization_isostrain
|
||||||
use homogenization_RGC
|
use homogenization_RGC
|
||||||
implicit none
|
|
||||||
|
|
||||||
!* Definition of variables
|
implicit none
|
||||||
integer(pInt), intent(in) :: ip,el
|
integer(pInt), intent(in) :: ip, & !< integration point
|
||||||
|
el !< element
|
||||||
real(pReal), dimension(homogenization_sizePostResults(ip,el)) :: homogenization_postResults
|
real(pReal), dimension(homogenization_sizePostResults(ip,el)) :: homogenization_postResults
|
||||||
|
|
||||||
homogenization_postResults = 0.0_pReal
|
homogenization_postResults = 0.0_pReal
|
||||||
|
@ -791,8 +783,6 @@ function homogenization_postResults(&
|
||||||
homogenization_postResults = homogenization_RGC_postResults(homogenization_state(ip,el),ip,el)
|
homogenization_postResults = homogenization_RGC_postResults(homogenization_state(ip,el),ip,el)
|
||||||
end select
|
end select
|
||||||
|
|
||||||
return
|
end function homogenization_postResults
|
||||||
|
|
||||||
endfunction
|
end module homogenization
|
||||||
|
|
||||||
END MODULE
|
|
||||||
|
|
Loading…
Reference in New Issue