2013-03-25 19:22:22 +05:30
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
|
! $Id$
|
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
|
!> @author Philip Eisenlohr, Max-Planck-Institut f<>r Eisenforschung GmbH
|
|
|
|
|
!> @author Franz Roters, Max-Planck-Institut f<>r Eisenforschung GmbH
|
|
|
|
|
!> @author Koen Janssens, Paul Scherrer Institut
|
|
|
|
|
!> @author Arun Prakash, Fraunhofer IWM
|
2013-03-25 23:15:58 +05:30
|
|
|
|
!> @brief interfaces DAMASK with Abaqus/Explicit
|
|
|
|
|
!> @details put the included file abaqus_v6.env in either your home or model directory,
|
|
|
|
|
!> it is a minimum Abaqus environment file containing all changes necessary to use the
|
|
|
|
|
!> DAMASK subroutine (see Abaqus documentation for more information on the use of abaqus_v6.env)
|
2013-03-25 19:22:22 +05:30
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
2010-02-18 15:53:42 +05:30
|
|
|
|
|
2012-08-28 21:38:17 +05:30
|
|
|
|
#ifndef INT
|
|
|
|
|
#define INT 4
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef FLOAT
|
|
|
|
|
#define FLOAT 8
|
|
|
|
|
#endif
|
|
|
|
|
|
2012-06-15 21:40:21 +05:30
|
|
|
|
#define Abaqus
|
2010-05-10 20:32:59 +05:30
|
|
|
|
|
2012-08-28 21:38:17 +05:30
|
|
|
|
#include "prec.f90"
|
|
|
|
|
|
2012-06-15 21:40:21 +05:30
|
|
|
|
module DAMASK_interface
|
2010-05-10 20:32:59 +05:30
|
|
|
|
|
2012-06-15 21:40:21 +05:30
|
|
|
|
implicit none
|
2013-03-25 19:22:22 +05:30
|
|
|
|
character(len=4), dimension(2), parameter :: INPUTFILEEXTENSION = ['.pes','.inp']
|
|
|
|
|
character(len=4), parameter :: LOGFILEEXTENSION = '.log'
|
2010-02-18 15:53:42 +05:30
|
|
|
|
|
2012-06-15 21:40:21 +05:30
|
|
|
|
contains
|
2010-02-18 15:53:42 +05:30
|
|
|
|
|
2013-03-25 19:22:22 +05:30
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
|
!> @brief just reporting
|
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
2011-05-11 22:31:03 +05:30
|
|
|
|
subroutine DAMASK_interface_init()
|
2013-02-26 18:19:07 +05:30
|
|
|
|
|
2013-03-25 19:22:22 +05:30
|
|
|
|
write(6,'(/,a)') ' <<<+- DAMASK_abaqus init -+>>>'
|
|
|
|
|
write(6,'(a)') ' $Id$'
|
2013-02-25 22:04:59 +05:30
|
|
|
|
#include "compilation_info.f90"
|
2012-06-15 21:40:21 +05:30
|
|
|
|
|
|
|
|
|
end subroutine DAMASK_interface_init
|
2010-02-18 15:53:42 +05:30
|
|
|
|
|
2013-03-25 19:22:22 +05:30
|
|
|
|
|
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
2013-03-25 23:15:58 +05:30
|
|
|
|
!> @brief using Abaqus/Explicit function to get working directory name
|
2013-03-25 19:22:22 +05:30
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
|
character(1024) function getSolverWorkingDirectoryName()
|
2012-06-15 21:40:21 +05:30
|
|
|
|
|
2010-05-10 20:32:59 +05:30
|
|
|
|
implicit none
|
2013-03-25 23:15:58 +05:30
|
|
|
|
integer :: lenOutDir
|
2010-05-10 20:32:59 +05:30
|
|
|
|
|
2010-05-11 12:27:15 +05:30
|
|
|
|
getSolverWorkingDirectoryName=''
|
2013-03-25 23:15:58 +05:30
|
|
|
|
call vgetOutDir(getSolverWorkingDirectoryName, lenOutDir)
|
2011-03-03 15:59:59 +05:30
|
|
|
|
getSolverWorkingDirectoryName=trim(getSolverWorkingDirectoryName)//'/'
|
2012-06-15 21:40:21 +05:30
|
|
|
|
|
|
|
|
|
end function getSolverWorkingDirectoryName
|
2011-02-21 20:07:38 +05:30
|
|
|
|
|
2013-03-25 19:22:22 +05:30
|
|
|
|
|
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
2013-03-25 23:15:58 +05:30
|
|
|
|
!> @brief using Abaqus/Explicit function to get solver job name
|
2013-03-25 19:22:22 +05:30
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
|
character(1024) function getSolverJobName()
|
2013-03-25 23:15:58 +05:30
|
|
|
|
|
2010-05-10 20:32:59 +05:30
|
|
|
|
implicit none
|
2013-03-25 23:15:58 +05:30
|
|
|
|
integer :: lenJobName
|
2010-05-10 20:32:59 +05:30
|
|
|
|
|
2010-05-11 12:27:15 +05:30
|
|
|
|
getSolverJobName=''
|
2013-03-25 23:15:58 +05:30
|
|
|
|
call vGetJobName(getSolverJobName, lenJobName)
|
2012-06-15 21:40:21 +05:30
|
|
|
|
|
|
|
|
|
end function getSolverJobName
|
2010-05-10 20:32:59 +05:30
|
|
|
|
|
2012-06-15 21:40:21 +05:30
|
|
|
|
end module DAMASK_interface
|
2010-02-18 15:53:42 +05:30
|
|
|
|
|
2011-03-29 12:57:19 +05:30
|
|
|
|
#include "IO.f90"
|
2013-04-18 22:10:49 +05:30
|
|
|
|
#include "libs.f90"
|
2011-03-29 12:57:19 +05:30
|
|
|
|
#include "numerics.f90"
|
|
|
|
|
#include "debug.f90"
|
|
|
|
|
#include "math.f90"
|
|
|
|
|
#include "FEsolving.f90"
|
|
|
|
|
#include "mesh.f90"
|
|
|
|
|
#include "material.f90"
|
|
|
|
|
#include "lattice.f90"
|
2012-08-25 00:51:39 +05:30
|
|
|
|
#include "constitutive_none.f90"
|
2011-03-29 12:57:19 +05:30
|
|
|
|
#include "constitutive_j2.f90"
|
|
|
|
|
#include "constitutive_phenopowerlaw.f90"
|
|
|
|
|
#include "constitutive_titanmod.f90"
|
|
|
|
|
#include "constitutive_dislotwin.f90"
|
|
|
|
|
#include "constitutive_nonlocal.f90"
|
|
|
|
|
#include "constitutive.f90"
|
|
|
|
|
#include "crystallite.f90"
|
2014-03-14 04:50:50 +05:30
|
|
|
|
#include "homogenization_none.f90"
|
2011-03-29 12:57:19 +05:30
|
|
|
|
#include "homogenization_isostrain.f90"
|
|
|
|
|
#include "homogenization_RGC.f90"
|
|
|
|
|
#include "homogenization.f90"
|
|
|
|
|
#include "CPFEM.f90"
|
2010-02-18 15:53:42 +05:30
|
|
|
|
|
2013-03-25 23:15:58 +05:30
|
|
|
|
subroutine vumat(nBlock, nDir, nshr, nStateV, nFieldV, nProps, lAnneal, &
|
|
|
|
|
stepTime, totalTime, dt, cmName, coordMp, charLength, &
|
|
|
|
|
props, density, strainInc, relSpinInc, &
|
|
|
|
|
tempOld, stretchOld, defgradOld, fieldOld, &
|
|
|
|
|
stressOld, stateOld, enerInternOld, enerInelasOld, &
|
|
|
|
|
tempNew, stretchNew, defgradNew, fieldNew, &
|
|
|
|
|
stressNew, stateNew, enerInternNew, enerInelasNew)
|
|
|
|
|
use prec, only: &
|
|
|
|
|
pReal, &
|
|
|
|
|
pInt
|
2013-03-21 22:54:58 +05:30
|
|
|
|
use FEsolving, only: &
|
|
|
|
|
cycleCounter, &
|
|
|
|
|
theTime, &
|
|
|
|
|
outdatedByNewInc, &
|
|
|
|
|
outdatedFFN1, &
|
|
|
|
|
terminallyIll, &
|
|
|
|
|
symmetricSolver
|
|
|
|
|
use math, only: &
|
|
|
|
|
invnrmMandel
|
|
|
|
|
use debug, only: &
|
|
|
|
|
debug_info, &
|
|
|
|
|
debug_reset, &
|
|
|
|
|
debug_levelBasic, &
|
|
|
|
|
debug_level, &
|
|
|
|
|
debug_abaqus
|
|
|
|
|
use mesh, only: &
|
2013-05-17 22:22:19 +05:30
|
|
|
|
mesh_unitlength, &
|
2013-03-21 22:54:58 +05:30
|
|
|
|
mesh_FEasCP, &
|
|
|
|
|
mesh_ipCoordinates
|
2013-03-01 17:18:29 +05:30
|
|
|
|
use CPFEM, only: &
|
|
|
|
|
CPFEM_general, &
|
|
|
|
|
CPFEM_init_done, &
|
|
|
|
|
CPFEM_initAll, &
|
|
|
|
|
CPFEM_CALCRESULTS, &
|
2013-08-02 16:50:11 +05:30
|
|
|
|
CPFEM_AGERESULTS
|
2013-03-21 22:54:58 +05:30
|
|
|
|
use homogenization, only: &
|
|
|
|
|
materialpoint_sizeResults, &
|
|
|
|
|
materialpoint_results
|
2010-02-18 15:53:42 +05:30
|
|
|
|
|
2013-03-21 22:54:58 +05:30
|
|
|
|
implicit none
|
2013-03-25 23:15:58 +05:30
|
|
|
|
integer(pInt), intent(in) :: &
|
|
|
|
|
nDir, & !< number of direct components in a symmetric tensor
|
|
|
|
|
nshr, & !< number of indirect components in a symmetric tensor
|
|
|
|
|
nStateV, & !< number of user-defined state variables that are associated with this material type
|
|
|
|
|
nFieldV, & !< number of user-defined external field variables
|
|
|
|
|
nprops, & !< user-specified number of user-defined material properties
|
|
|
|
|
lAnneal !< indicating whether the routine is being called during an annealing process
|
|
|
|
|
integer(pInt), dimension(*), intent(in) :: &
|
|
|
|
|
nBlock !< 1: No of Materialpoints in this call, 2: No of Materialpoint (IP)
|
2013-03-26 00:06:21 +05:30
|
|
|
|
!< 3: No of layer, 4: No of secPoint, 5+: element numbers
|
2013-03-25 23:15:58 +05:30
|
|
|
|
character(len=80), intent(in) :: &
|
|
|
|
|
cmname !< uses-specified material name, left justified
|
|
|
|
|
real(pReal), dimension(nprops), intent(in) :: &
|
|
|
|
|
props !< user-supplied material properties
|
|
|
|
|
real(pReal), intent(in) :: &
|
|
|
|
|
stepTime, & !< value of time since the step began
|
|
|
|
|
totalTime, & !< value of total time
|
|
|
|
|
dt !< time increment size
|
|
|
|
|
real(pReal), dimension(nblock(1)), intent(in) :: &
|
|
|
|
|
density, & !< current density at material points in the midstep configuration
|
|
|
|
|
charLength, & !< characteristic element length
|
|
|
|
|
enerInternOld, &
|
|
|
|
|
enerInelasOld, &
|
|
|
|
|
tempOld, & !< temperature
|
|
|
|
|
tempNew
|
|
|
|
|
real(pReal), dimension(nblock(1),*), intent(in) :: &
|
|
|
|
|
coordMp !< material point coordinates
|
|
|
|
|
real(pReal), dimension(nblock(1),ndir+nshr), intent(in) :: &
|
|
|
|
|
strainInc, & !< strain increment tensor at each material point
|
|
|
|
|
stretchOld, & !< stretch tensor U at each material point
|
|
|
|
|
stretchNew, & !< stretch tensor U at each material point
|
|
|
|
|
stressOld !< stress tensor at each material point
|
|
|
|
|
real(pReal), dimension(nblock(1),nshr), intent(in) :: &
|
|
|
|
|
relSpinInc !< incremental relative rotation vector
|
|
|
|
|
real(pReal), dimension(nblock(1),nstatev), intent(in) :: &
|
|
|
|
|
stateOld
|
|
|
|
|
real(pReal), dimension(nblock(1),nfieldv), intent(in) :: &
|
|
|
|
|
fieldOld, & !< user-defined field variables
|
|
|
|
|
fieldNew !< user-defined field variables
|
|
|
|
|
real(pReal), dimension(nblock(1),ndir+2*nshr), intent(in) :: &
|
|
|
|
|
defgradOld, &
|
|
|
|
|
defgradNew
|
|
|
|
|
real(pReal), dimension(nblock(1)), intent(out) :: &
|
|
|
|
|
enerInternNew, & !< internal energy per unit mass at each material point at the end of the increment
|
|
|
|
|
enerInelasNew !< dissipated inelastic energy per unit mass at each material point at the end of the increment
|
|
|
|
|
real(pReal), dimension(nblock(1),ndir+nshr), intent(out) :: &
|
|
|
|
|
stressNew !< stress tensor at each material point at the end of the increment
|
|
|
|
|
real(pReal), dimension(nblock(1),nstatev), intent(out) :: &
|
|
|
|
|
stateNew !< state variables at each material point at the end of the increment
|
|
|
|
|
|
2011-09-13 19:45:17 +05:30
|
|
|
|
real(pReal), dimension(3) :: coordinates
|
2010-02-18 15:53:42 +05:30
|
|
|
|
real(pReal), dimension(3,3) :: defgrd0,defgrd1
|
|
|
|
|
real(pReal), dimension(6) :: stress
|
|
|
|
|
real(pReal), dimension(6,6) :: ddsdde
|
2013-03-25 23:15:58 +05:30
|
|
|
|
real(pReal) :: temp, timeInc
|
|
|
|
|
integer(pInt) :: computationMode, n, i, cp_en
|
2010-02-18 15:53:42 +05:30
|
|
|
|
|
2013-08-02 16:50:11 +05:30
|
|
|
|
computationMode = CPFEM_CALCRESULTS ! always calculate
|
2013-03-25 23:15:58 +05:30
|
|
|
|
do n = 1,nblock(1) ! loop over vector of IPs
|
2011-03-07 18:19:27 +05:30
|
|
|
|
temp = tempOld(n)
|
2010-02-18 15:53:42 +05:30
|
|
|
|
if ( .not. CPFEM_init_done ) then
|
2013-03-26 00:32:12 +05:30
|
|
|
|
call CPFEM_initAll(temp,nBlock(4_pInt+n),nBlock(2))
|
2010-02-18 15:53:42 +05:30
|
|
|
|
outdatedByNewInc = .false.
|
|
|
|
|
|
2012-07-05 15:24:50 +05:30
|
|
|
|
if (iand(debug_level(debug_abaqus),debug_levelBasic) /= 0) then
|
2010-03-25 13:57:42 +05:30
|
|
|
|
!$OMP CRITICAL (write2out)
|
2013-03-26 00:32:12 +05:30
|
|
|
|
write(6,'(i8,1x,i2,1x,a)') nBlock(4_pInt+n),nBlock(2),'first call special case..!'; flush(6)
|
2010-03-25 13:57:42 +05:30
|
|
|
|
!$OMP END CRITICAL (write2out)
|
|
|
|
|
endif
|
2013-03-25 23:15:58 +05:30
|
|
|
|
else if (theTime < totalTime) then ! reached convergence
|
2010-02-18 15:53:42 +05:30
|
|
|
|
outdatedByNewInc = .true.
|
|
|
|
|
|
2012-07-05 15:24:50 +05:30
|
|
|
|
if (iand(debug_level(debug_abaqus),debug_levelBasic) /= 0) then
|
2010-03-25 13:57:42 +05:30
|
|
|
|
!$OMP CRITICAL (write2out)
|
2013-03-26 00:32:12 +05:30
|
|
|
|
write (6,'(i8,1x,i2,1x,a)') nBlock(4_pInt+n),nBlock(2),'lastIncConverged + outdated'; flush(6)
|
2010-03-25 13:57:42 +05:30
|
|
|
|
!$OMP END CRITICAL (write2out)
|
|
|
|
|
endif
|
2010-02-18 15:53:42 +05:30
|
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
outdatedFFN1 = .false.
|
|
|
|
|
terminallyIll = .false.
|
2013-03-21 22:54:58 +05:30
|
|
|
|
cycleCounter = 1_pInt
|
2010-02-18 15:53:42 +05:30
|
|
|
|
if ( outdatedByNewInc ) then
|
|
|
|
|
outdatedByNewInc = .false.
|
2013-03-25 23:15:58 +05:30
|
|
|
|
call debug_info() ! first after new inc reports debugging
|
|
|
|
|
call debug_reset() ! resets debugging
|
|
|
|
|
computationMode = ior(computationMode, CPFEM_AGERESULTS) ! age results
|
2010-02-18 15:53:42 +05:30
|
|
|
|
endif
|
|
|
|
|
|
2013-03-25 23:15:58 +05:30
|
|
|
|
theTime = totalTime ! record current starting time
|
2012-07-05 15:24:50 +05:30
|
|
|
|
if (iand(debug_level(debug_abaqus),debug_levelBasic) /= 0) then
|
2010-03-25 13:57:42 +05:30
|
|
|
|
!$OMP CRITICAL (write2out)
|
2013-03-26 00:32:12 +05:30
|
|
|
|
write(6,'(a,i8,i2,a)') '(',nBlock(4_pInt+n),nBlock(2),')'; flush(6)
|
2013-03-01 17:18:29 +05:30
|
|
|
|
write(6,'(a,l1)') 'Aging Results: ', iand(computationMode, CPFEM_AGERESULTS) /= 0_pInt
|
2010-03-25 13:57:42 +05:30
|
|
|
|
!$OMP END CRITICAL (write2out)
|
|
|
|
|
endif
|
|
|
|
|
defgrd0 = 0.0_pReal
|
|
|
|
|
defgrd1 = 0.0_pReal
|
|
|
|
|
timeInc = dt
|
2010-02-18 15:53:42 +05:30
|
|
|
|
|
|
|
|
|
! ABAQUS explicit: deformation gradient as vector 11, 22, 33, 12, 23, 31, 21, 32, 13
|
|
|
|
|
! ABAQUS explicit: deformation gradient as vector 11, 22, 33, 12, 21
|
|
|
|
|
|
|
|
|
|
forall (i=1:ndir)
|
|
|
|
|
defgrd0(i,i) = defgradOld(n,i)
|
|
|
|
|
defgrd1(i,i) = defgradNew(n,i)
|
|
|
|
|
end forall
|
|
|
|
|
if (nshr == 1) then
|
|
|
|
|
defgrd0(1,2) = defgradOld(n,4)
|
|
|
|
|
defgrd1(1,2) = defgradNew(n,4)
|
|
|
|
|
defgrd0(2,1) = defgradOld(n,5)
|
|
|
|
|
defgrd1(2,1) = defgradNew(n,5)
|
|
|
|
|
else
|
|
|
|
|
defgrd0(1,2) = defgradOld(n,4)
|
|
|
|
|
defgrd1(1,2) = defgradNew(n,4)
|
|
|
|
|
defgrd0(1,3) = defgradOld(n,9)
|
|
|
|
|
defgrd1(1,3) = defgradNew(n,9)
|
|
|
|
|
defgrd0(2,1) = defgradOld(n,7)
|
|
|
|
|
defgrd1(2,1) = defgradNew(n,7)
|
|
|
|
|
defgrd0(2,3) = defgradOld(n,5)
|
|
|
|
|
defgrd1(2,3) = defgradNew(n,5)
|
|
|
|
|
defgrd0(3,1) = defgradOld(n,6)
|
|
|
|
|
defgrd1(3,1) = defgradNew(n,6)
|
|
|
|
|
defgrd0(3,2) = defgradOld(n,8)
|
|
|
|
|
defgrd1(3,2) = defgradNew(n,8)
|
2013-03-25 23:15:58 +05:30
|
|
|
|
|
2010-02-18 15:53:42 +05:30
|
|
|
|
endif
|
2013-03-26 00:32:12 +05:30
|
|
|
|
cp_en = mesh_FEasCP('elem',nBlock(4_pInt+n))
|
2013-05-17 22:22:19 +05:30
|
|
|
|
mesh_ipCoordinates(1:3,n,cp_en) = mesh_unitlength * coordMp(n,1:3)
|
2012-11-14 20:08:10 +05:30
|
|
|
|
|
2013-08-02 16:50:11 +05:30
|
|
|
|
call CPFEM_general(computationMode,.false.,defgrd0,defgrd1,temp,timeInc,cp_en,nBlock(2),stress,ddsdde)
|
2010-02-18 15:53:42 +05:30
|
|
|
|
|
|
|
|
|
! Mandel: 11, 22, 33, SQRT(2)*12, SQRT(2)*23, SQRT(2)*13
|
|
|
|
|
! straight: 11, 22, 33, 12, 23, 13
|
|
|
|
|
! ABAQUS implicit: 11, 22, 33, 12, 13, 23
|
|
|
|
|
! ABAQUS explicit: 11, 22, 33, 12, 23, 13
|
|
|
|
|
! ABAQUS explicit: 11, 22, 33, 12
|
|
|
|
|
|
|
|
|
|
stressNew(n,1:ndir+nshr) = stress(1:ndir+nshr)*invnrmMandel(1:ndir+nshr)
|
2013-03-26 00:32:12 +05:30
|
|
|
|
stateNew(n,:) = materialpoint_results(1:min(nstatev,materialpoint_sizeResults),&
|
|
|
|
|
nBlock(2),mesh_FEasCP('elem', nBlock(4_pInt+n)))
|
2010-02-18 15:53:42 +05:30
|
|
|
|
|
|
|
|
|
enddo
|
|
|
|
|
|
2013-03-25 23:15:58 +05:30
|
|
|
|
end subroutine vumat
|
2010-02-18 15:53:42 +05:30
|
|
|
|
|
2013-03-25 23:15:58 +05:30
|
|
|
|
|
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
|
!> @brief calls the exit function of Abaqus/Explicit
|
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
2013-03-25 19:22:22 +05:30
|
|
|
|
subroutine quit(mpie_error)
|
2013-03-25 23:15:58 +05:30
|
|
|
|
use prec, only: &
|
|
|
|
|
pInt
|
2012-06-15 21:40:21 +05:30
|
|
|
|
|
2010-02-18 15:53:42 +05:30
|
|
|
|
implicit none
|
|
|
|
|
integer(pInt) mpie_error
|
2013-03-25 19:22:22 +05:30
|
|
|
|
|
2012-10-02 18:16:58 +05:30
|
|
|
|
flush(6)
|
2013-03-25 19:22:22 +05:30
|
|
|
|
call xplb_exit
|
|
|
|
|
|
|
|
|
|
end subroutine quit
|