reorganized calculation modes for CPFEM, now having better readable and cleaner structure
This commit is contained in:
parent
65c04ad4cf
commit
ada2beb8b8
135
code/CPFEM.f90
135
code/CPFEM.f90
|
@ -19,13 +19,12 @@
|
||||||
!##############################################################
|
!##############################################################
|
||||||
!* $Id$
|
!* $Id$
|
||||||
!##############################################################
|
!##############################################################
|
||||||
MODULE CPFEM
|
module CPFEM
|
||||||
!##############################################################
|
!##############################################################
|
||||||
! *** CPFEM engine ***
|
! *** CPFEM engine ***
|
||||||
!
|
|
||||||
use prec, only: pReal
|
|
||||||
implicit none
|
|
||||||
|
|
||||||
|
use prec, only: pReal, pInt
|
||||||
|
implicit none
|
||||||
real(pReal), parameter :: CPFEM_odd_stress = 1e15_pReal, &
|
real(pReal), parameter :: CPFEM_odd_stress = 1e15_pReal, &
|
||||||
CPFEM_odd_jacobian = 1e50_pReal
|
CPFEM_odd_jacobian = 1e50_pReal
|
||||||
|
|
||||||
|
@ -36,9 +35,16 @@ real(pReal), dimension (:,:,:,:), allocatable :: CPFEM_dcsdE_knownGood
|
||||||
logical :: CPFEM_init_done = .false., & !> remember whether init has been done already
|
logical :: CPFEM_init_done = .false., & !> remember whether init has been done already
|
||||||
CPFEM_init_inProgress = .false., & !> remember whether first IP is currently performing init
|
CPFEM_init_inProgress = .false., & !> remember whether first IP is currently performing init
|
||||||
CPFEM_calc_done = .false. !> remember whether first IP has already calced the results
|
CPFEM_calc_done = .false. !> remember whether first IP has already calced the results
|
||||||
|
logical, public, protected :: usePingPong = .false.
|
||||||
|
integer(pInt), parameter, public :: &
|
||||||
|
CPFEM_CALCRESULTS = 2_pInt**0_pInt, &
|
||||||
|
CPFEM_AGERESULTS = 2_pInt**1_pInt, &
|
||||||
|
CPFEM_BACKUPJACOBIAN = 2_pInt**2_pInt, &
|
||||||
|
CPFEM_RESTOREJACOBIAN = 2_pInt**3_pInt, &
|
||||||
|
CPFEM_COLLECT = 2_pInt**4_pInt, &
|
||||||
|
CPFEM_EXPLICIT = 2_pInt**5_pInt
|
||||||
|
|
||||||
|
contains
|
||||||
CONTAINS
|
|
||||||
|
|
||||||
!*********************************************************
|
!*********************************************************
|
||||||
!*** call (thread safe) all module initializations ***
|
!*** call (thread safe) all module initializations ***
|
||||||
|
@ -46,8 +52,7 @@ CONTAINS
|
||||||
|
|
||||||
subroutine CPFEM_initAll(Temperature,element,IP)
|
subroutine CPFEM_initAll(Temperature,element,IP)
|
||||||
|
|
||||||
use prec, only: prec_init, &
|
use prec, only: prec_init
|
||||||
pInt
|
|
||||||
use numerics, only: numerics_init
|
use numerics, only: numerics_init
|
||||||
use debug, only: debug_init
|
use debug, only: debug_init
|
||||||
use FEsolving, only: FE_init
|
use FEsolving, only: FE_init
|
||||||
|
@ -113,37 +118,53 @@ end subroutine CPFEM_initAll
|
||||||
!*********************************************************
|
!*********************************************************
|
||||||
|
|
||||||
subroutine CPFEM_init
|
subroutine CPFEM_init
|
||||||
|
|
||||||
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 prec, only: pInt
|
use prec, only: &
|
||||||
use debug, only: debug_level, &
|
pInt
|
||||||
|
use IO, only: &
|
||||||
|
IO_read_jobBinaryFile,&
|
||||||
|
IO_read_jobBinaryIntFile, &
|
||||||
|
IO_timeStamp, &
|
||||||
|
IO_error
|
||||||
|
use numerics, only: &
|
||||||
|
DAMASK_NumThreadsInt
|
||||||
|
use debug, only: &
|
||||||
|
debug_level, &
|
||||||
debug_CPFEM, &
|
debug_CPFEM, &
|
||||||
debug_levelBasic, &
|
debug_levelBasic, &
|
||||||
debug_levelExtensive
|
debug_levelExtensive
|
||||||
use IO, only: IO_read_jobBinaryFile,&
|
use FEsolving, only: &
|
||||||
IO_read_jobBinaryIntFile, &
|
parallelExecution, &
|
||||||
IO_timeStamp
|
|
||||||
use FEsolving, only: parallelExecution, &
|
|
||||||
symmetricSolver, &
|
symmetricSolver, &
|
||||||
restartRead, &
|
restartRead, &
|
||||||
modelName
|
modelName
|
||||||
use mesh, only: mesh_NcpElems, &
|
use mesh, only: &
|
||||||
|
mesh_NcpElems, &
|
||||||
|
mesh_Nelems, &
|
||||||
mesh_maxNips
|
mesh_maxNips
|
||||||
use material, only: homogenization_maxNgrains, &
|
use material, only: &
|
||||||
|
homogenization_maxNgrains, &
|
||||||
material_phase
|
material_phase
|
||||||
use constitutive, only: constitutive_state0
|
use constitutive, only: &
|
||||||
use crystallite, only: crystallite_F0, &
|
constitutive_state0
|
||||||
|
use crystallite, only: &
|
||||||
|
crystallite_F0, &
|
||||||
crystallite_Fp0, &
|
crystallite_Fp0, &
|
||||||
crystallite_Lp0, &
|
crystallite_Lp0, &
|
||||||
crystallite_dPdF0, &
|
crystallite_dPdF0, &
|
||||||
crystallite_Tstar0_v
|
crystallite_Tstar0_v, &
|
||||||
use homogenization, only: homogenization_sizeState, &
|
crystallite_localPlasticity
|
||||||
|
use homogenization, only: &
|
||||||
|
homogenization_sizeState, &
|
||||||
homogenization_state0
|
homogenization_state0
|
||||||
|
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt) i,j,k,l,m
|
integer(pInt) i,j,k,l,m
|
||||||
|
|
||||||
|
if (any(.not. crystallite_localPlasticity) .and. (mesh_Nelems /= mesh_NcpElems)) call IO_error(600)
|
||||||
|
if ((DAMASK_NumThreadsInt > 1_pInt) .and. (mesh_Nelems /= mesh_NcpElems)) call IO_error(601)
|
||||||
|
usePingPong = (any(.not. crystallite_localPlasticity) .or. (DAMASK_NumThreadsInt > 1_pInt))
|
||||||
|
|
||||||
! initialize stress and jacobian to zero
|
! initialize stress and jacobian to zero
|
||||||
allocate(CPFEM_cs(6,mesh_maxNips,mesh_NcpElems)) ; CPFEM_cs = 0.0_pReal
|
allocate(CPFEM_cs(6,mesh_maxNips,mesh_NcpElems)) ; CPFEM_cs = 0.0_pReal
|
||||||
allocate(CPFEM_dcsdE(6,6,mesh_maxNips,mesh_NcpElems)) ; CPFEM_dcsdE = 0.0_pReal
|
allocate(CPFEM_dcsdE(6,6,mesh_maxNips,mesh_NcpElems)) ; CPFEM_dcsdE = 0.0_pReal
|
||||||
|
@ -232,9 +253,6 @@ end subroutine CPFEM_init
|
||||||
subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchyStress,&
|
subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchyStress,&
|
||||||
& jacobian, pstress, dPdF)
|
& jacobian, pstress, dPdF)
|
||||||
! note: cauchyStress = Cauchy stress cs(6) and jacobian = Consistent tangent dcs/dE
|
! note: cauchyStress = Cauchy stress cs(6) and jacobian = Consistent tangent dcs/dE
|
||||||
|
|
||||||
!*** variables and functions from other modules ***!
|
|
||||||
use prec, only: pInt
|
|
||||||
use numerics, only: defgradTolerance, &
|
use numerics, only: defgradTolerance, &
|
||||||
iJacoStiffness
|
iJacoStiffness
|
||||||
use debug, only: debug_level, &
|
use debug, only: debug_level, &
|
||||||
|
@ -309,10 +327,6 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt
|
||||||
use DAMASK_interface
|
use DAMASK_interface
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
|
|
||||||
!*** input variables ***!
|
|
||||||
|
|
||||||
integer(pInt), intent(in) :: element, & ! FE element number
|
integer(pInt), intent(in) :: element, & ! FE element number
|
||||||
IP ! FE integration point number
|
IP ! FE integration point number
|
||||||
real(pReal), intent(inout) :: Temperature ! temperature
|
real(pReal), intent(inout) :: Temperature ! temperature
|
||||||
|
@ -320,23 +334,12 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt
|
||||||
real(pReal), dimension (3,3), intent(in) :: ffn, & ! deformation gradient for t=t0
|
real(pReal), dimension (3,3), intent(in) :: ffn, & ! deformation gradient for t=t0
|
||||||
ffn1 ! deformation gradient for t=t1
|
ffn1 ! deformation gradient for t=t1
|
||||||
integer(pInt), intent(in) :: mode ! computation mode 1: regular computation plus aging of results
|
integer(pInt), intent(in) :: mode ! computation mode 1: regular computation plus aging of results
|
||||||
! 2: regular computation
|
|
||||||
! 3: collection of FEM data
|
|
||||||
! 4: backup tangent from former converged inc
|
|
||||||
! 5: restore tangent from former converged inc
|
|
||||||
! 6: recycling of former results (MARC speciality)
|
|
||||||
|
|
||||||
|
|
||||||
!*** output variables ***!
|
|
||||||
|
|
||||||
real(pReal), dimension(6), intent(out) :: cauchyStress ! stress vector in Mandel notation
|
real(pReal), dimension(6), intent(out) :: cauchyStress ! stress vector in Mandel notation
|
||||||
real(pReal), dimension(6,6), intent(out) :: jacobian ! jacobian in Mandel notation
|
real(pReal), dimension(6,6), intent(out) :: jacobian ! jacobian in Mandel notation
|
||||||
real(pReal), dimension (3,3), intent(out) :: pstress ! Piola-Kirchhoff stress in Matrix notation
|
real(pReal), dimension (3,3), intent(out) :: pstress ! Piola-Kirchhoff stress in Matrix notation
|
||||||
real(pReal), dimension (3,3,3,3), intent(out) :: dPdF !
|
real(pReal), dimension (3,3,3,3), intent(out) :: dPdF !
|
||||||
|
|
||||||
|
|
||||||
!*** local variables ***!
|
|
||||||
|
|
||||||
real(pReal) J_inverse, & ! inverse of Jacobian
|
real(pReal) J_inverse, & ! inverse of Jacobian
|
||||||
rnd
|
rnd
|
||||||
real(pReal), dimension (3,3) :: Kirchhoff, & ! Piola-Kirchhoff stress in Matrix notation
|
real(pReal), dimension (3,3) :: Kirchhoff, & ! Piola-Kirchhoff stress in Matrix notation
|
||||||
|
@ -364,19 +367,7 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt
|
||||||
!$OMP END CRITICAL (write2out)
|
!$OMP END CRITICAL (write2out)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if (iand(mode, CPFEM_AGERESULTS) /= 0_pInt) then
|
||||||
!*** according to our "mode" we decide what to do
|
|
||||||
|
|
||||||
select case (mode)
|
|
||||||
|
|
||||||
|
|
||||||
! --+>> REGULAR COMPUTATION (WITH AGING OF RESULTS IF MODE == 1) <<+--
|
|
||||||
|
|
||||||
case (1,2,8,9)
|
|
||||||
|
|
||||||
!*** age results
|
|
||||||
|
|
||||||
if (mode == 1 .or. mode == 8) then
|
|
||||||
crystallite_F0 = crystallite_partionedF ! crystallite deformation (_subF is perturbed...)
|
crystallite_F0 = crystallite_partionedF ! crystallite deformation (_subF is perturbed...)
|
||||||
crystallite_Fp0 = crystallite_Fp ! crystallite plastic deformation
|
crystallite_Fp0 = crystallite_Fp ! crystallite plastic deformation
|
||||||
crystallite_Lp0 = crystallite_Lp ! crystallite plastic velocity
|
crystallite_Lp0 = crystallite_Lp ! crystallite plastic velocity
|
||||||
|
@ -463,16 +454,15 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt
|
||||||
close (777)
|
close (777)
|
||||||
|
|
||||||
endif
|
endif
|
||||||
! * end of dumping
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if (mode == 8 .or. mode == 9) then ! Abaqus explicit skips collect
|
if (iand(mode, CPFEM_EXPLICIT) /= 0_pInt) then ! Abaqus explicit skips collect
|
||||||
materialpoint_Temperature(IP,cp_en) = Temperature
|
materialpoint_Temperature(IP,cp_en) = Temperature
|
||||||
materialpoint_F0(1:3,1:3,IP,cp_en) = ffn
|
materialpoint_F0(1:3,1:3,IP,cp_en) = ffn
|
||||||
materialpoint_F(1:3,1:3,IP,cp_en) = ffn1
|
materialpoint_F(1:3,1:3,IP,cp_en) = ffn1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if (iand(mode, CPFEM_CALCRESULTS) /= 0_pInt) then
|
||||||
!*** deformation gradient outdated or any actual deformation gradient differs more than relevantStrain from the stored one
|
!*** deformation gradient outdated or any actual deformation gradient differs more than relevantStrain from the stored one
|
||||||
|
|
||||||
if (terminallyIll .or. outdatedFFN1 .or. any(abs(ffn1 - materialpoint_F(1:3,1:3,IP,cp_en)) > defgradTolerance)) then
|
if (terminallyIll .or. outdatedFFN1 .or. any(abs(ffn1 - materialpoint_F(1:3,1:3,IP,cp_en)) > defgradTolerance)) then
|
||||||
|
@ -565,16 +555,17 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt
|
||||||
CPFEM_dcsde(1:6,1:6,IP,cp_en) = math_Mandel3333to66(J_inverse * H_sym)
|
CPFEM_dcsde(1:6,1:6,IP,cp_en) = math_Mandel3333to66(J_inverse * H_sym)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
! --+>> COLLECTION OF FEM INPUT WITH RETURNING OF RANDOMIZED ODD STRESS AND JACOBIAN <<+--
|
! --+>> COLLECTION OF FEM INPUT WITH RETURNING OF RANDOMIZED ODD STRESS AND JACOBIAN <<+--
|
||||||
|
|
||||||
case (3,4,5)
|
|
||||||
if (mode == 4) then
|
if (iand(mode, CPFEM_BACKUPJACOBIAN) /= 0_pInt) &
|
||||||
CPFEM_dcsde_knownGood = CPFEM_dcsde ! --+>> BACKUP JACOBIAN FROM FORMER CONVERGED INC
|
CPFEM_dcsde_knownGood = CPFEM_dcsde
|
||||||
else if (mode == 5) then
|
if (iand(mode, CPFEM_RESTOREJACOBIAN) /= 0_pInt) &
|
||||||
CPFEM_dcsde = CPFEM_dcsde_knownGood ! --+>> RESTORE CONSISTENT JACOBIAN FROM FORMER CONVERGED INC
|
CPFEM_dcsde = CPFEM_dcsde_knownGood
|
||||||
end if
|
|
||||||
|
if (iand(mode, CPFEM_COLLECT) /= 0_pInt) then
|
||||||
call random_number(rnd)
|
call random_number(rnd)
|
||||||
if (rnd < 0.5_pReal) rnd = rnd - 1.0_pReal
|
if (rnd < 0.5_pReal) rnd = rnd - 1.0_pReal
|
||||||
materialpoint_Temperature(IP,cp_en) = Temperature
|
materialpoint_Temperature(IP,cp_en) = Temperature
|
||||||
|
@ -583,22 +574,8 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt
|
||||||
CPFEM_cs(1:6,IP,cp_en) = rnd * CPFEM_odd_stress
|
CPFEM_cs(1:6,IP,cp_en) = rnd * CPFEM_odd_stress
|
||||||
CPFEM_dcsde(1:6,1:6,IP,cp_en) = CPFEM_odd_jacobian * math_identity2nd(6)
|
CPFEM_dcsde(1:6,1:6,IP,cp_en) = CPFEM_odd_jacobian * math_identity2nd(6)
|
||||||
CPFEM_calc_done = .false.
|
CPFEM_calc_done = .false.
|
||||||
|
endif
|
||||||
|
|
||||||
! --+>> RECYCLING OF FORMER RESULTS (MARC SPECIALTY) <<+--
|
|
||||||
|
|
||||||
case (6)
|
|
||||||
! do nothing
|
|
||||||
|
|
||||||
|
|
||||||
! --+>> RESTORE CONSISTENT JACOBIAN FROM FORMER CONVERGED INC
|
|
||||||
|
|
||||||
case (7)
|
|
||||||
CPFEM_dcsde = CPFEM_dcsde_knownGood
|
|
||||||
|
|
||||||
end select
|
|
||||||
|
|
||||||
|
|
||||||
!*** fill output variables with computed values
|
|
||||||
|
|
||||||
cauchyStress = CPFEM_cs(1:6,IP,cp_en)
|
cauchyStress = CPFEM_cs(1:6,IP,cp_en)
|
||||||
jacobian = CPFEM_dcsdE(1:6,1:6,IP,cp_en)
|
jacobian = CPFEM_dcsdE(1:6,1:6,IP,cp_en)
|
||||||
|
@ -651,4 +628,4 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt
|
||||||
|
|
||||||
end subroutine CPFEM_general
|
end subroutine CPFEM_general
|
||||||
|
|
||||||
END MODULE CPFEM
|
end module CPFEM
|
||||||
|
|
|
@ -187,7 +187,13 @@ subroutine vumat (jblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal, &
|
||||||
debug_abaqus
|
debug_abaqus
|
||||||
use mesh, only: mesh_FEasCP, &
|
use mesh, only: mesh_FEasCP, &
|
||||||
mesh_ipCoordinates
|
mesh_ipCoordinates
|
||||||
use CPFEM, only: CPFEM_general,CPFEM_init_done, CPFEM_initAll
|
use CPFEM, only: &
|
||||||
|
CPFEM_general, &
|
||||||
|
CPFEM_init_done, &
|
||||||
|
CPFEM_initAll, &
|
||||||
|
CPFEM_CALCRESULTS, &
|
||||||
|
CPFEM_AGERESULTS, &
|
||||||
|
CPFEM_EXPLICIT
|
||||||
use homogenization, only: materialpoint_sizeResults, materialpoint_results
|
use homogenization, only: materialpoint_sizeResults, materialpoint_results
|
||||||
|
|
||||||
include 'vaba_param.inc' ! Abaqus exp initializes a first step in single prec. for this a two-step compilation is used.
|
include 'vaba_param.inc' ! Abaqus exp initializes a first step in single prec. for this a two-step compilation is used.
|
||||||
|
@ -216,8 +222,8 @@ subroutine vumat (jblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal, &
|
||||||
real(pReal), dimension(6,6) :: ddsdde
|
real(pReal), dimension(6,6) :: ddsdde
|
||||||
real(pReal) temp, timeInc
|
real(pReal) temp, timeInc
|
||||||
integer(pInt) computationMode, n, i, cp_en
|
integer(pInt) computationMode, n, i, cp_en
|
||||||
logical :: cutBack
|
|
||||||
|
|
||||||
|
computationMode = ior(CPFEM_CALCRESULTS,CPFEM_EXPLICIT) ! always calculate, always explicit
|
||||||
do n = 1,nblock ! loop over vector of IPs
|
do n = 1,nblock ! loop over vector of IPs
|
||||||
|
|
||||||
temp = tempOld(n)
|
temp = tempOld(n)
|
||||||
|
@ -249,16 +255,15 @@ subroutine vumat (jblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal, &
|
||||||
outdatedByNewInc = .false.
|
outdatedByNewInc = .false.
|
||||||
call debug_info() ! first after new inc reports debugging
|
call debug_info() ! first after new inc reports debugging
|
||||||
call debug_reset() ! resets debugging
|
call debug_reset() ! resets debugging
|
||||||
computationMode = 8 ! calc and age results with implicit collection
|
computationMode = ior(computationMode, CPFEM_AGERESULTS) ! age results
|
||||||
else
|
|
||||||
computationMode = 9 ! plain calc with implicit collection
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
theTime = totalTime ! record current starting time
|
theTime = totalTime ! record current starting time
|
||||||
|
|
||||||
if (iand(debug_level(debug_abaqus),debug_levelBasic) /= 0) then
|
if (iand(debug_level(debug_abaqus),debug_levelBasic) /= 0) then
|
||||||
!$OMP CRITICAL (write2out)
|
!$OMP CRITICAL (write2out)
|
||||||
write(6,'(a16,1x,i2,1x,a,i8,1x,i5,a)') 'computationMode',computationMode,'(',nElement(n),nMatPoint(n),')'; call flush(6)
|
write(6,'(i2,1x,a,i8,1x,i5,a)') '(',nElement(n),nMatPoint(n),')'; call flush(6)
|
||||||
|
write(6,'(a,l1)') 'Aging Results: ', iand(computationMode, CPFEM_AGERESULTS) /= 0_pInt
|
||||||
!$OMP END CRITICAL (write2out)
|
!$OMP END CRITICAL (write2out)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -151,7 +151,16 @@ subroutine UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,&
|
||||||
debug_abaqus
|
debug_abaqus
|
||||||
use mesh, only: mesh_FEasCP, &
|
use mesh, only: mesh_FEasCP, &
|
||||||
mesh_ipCoordinates
|
mesh_ipCoordinates
|
||||||
use CPFEM, only: CPFEM_general,CPFEM_init_done, CPFEM_initAll
|
use CPFEM, only: &
|
||||||
|
CPFEM_general, &
|
||||||
|
CPFEM_init_done, &
|
||||||
|
CPFEM_initAll, &
|
||||||
|
CPFEM_CALCRESULTS, &
|
||||||
|
CPFEM_AGERESULTS, &
|
||||||
|
CPFEM_COLLECT, &
|
||||||
|
CPFEM_RESTOREJACOBIAN, &
|
||||||
|
CPFEM_BACKUPJACOBIAN
|
||||||
|
|
||||||
use homogenization, only: materialpoint_sizeResults, materialpoint_results
|
use homogenization, only: materialpoint_sizeResults, materialpoint_results
|
||||||
|
|
||||||
|
|
||||||
|
@ -173,7 +182,6 @@ subroutine UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,&
|
||||||
real(pReal), dimension(6) :: stress_h
|
real(pReal), dimension(6) :: stress_h
|
||||||
real(pReal), dimension(6,6) :: ddsdde_h
|
real(pReal), dimension(6,6) :: ddsdde_h
|
||||||
integer(pInt) computationMode, i, cp_en
|
integer(pInt) computationMode, i, cp_en
|
||||||
logical :: cutBack
|
|
||||||
|
|
||||||
if (iand(debug_level(debug_abaqus),debug_levelBasic) /= 0 .and. noel == 1 .and. npt == 1) then
|
if (iand(debug_level(debug_abaqus),debug_levelBasic) /= 0 .and. noel == 1 .and. npt == 1) then
|
||||||
!$OMP CRITICAL (write2out)
|
!$OMP CRITICAL (write2out)
|
||||||
|
@ -217,8 +225,6 @@ subroutine UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,&
|
||||||
endif
|
endif
|
||||||
|
|
||||||
else if ( dtime < theDelta ) then ! >> cutBack <<
|
else if ( dtime < theDelta ) then ! >> cutBack <<
|
||||||
|
|
||||||
cutBack = .true.
|
|
||||||
terminallyIll = .false.
|
terminallyIll = .false.
|
||||||
cycleCounter = -1 ! first calc step increments this to cycle = 0
|
cycleCounter = -1 ! first calc step increments this to cycle = 0
|
||||||
calcMode = .true. ! pretend last step was calculation
|
calcMode = .true. ! pretend last step was calculation
|
||||||
|
@ -231,6 +237,7 @@ subroutine UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,&
|
||||||
calcMode(npt,cp_en) = .not. calcMode(npt,cp_en) ! ping pong (calc <--> collect)
|
calcMode(npt,cp_en) = .not. calcMode(npt,cp_en) ! ping pong (calc <--> collect)
|
||||||
|
|
||||||
if (calcMode(npt,cp_en)) then ! now calc
|
if (calcMode(npt,cp_en)) then ! now calc
|
||||||
|
computationMode = CPFEM_CALCRESULTS
|
||||||
if ( lastMode .neqv. calcMode(npt,cp_en) ) then ! first after ping pong
|
if ( lastMode .neqv. calcMode(npt,cp_en) ) then ! first after ping pong
|
||||||
call debug_reset() ! resets debugging
|
call debug_reset() ! resets debugging
|
||||||
outdatedFFN1 = .false.
|
outdatedFFN1 = .false.
|
||||||
|
@ -238,23 +245,16 @@ subroutine UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,&
|
||||||
endif
|
endif
|
||||||
if(outdatedByNewInc) then
|
if(outdatedByNewInc) then
|
||||||
outdatedByNewInc = .false.
|
outdatedByNewInc = .false.
|
||||||
computationMode = 1 ! calc and age results
|
computationMode = ior(computationMode,CPFEM_AGERESULTS) ! calc and age results
|
||||||
else
|
|
||||||
computationMode = 2 ! plain calc
|
|
||||||
endif
|
endif
|
||||||
else ! now collect
|
else ! now collect
|
||||||
if ( lastMode .neqv. calcMode(npt,cp_en) .and. &
|
computationMode = CPFEM_COLLECT
|
||||||
.not. terminallyIll) then
|
if(lastMode .neqv. calcMode(npt,cp_en) .and. .not. terminallyIll) then
|
||||||
call debug_info() ! first after ping pong reports debugging
|
call debug_info() ! first after ping pong reports debugging
|
||||||
endif
|
endif
|
||||||
if (lastIncConverged) then
|
if (lastIncConverged) then
|
||||||
lastIncConverged = .false.
|
lastIncConverged = .false.
|
||||||
computationMode = 4 ! collect and backup Jacobian after convergence
|
computationMode = ior(computationMode,CPFEM_BACKUPJACOBIAN) ! backup Jacobian after convergence
|
||||||
elseif ( cutBack ) then
|
|
||||||
cutBack = .false.
|
|
||||||
computationMode = 5 ! collect and restore Jacobian after cutback
|
|
||||||
else
|
|
||||||
computationMode = 3 ! plain collect
|
|
||||||
endif
|
endif
|
||||||
mesh_ipCoordinates(1:3,npt,cp_en) = numerics_unitlength * COORDS
|
mesh_ipCoordinates(1:3,npt,cp_en) = numerics_unitlength * COORDS
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -16,44 +16,37 @@
|
||||||
! 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$
|
||||||
!********************************************************************
|
!--------------------------------------------------------------------------------------------------
|
||||||
! Material subroutine for MSC.Marc
|
!> @author Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH
|
||||||
!
|
!> @author Franz Roters, Max-Planck-Institut für Eisenforschung GmbH
|
||||||
! written by P. Eisenlohr,
|
!> @author Luc Hantcherli, Max-Planck-Institut für Eisenforschung GmbH
|
||||||
! F. Roters,
|
!> @author W.A. Counts
|
||||||
! L. Hantcherli,
|
!> @author Denny Tjahjanto, Max-Planck-Institut für Eisenforschung GmbH
|
||||||
! W.A. Counts
|
!> @author Christoph Kords, Max-Planck-Institut für Eisenforschung GmbH
|
||||||
! D.D. Tjahjanto
|
!> @brief Material subroutine for MSC.Marc
|
||||||
! C. Kords
|
!> @details Usage:
|
||||||
!
|
!> @details - choose material as hypela2
|
||||||
! MPI fuer Eisenforschung, Duesseldorf
|
!> @details - set statevariable 2 to index of homogenization
|
||||||
!
|
!> @details - set statevariable 3 to index of microstructure
|
||||||
!********************************************************************
|
!> @details - make sure the file "material.config" exists in the working
|
||||||
! Usage:
|
!> @details directory
|
||||||
! - choose material as hypela2
|
!> @details - make sure the file "numerics.config" exists in the working
|
||||||
! - set statevariable 2 to index of homogenization
|
!> @details directory
|
||||||
! - set statevariable 3 to index of microstructure
|
!> @details - use nonsymmetric option for solver (e.g. direct
|
||||||
! - make sure the file "material.config" exists in the working
|
!> @details profile or multifrontal sparse, the latter seems
|
||||||
! directory
|
!> @details to be faster!)
|
||||||
! - make sure the file "numerics.config" exists in the working
|
!> @details - in case of ddm (domain decomposition)a SYMMETRIC
|
||||||
! directory
|
!> @details solver has to be used, i.e uncheck "non-symmetric"
|
||||||
! - use nonsymmetric option for solver (e.g. direct
|
!> @details Marc subroutines used:
|
||||||
! profile or multifrontal sparse, the latter seems
|
!> @details - hypela2
|
||||||
! to be faster!)
|
!> @details - plotv
|
||||||
! - in case of ddm (domain decomposition)a SYMMETRIC
|
!> @details - quit
|
||||||
! solver has to be used, i.e uncheck "non-symmetric"
|
!> @details Marc common blocks included:
|
||||||
!********************************************************************
|
!> @details - concom: lovl, ncycle, inc, incsub
|
||||||
! Marc subroutines used:
|
!> @details - creeps: timinc
|
||||||
! - hypela2
|
!--------------------------------------------------------------------------------------------------
|
||||||
! - plotv
|
|
||||||
! - quit
|
|
||||||
!********************************************************************
|
|
||||||
! Marc common blocks included:
|
|
||||||
! - concom: lovl, ncycle, inc, incsub
|
|
||||||
! - creeps: timinc
|
|
||||||
!********************************************************************
|
|
||||||
|
|
||||||
#ifndef INT
|
#ifndef INT
|
||||||
#define INT 4
|
#define INT 4
|
||||||
|
@ -68,7 +61,6 @@
|
||||||
#include "prec.f90"
|
#include "prec.f90"
|
||||||
|
|
||||||
module DAMASK_interface
|
module DAMASK_interface
|
||||||
use prec, only: pInt
|
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
character(len=4), parameter :: InputFileExtension = '.dat'
|
character(len=4), parameter :: InputFileExtension = '.dat'
|
||||||
|
@ -76,24 +68,29 @@ module DAMASK_interface
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
!> @brief only output of current version
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine DAMASK_interface_init
|
subroutine DAMASK_interface_init
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
!$OMP CRITICAL (write2out)
|
!$OMP CRITICAL (write2out)
|
||||||
write(6,*)
|
write(6,'(/,a)') ' <<<+- DAMASK_marc init -+>>>'
|
||||||
write(6,*) '<<<+- DAMASK_marc init -+>>>'
|
write(6,'(a)') ' $Id$'
|
||||||
write(6,*) '$Id$'
|
|
||||||
#include "compilation_info.f90"
|
#include "compilation_info.f90"
|
||||||
!$OMP END CRITICAL (write2out)
|
!$OMP END CRITICAL (write2out)
|
||||||
|
|
||||||
end subroutine DAMASK_interface_init
|
end subroutine DAMASK_interface_init
|
||||||
|
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
!> @brief returns the current workingDir
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
function getSolverWorkingDirectoryName()
|
function getSolverWorkingDirectoryName()
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
character(1024) getSolverWorkingDirectoryName, inputName
|
character(1024) getSolverWorkingDirectoryName, inputName
|
||||||
character(len=*), parameter :: pathSep = achar(47)//achar(92) ! forward and backward slash
|
character(len=*), parameter :: pathSep = achar(47)//achar(92) ! forward and backward slash
|
||||||
|
|
||||||
|
@ -105,10 +102,16 @@ function getSolverWorkingDirectoryName()
|
||||||
|
|
||||||
end function getSolverWorkingDirectoryName
|
end function getSolverWorkingDirectoryName
|
||||||
|
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
!> @brief solver job name (no extension) as combination of geometry and load case name
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
function getSolverJobName()
|
function getSolverJobName()
|
||||||
|
use prec, only: &
|
||||||
|
pReal, &
|
||||||
|
pInt
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
character(1024) :: getSolverJobName, inputName
|
character(1024) :: getSolverJobName, inputName
|
||||||
character(len=*), parameter :: pathSep = achar(47)//achar(92) ! forward and backward slash
|
character(len=*), parameter :: pathSep = achar(47)//achar(92) ! forward and backward slash
|
||||||
integer(pInt) :: extPos
|
integer(pInt) :: extPos
|
||||||
|
@ -118,10 +121,10 @@ function getSolverJobName()
|
||||||
inquire(5, name=inputName) ! determine inputfile
|
inquire(5, name=inputName) ! determine inputfile
|
||||||
extPos = len_trim(inputName)-4
|
extPos = len_trim(inputName)-4
|
||||||
getSolverJobName=inputName(scan(inputName,pathSep,back=.true.)+1:extPos)
|
getSolverJobName=inputName(scan(inputName,pathSep,back=.true.)+1:extPos)
|
||||||
! write(6,*) 'getSolverJobName', getSolverJobName
|
|
||||||
|
|
||||||
end function getSolverJobName
|
end function getSolverJobName
|
||||||
|
|
||||||
|
|
||||||
end module DAMASK_interface
|
end module DAMASK_interface
|
||||||
|
|
||||||
#include "IO.f90"
|
#include "IO.f90"
|
||||||
|
@ -146,77 +149,70 @@ end module DAMASK_interface
|
||||||
#include "CPFEM.f90"
|
#include "CPFEM.f90"
|
||||||
|
|
||||||
|
|
||||||
!********************************************************************
|
!--------------------------------------------------------------------------------------------------
|
||||||
! This is the Marc material routine
|
!> @brief This is the MSC.Marc user subroutine for defining material behavior
|
||||||
!********************************************************************
|
!> @details CAUTION : Due to calculation of the Deformation gradients, Stretch Tensors and
|
||||||
!
|
!> @details Rotation tensors at previous and current states, the analysis can be
|
||||||
! ************* user subroutine for defining material behavior **************
|
!> @details computationally expensive. Please use the user subroutine -> hypela
|
||||||
!
|
!> @details if these kinematic quantities are not needed in the constitutive model
|
||||||
!
|
!> @details
|
||||||
! CAUTION : Due to calculation of the Deformation gradients, Stretch Tensors and
|
!> @details IMPORTANT NOTES :
|
||||||
! Rotation tensors at previous and current states, the analysis can be
|
!> @details
|
||||||
! computationally expensive. Please use the user subroutine -> hypela
|
!> @details (1) F,R,U are only available for continuum and membrane elements (not for
|
||||||
! if these kinematic quantities are not needed in the constitutive model
|
!> @details shells and beams).
|
||||||
!
|
!> @details
|
||||||
!
|
!> @details (2) For total Lagrangian formulation use the -> 'Elasticity,1' card(=
|
||||||
! IMPORTANT NOTES :
|
!> @details total Lagrange with large disp) in the parameter section of input deck.
|
||||||
!
|
!> @details For updated Lagrangian formulation use the -> 'Plasticity,3' card(=
|
||||||
! (1) F,R,U are only available for continuum and membrane elements (not for
|
!> @details update+finite+large disp+constant d) in the parameter section of
|
||||||
! shells and beams).
|
!> @details input deck.
|
||||||
!
|
!> @details
|
||||||
! (2) For total Lagrangian formulation use the -> 'Elasticity,1' card(=
|
!> @details The following operation obtains U (stretch tensor) at t=n+1 :
|
||||||
! total Lagrange with large disp) in the parameter section of input deck.
|
!> @details
|
||||||
! For updated Lagrangian formulation use the -> 'Plasticity,3' card(=
|
!> @details call scla(un1,0.d0,itel,itel,1)
|
||||||
! update+finite+large disp+constant d) in the parameter section of
|
!> @details do k=1,3
|
||||||
! input deck.
|
!> @details do i=1,3
|
||||||
!
|
!> @details do j=1,3
|
||||||
! The following operation obtains U (stretch tensor) at t=n+1 :
|
!> @details un1(i,j)=un1(i,j)+dsqrt(strechn1(k))*eigvn1(i,k)*eigvn1(j,k)
|
||||||
!
|
!> @details enddo
|
||||||
! call scla(un1,0.d0,itel,itel,1)
|
!> @details enddo
|
||||||
! do 3 k=1,3
|
!> @details enddo
|
||||||
! do 2 i=1,3
|
!--------------------------------------------------------------------------------------------------
|
||||||
! do 1 j=1,3
|
|
||||||
! un1(i,j)=un1(i,j)+dsqrt(strechn1(k))*eigvn1(i,k)*eigvn1(j,k)
|
|
||||||
!1 continue
|
|
||||||
!2 continue
|
|
||||||
!3 continue
|
|
||||||
!
|
|
||||||
!********************************************************************
|
|
||||||
subroutine hypela2(&
|
subroutine hypela2(&
|
||||||
d,& ! stress strain law to be formed
|
d,& !< stress strain law to be formed
|
||||||
g,& ! change in stress due to temperature effects
|
g,& !< change in stress due to temperature effects
|
||||||
e,& ! total elastic strain
|
e,& !< total elastic strain
|
||||||
de,& ! increment of strain
|
de,& !< increment of strain
|
||||||
s,& ! stress - should be updated by user
|
s,& !< stress - should be updated by user
|
||||||
t,& ! state variables (comes in at t=n, must be updated to have state variables at t=n+1)
|
t,& !< state variables (comes in at t=n, must be updated to have state variables at t=n+1)
|
||||||
dt,& ! increment of state variables
|
dt,& !< increment of state variables
|
||||||
ngens,& ! size of stress - strain law
|
ngens,& !< size of stress - strain law
|
||||||
n,& ! element number
|
n,& !< element number
|
||||||
nn,& ! integration point number
|
nn,& !< integration point number
|
||||||
kcus,& ! (1) layer number, (2) internal layer number
|
kcus,& !< (1) layer number, (2) internal layer number
|
||||||
matus,& ! (1) user material identification number, (2) internal material identification number
|
matus,& !< (1) user material identification number, (2) internal material identification number
|
||||||
ndi,& ! number of direct components
|
ndi,& !< number of direct components
|
||||||
nshear,& ! number of shear components
|
nshear,& !< number of shear components
|
||||||
disp,& ! incremental displacements
|
disp,& !< incremental displacements
|
||||||
dispt,& ! displacements at t=n (at assembly, lovl=4) and displacements at t=n+1 (at stress recovery, lovl=6)
|
dispt,& !< displacements at t=n (at assembly, lovl=4) and displacements at t=n+1 (at stress recovery, lovl=6)
|
||||||
coord,& ! coordinates
|
coord,& !< coordinates
|
||||||
ffn,& ! deformation gradient
|
ffn,& !< deformation gradient
|
||||||
frotn,& ! rotation tensor
|
frotn,& !< rotation tensor
|
||||||
strechn,& ! square of principal stretch ratios, lambda(i)
|
strechn,& !< square of principal stretch ratios, lambda(i)
|
||||||
eigvn,& ! i principal direction components for j eigenvalues
|
eigvn,& !< i principal direction components for j eigenvalues
|
||||||
ffn1,& ! deformation gradient
|
ffn1,& !< deformation gradient
|
||||||
frotn1,& ! rotation tensor
|
frotn1,& !< rotation tensor
|
||||||
strechn1,& ! square of principal stretch ratios, lambda(i)
|
strechn1,& !< square of principal stretch ratios, lambda(i)
|
||||||
eigvn1,& ! i principal direction components for j eigenvalues
|
eigvn1,& !< i principal direction components for j eigenvalues
|
||||||
ncrd,& ! number of coordinates
|
ncrd,& !< number of coordinates
|
||||||
itel,& ! dimension of F and R, either 2 or 3
|
itel,& !< dimension of F and R, either 2 or 3
|
||||||
ndeg,& ! number of degrees of freedom ==> is this at correct list position ?!?
|
ndeg,& !< number of degrees of freedom ==> is this at correct list position ?!?
|
||||||
ndm,& !
|
ndm,& !<
|
||||||
nnode,& ! number of nodes per element
|
nnode,& !< number of nodes per element
|
||||||
jtype,& ! element type
|
jtype,& !< element type
|
||||||
lclass,& ! element class
|
lclass,& !< element class
|
||||||
ifr,& ! set to 1 if R has been calculated
|
ifr,& !< set to 1 if R has been calculated
|
||||||
ifu & ! set to 1 if stretch has been calculated
|
ifu & !< set to 1 if stretch has been calculated
|
||||||
)
|
)
|
||||||
|
|
||||||
use prec, only: pReal, &
|
use prec, only: pReal, &
|
||||||
|
@ -244,7 +240,16 @@ subroutine hypela2(&
|
||||||
mesh_build_ipCoordinates, &
|
mesh_build_ipCoordinates, &
|
||||||
FE_Nnodes, &
|
FE_Nnodes, &
|
||||||
FE_geomtype
|
FE_geomtype
|
||||||
use CPFEM, only: CPFEM_initAll,CPFEM_general,CPFEM_init_done
|
use CPFEM, only: &
|
||||||
|
CPFEM_general, &
|
||||||
|
CPFEM_init_done, &
|
||||||
|
CPFEM_initAll, &
|
||||||
|
CPFEM_CALCRESULTS, &
|
||||||
|
CPFEM_AGERESULTS, &
|
||||||
|
CPFEM_COLLECT, &
|
||||||
|
CPFEM_RESTOREJACOBIAN, &
|
||||||
|
CPFEM_BACKUPJACOBIAN
|
||||||
|
|
||||||
!$ use numerics, only: DAMASK_NumThreadsInt ! number of threads set by DAMASK_NUM_THREADS
|
!$ use numerics, only: DAMASK_NumThreadsInt ! number of threads set by DAMASK_NUM_THREADS
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
|
@ -286,12 +291,9 @@ subroutine hypela2(&
|
||||||
|
|
||||||
!$ call omp_set_num_threads(DAMASK_NumThreadsInt) ! set number of threads for parallel execution set by DAMASK_NUM_THREADS
|
!$ call omp_set_num_threads(DAMASK_NumThreadsInt) ! set number of threads for parallel execution set by DAMASK_NUM_THREADS
|
||||||
|
|
||||||
if (lovl == 4) then ! Marc requires stiffness in separate call (lovl == 4)
|
if (lovl == 4 ) then
|
||||||
if ( timinc < theDelta .and. theInc == inc ) then ! first after cutback
|
if(timinc < theDelta .and. theInc == inc ) & ! first after cutback
|
||||||
computationMode = 7 ! --> restore tangent and return it
|
computationMode = CPFEM_RESTOREJACOBIAN
|
||||||
else
|
|
||||||
computationMode = 6 ! --> just return known tangent
|
|
||||||
endif
|
|
||||||
else ! stress requested (lovl == 6)
|
else ! stress requested (lovl == 6)
|
||||||
cp_en = mesh_FEasCP('elem',n(1))
|
cp_en = mesh_FEasCP('elem',n(1))
|
||||||
if (cptim > theTime .or. inc /= theInc) then ! reached "convergence"
|
if (cptim > theTime .or. inc /= theInc) then ! reached "convergence"
|
||||||
|
@ -346,10 +348,10 @@ subroutine hypela2(&
|
||||||
call mesh_build_ipCoordinates() ! update ip coordinates
|
call mesh_build_ipCoordinates() ! update ip coordinates
|
||||||
endif
|
endif
|
||||||
if ( outdatedByNewInc ) then
|
if ( outdatedByNewInc ) then
|
||||||
|
computationMode = ior(CPFEM_CALCRESULTS,CPFEM_AGERESULTS)
|
||||||
outdatedByNewInc = .false. ! reset flag
|
outdatedByNewInc = .false. ! reset flag
|
||||||
computationMode = 1 ! calc and age results
|
|
||||||
else
|
else
|
||||||
computationMode = 2 ! plain calc
|
computationMode = CPFEM_CALCRESULTS
|
||||||
endif
|
endif
|
||||||
else ! now --- COLLECT ---
|
else ! now --- COLLECT ---
|
||||||
if ( lastMode /= calcMode(nn,cp_en) .and. &
|
if ( lastMode /= calcMode(nn,cp_en) .and. &
|
||||||
|
@ -357,10 +359,10 @@ subroutine hypela2(&
|
||||||
call debug_info() ! first after ping pong reports (meaningful) debugging
|
call debug_info() ! first after ping pong reports (meaningful) debugging
|
||||||
endif
|
endif
|
||||||
if ( lastIncConverged ) then
|
if ( lastIncConverged ) then
|
||||||
|
computationMode = ior(CPFEM_COLLECT,CPFEM_BACKUPJACOBIAN) ! collect and backup Jacobian after convergence
|
||||||
lastIncConverged = .false. ! reset flag
|
lastIncConverged = .false. ! reset flag
|
||||||
computationMode = 4 ! collect and backup Jacobian after convergence
|
|
||||||
else
|
else
|
||||||
computationMode = 3 ! plain collect
|
computationMode = CPFEM_COLLECT ! plain collect
|
||||||
endif
|
endif
|
||||||
do node = 1,FE_Nnodes(FE_geomtype(mesh_element(2,cp_en)))
|
do node = 1,FE_Nnodes(FE_geomtype(mesh_element(2,cp_en)))
|
||||||
FEnodeID = mesh_FEasCP('node',mesh_element(4+node,cp_en))
|
FEnodeID = mesh_FEasCP('node',mesh_element(4+node,cp_en))
|
||||||
|
@ -389,27 +391,24 @@ subroutine hypela2(&
|
||||||
end subroutine hypela2
|
end subroutine hypela2
|
||||||
|
|
||||||
|
|
||||||
!********************************************************************
|
!--------------------------------------------------------------------------------------------------
|
||||||
! This routine sets user defined output variables for Marc
|
!> @brief sets user defined output variables for Marc
|
||||||
!********************************************************************
|
!> @details select a variable contour plotting (user subroutine).
|
||||||
!
|
!--------------------------------------------------------------------------------------------------
|
||||||
! select a variable contour plotting (user subroutine).
|
|
||||||
!
|
|
||||||
!********************************************************************
|
|
||||||
subroutine plotv(&
|
subroutine plotv(&
|
||||||
v,& ! variable
|
v,& !< variable
|
||||||
s,& ! stress array
|
s,& !< stress array
|
||||||
sp,& ! stresses in preferred direction
|
sp,& !< stresses in preferred direction
|
||||||
etot,& ! total strain (generalized)
|
etot,& !< total strain (generalized)
|
||||||
eplas,& ! total plastic strain
|
eplas,& !< total plastic strain
|
||||||
ecreep,& ! total creep strain
|
ecreep,& !< total creep strain
|
||||||
t,& ! current temperature
|
t,& !< current temperature
|
||||||
m,& ! element number
|
m,& !< element number
|
||||||
nn,& ! integration point number
|
nn,& !< integration point number
|
||||||
layer,& ! layer number
|
layer,& !< layer number
|
||||||
ndi,& ! number of direct stress components
|
ndi,& !< number of direct stress components
|
||||||
nshear,& ! number of shear stress components
|
nshear,& !< number of shear stress components
|
||||||
jpltcd & ! user variable index
|
jpltcd & !< user variable index
|
||||||
)
|
)
|
||||||
use prec, only: pReal,pInt
|
use prec, only: pReal,pInt
|
||||||
use mesh, only: mesh_FEasCP
|
use mesh, only: mesh_FEasCP
|
||||||
|
|
|
@ -691,7 +691,12 @@ subroutine utilities_constitutiveResponse(F_lastInc,F,temperature,timeinc,&
|
||||||
wgt, &
|
wgt, &
|
||||||
mesh_NcpElems
|
mesh_NcpElems
|
||||||
use CPFEM, only: &
|
use CPFEM, only: &
|
||||||
CPFEM_general
|
CPFEM_general, &
|
||||||
|
CPFEM_COLLECT, &
|
||||||
|
CPFEM_CALCRESULTS, &
|
||||||
|
CPFEM_AGERESULTS, &
|
||||||
|
CPFEM_BACKUPJACOBIAN, &
|
||||||
|
CPFEM_RESTOREJACOBIAN
|
||||||
use homogenization, only: &
|
use homogenization, only: &
|
||||||
materialpoint_F0, &
|
materialpoint_F0, &
|
||||||
materialpoint_F, &
|
materialpoint_F, &
|
||||||
|
@ -720,16 +725,16 @@ subroutine utilities_constitutiveResponse(F_lastInc,F,temperature,timeinc,&
|
||||||
real(pReal), dimension(6,6) :: dsde !< d sigma / d Epsilon
|
real(pReal), dimension(6,6) :: dsde !< d sigma / d Epsilon
|
||||||
|
|
||||||
write(6,'(/,a)') ' ... evaluating constitutive response ......................................'
|
write(6,'(/,a)') ' ... evaluating constitutive response ......................................'
|
||||||
|
calcMode = CPFEM_CALCRESULTS
|
||||||
|
collectMode = CPFEM_COLLECT
|
||||||
if (forwardData) then ! aging results
|
if (forwardData) then ! aging results
|
||||||
calcMode = 1_pInt
|
calcMode = ior(calcMode, CPFEM_AGERESULTS)
|
||||||
collectMode = 4_pInt
|
collectMode = ior(collectMode, CPFEM_BACKUPJACOBIAN)
|
||||||
else ! normal calculation
|
|
||||||
calcMode = 2_pInt
|
|
||||||
collectMode = 3_pInt
|
|
||||||
endif
|
endif
|
||||||
if (cutBack) then ! restore saved variables
|
if (cutBack) then ! restore saved variables
|
||||||
calcMode = 2_pInt
|
collectMode = ior(collectMode , CPFEM_RESTOREJACOBIAN)
|
||||||
collectMode = 5_pInt
|
collectMode = iand(collectMode, not(CPFEM_BACKUPJACOBIAN))
|
||||||
|
calcMode = iand(calcMode, not(CPFEM_AGERESULTS))
|
||||||
endif
|
endif
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! calculate bounds of det(F) and report
|
! calculate bounds of det(F) and report
|
||||||
|
|
|
@ -1515,9 +1515,9 @@ subroutine IO_error(error_ID,e,i,g,ext_msg)
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! user errors
|
! user errors
|
||||||
case (600_pInt)
|
case (600_pInt)
|
||||||
msg = 'Non-local plasticity and non-CP elements in model'
|
msg = 'Cannot combine Non-local plasticity and non-DAMASK elements'
|
||||||
case (601_pInt)
|
case (601_pInt)
|
||||||
msg = 'OpenMP threads > 1 and using non-CP elements'
|
msg = 'Cannot combine OpenMP threading and non-DAMASK elements'
|
||||||
|
|
||||||
!-------------------------------------------------------------------------------------------------
|
!-------------------------------------------------------------------------------------------------
|
||||||
! DAMASK_marc errors
|
! DAMASK_marc errors
|
||||||
|
|
|
@ -89,9 +89,9 @@ module crystallite
|
||||||
logical, dimension (:,:,:), allocatable, public :: &
|
logical, dimension (:,:,:), allocatable, public :: &
|
||||||
crystallite_requested !< flag to request crystallite calculation
|
crystallite_requested !< flag to request crystallite calculation
|
||||||
logical, dimension (:,:,:), allocatable, public, protected :: &
|
logical, dimension (:,:,:), allocatable, public, protected :: &
|
||||||
crystallite_converged !< convergence flag
|
crystallite_converged, & !< convergence flag
|
||||||
|
crystallite_localPlasticity !< indicates this grain to have purely local constitutive law
|
||||||
logical, dimension (:,:,:), allocatable, private :: &
|
logical, dimension (:,:,:), allocatable, private :: &
|
||||||
crystallite_localPlasticity, & !< indicates this grain to have purely local constitutive law
|
|
||||||
crystallite_todo !< flag to indicate need for further computation
|
crystallite_todo !< flag to indicate need for further computation
|
||||||
logical, dimension (:,:), allocatable, private :: &
|
logical, dimension (:,:), allocatable, private :: &
|
||||||
crystallite_clearToWindForward, &
|
crystallite_clearToWindForward, &
|
||||||
|
|
Loading…
Reference in New Issue