2011-04-04 19:39:54 +05:30
|
|
|
|
! Copyright 2011 Max-Planck-Institut f<>r Eisenforschung GmbH
|
|
|
|
|
!
|
|
|
|
|
! This file is part of DAMASK,
|
|
|
|
|
! the D<>sseldorf Advanced MAterial Simulation Kit.
|
|
|
|
|
!
|
|
|
|
|
! DAMASK is free software: you can redistribute it and/or modify
|
|
|
|
|
! it under the terms of the GNU General Public License as published by
|
|
|
|
|
! the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
! (at your option) any later version.
|
|
|
|
|
!
|
|
|
|
|
! DAMASK is distributed in the hope that it will be useful,
|
|
|
|
|
! but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
! GNU General Public License for more details.
|
|
|
|
|
!
|
|
|
|
|
! You should have received a copy of the GNU General Public License
|
|
|
|
|
! along with DAMASK. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
!
|
|
|
|
|
!##############################################################
|
2010-02-25 23:09:11 +05:30
|
|
|
|
!* $Id$
|
2010-02-18 15:53:42 +05:30
|
|
|
|
!********************************************************************
|
|
|
|
|
! Material subroutine for Abaqus
|
|
|
|
|
!
|
|
|
|
|
! written by P. Eisenlohr,
|
|
|
|
|
! F. Roters,
|
2011-03-30 20:09:28 +05:30
|
|
|
|
! K. Janssens 2,
|
|
|
|
|
! A. Prakash 3
|
2010-02-18 15:53:42 +05:30
|
|
|
|
!
|
2011-03-30 20:09:28 +05:30
|
|
|
|
! MPI fuer Eisenforschung, Duesseldorf
|
|
|
|
|
! 2 PSI, Switzerland
|
|
|
|
|
! 3 Fraunhofer IWM, Freiburg
|
2010-02-18 15:53:42 +05:30
|
|
|
|
!
|
2011-03-29 19:19:50 +05:30
|
|
|
|
! REMARK: 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 MPIE subroutine
|
|
|
|
|
! (see Abaqus documentation for more information on the use of abaqus_v6.env)
|
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-02-13 16:26:50 +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
|
|
|
|
|
2011-02-21 20:07:38 +05:30
|
|
|
|
!--------------------
|
2011-05-11 22:31:03 +05:30
|
|
|
|
subroutine DAMASK_interface_init()
|
2011-02-21 20:07:38 +05:30
|
|
|
|
!--------------------
|
2013-02-25 22:04:59 +05:30
|
|
|
|
use IO, only: IO_timeStamp
|
|
|
|
|
|
2010-02-18 15:53:42 +05:30
|
|
|
|
write(6,*)
|
2011-05-11 22:08:45 +05:30
|
|
|
|
write(6,*) '<<<+- DAMASK_abaqus init -+>>>'
|
2010-02-25 23:09:11 +05:30
|
|
|
|
write(6,*) '$Id$'
|
2013-02-25 22:04:59 +05:30
|
|
|
|
write(6,'(a16,a)') ' Current time : ',IO_timeStamp()
|
|
|
|
|
#include "compilation_info.f90"
|
2010-02-18 15:53:42 +05:30
|
|
|
|
write(6,*)
|
2012-06-15 21:40:21 +05:30
|
|
|
|
|
|
|
|
|
end subroutine DAMASK_interface_init
|
2010-02-18 15:53:42 +05:30
|
|
|
|
|
2011-02-21 20:07:38 +05:30
|
|
|
|
!--------------------
|
2010-06-08 15:05:13 +05:30
|
|
|
|
function getSolverWorkingDirectoryName()
|
2011-02-21 20:07:38 +05:30
|
|
|
|
!--------------------
|
2012-06-15 21:40:21 +05:30
|
|
|
|
use prec, only: pInt
|
|
|
|
|
|
2010-05-10 20:32:59 +05:30
|
|
|
|
implicit none
|
2010-05-11 12:27:15 +05:30
|
|
|
|
character(1024) getSolverWorkingDirectoryName
|
2010-05-10 20:32:59 +05:30
|
|
|
|
integer(pInt) LENOUTDIR
|
|
|
|
|
|
2010-05-11 12:27:15 +05:30
|
|
|
|
getSolverWorkingDirectoryName=''
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
!--------------------
|
2010-06-08 15:05:13 +05:30
|
|
|
|
function getSolverJobName()
|
2011-02-21 20:07:38 +05:30
|
|
|
|
!--------------------
|
2012-06-15 21:40:21 +05:30
|
|
|
|
use prec, only: pInt
|
|
|
|
|
|
2010-05-10 20:32:59 +05:30
|
|
|
|
implicit none
|
2010-05-11 12:27:15 +05:30
|
|
|
|
character(1024) getSolverJobName, JOBNAME
|
2010-05-10 20:32:59 +05:30
|
|
|
|
integer(pInt) LENJOBNAME
|
|
|
|
|
|
2010-05-11 12:27:15 +05:30
|
|
|
|
getSolverJobName=''
|
|
|
|
|
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"
|
|
|
|
|
#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"
|
|
|
|
|
#include "homogenization_isostrain.f90"
|
|
|
|
|
#include "homogenization_RGC.f90"
|
|
|
|
|
#include "homogenization.f90"
|
|
|
|
|
#include "CPFEM.f90"
|
2010-02-18 15:53:42 +05:30
|
|
|
|
|
|
|
|
|
subroutine vumat (jblock, 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 )
|
|
|
|
|
|
|
|
|
|
include 'vaba_param.inc'
|
|
|
|
|
|
|
|
|
|
dimension jblock(*), props(nprops), density(*), coordMp(*), &
|
|
|
|
|
charLength(*), strainInc(*), &
|
|
|
|
|
relSpinInc(*), tempOld(*), &
|
|
|
|
|
stretchOld(*), &
|
|
|
|
|
defgradOld(*), &
|
|
|
|
|
fieldOld(*), stressOld(*), &
|
|
|
|
|
stateOld(*), enerInternOld(*), &
|
|
|
|
|
enerInelasOld(*), tempNew(*), &
|
|
|
|
|
stretchNew(*), &
|
|
|
|
|
defgradNew(*), &
|
|
|
|
|
fieldNew(*), &
|
|
|
|
|
stressNew(*), stateNew(*), &
|
|
|
|
|
enerInternNew(*), enerInelasNew(*)
|
|
|
|
|
|
2012-08-28 21:38:17 +05:30
|
|
|
|
character(80) cmname
|
2010-02-18 15:53:42 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
call vumatXtrArg ( jblock(1), &
|
|
|
|
|
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, &
|
|
|
|
|
jblock(5), jblock(2))
|
|
|
|
|
|
2012-06-15 21:40:21 +05:30
|
|
|
|
end subroutine vumat
|
2010-02-18 15:53:42 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subroutine vumatXtrArg (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, &
|
|
|
|
|
nElement, nMatPoint)
|
|
|
|
|
|
|
|
|
|
use prec, only: pReal, &
|
|
|
|
|
pInt
|
2012-11-14 20:08:10 +05:30
|
|
|
|
use numerics, only: numerics_unitlength
|
2010-02-18 15:53:42 +05:30
|
|
|
|
use FEsolving, only: cycleCounter, &
|
|
|
|
|
theTime, &
|
|
|
|
|
outdatedByNewInc, &
|
|
|
|
|
outdatedFFN1, &
|
|
|
|
|
terminallyIll, &
|
|
|
|
|
symmetricSolver
|
|
|
|
|
use math, only: invnrmMandel
|
|
|
|
|
use debug, only: debug_info, &
|
2010-03-25 13:57:42 +05:30
|
|
|
|
debug_reset, &
|
2012-03-20 23:31:31 +05:30
|
|
|
|
debug_levelBasic, &
|
2012-07-05 15:24:50 +05:30
|
|
|
|
debug_level, &
|
2012-03-20 23:31:31 +05:30
|
|
|
|
debug_abaqus
|
2012-11-14 20:08:10 +05:30
|
|
|
|
use mesh, only: mesh_FEasCP, &
|
|
|
|
|
mesh_ipCoordinates
|
2011-03-07 18:19:27 +05:30
|
|
|
|
use CPFEM, only: CPFEM_general,CPFEM_init_done, CPFEM_initAll
|
2010-02-18 15:53:42 +05:30
|
|
|
|
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.
|
|
|
|
|
! symbolic linking switches between .._sp.inc and .._dp.inc for both consecutive compilations...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dimension props(nprops), density(nblock), &
|
|
|
|
|
strainInc(nblock,ndir+nshr), &
|
|
|
|
|
relSpinInc(nblock,nshr), defgradOld(nblock,ndir+nshr+nshr), &
|
|
|
|
|
stressOld(nblock,ndir+nshr), &
|
|
|
|
|
stateOld(nblock,nstatev), enerInternOld(nblock), &
|
|
|
|
|
enerInelasOld(nblock), tempNew(nblock), tempOld(nblock), &
|
|
|
|
|
stretchNew(nblock,ndir+nshr), defgradNew(nblock,ndir+nshr+nshr), &
|
2011-05-24 21:27:59 +05:30
|
|
|
|
stressNew(nblock,ndir+nshr), coordMp(nblock,3)
|
2010-02-18 15:53:42 +05:30
|
|
|
|
|
|
|
|
|
dimension enerInelasNew(nblock),stateNew(nblock,nstatev),enerInternNew(nblock)
|
|
|
|
|
dimension nElement(nblock),nMatPoint(nblock)
|
|
|
|
|
|
2012-08-28 21:38:17 +05:30
|
|
|
|
character(80) cmname
|
2010-07-07 15:28:18 +05:30
|
|
|
|
real(pReal), dimension (3,3) :: pstress ! not used, but needed for call of cpfem_general
|
|
|
|
|
real(pReal), dimension (3,3,3,3) :: dPdF ! not used, but needed for call of cpfem_general
|
2010-02-18 15:53:42 +05:30
|
|
|
|
! local variables
|
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
|
|
|
|
|
real(pReal) temp, timeInc
|
2012-11-14 20:08:10 +05:30
|
|
|
|
integer(pInt) computationMode, n, i, cp_en
|
2012-10-02 18:16:58 +05:30
|
|
|
|
logical :: cutBack
|
2010-02-18 15:53:42 +05:30
|
|
|
|
|
|
|
|
|
do n = 1,nblock ! 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
|
2011-03-07 18:19:27 +05:30
|
|
|
|
call CPFEM_initAll(temp,nElement(n),nMatPoint(n))
|
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)
|
2012-08-28 21:38:17 +05:30
|
|
|
|
write(6,'(i8,1x,i2,1x,a)') nElement(n),nMatPoint(n),'first call special case..!'; call flush(6)
|
2010-03-25 13:57:42 +05:30
|
|
|
|
!$OMP END CRITICAL (write2out)
|
|
|
|
|
endif
|
2010-02-18 15:53:42 +05:30
|
|
|
|
|
|
|
|
|
else if (theTime < totalTime) then ! reached convergence
|
|
|
|
|
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)
|
2012-08-28 21:38:17 +05:30
|
|
|
|
write (6,'(i8,1x,i2,1x,a)') nElement(n),nMatPoint(n),'lastIncConverged + outdated'; call 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.
|
|
|
|
|
cycleCounter = 1
|
|
|
|
|
if ( outdatedByNewInc ) then
|
|
|
|
|
outdatedByNewInc = .false.
|
|
|
|
|
call debug_info() ! first after new inc reports debugging
|
|
|
|
|
call debug_reset() ! resets debugging
|
|
|
|
|
computationMode = 8 ! calc and age results with implicit collection
|
|
|
|
|
else
|
|
|
|
|
computationMode = 9 ! plain calc with implicit collection
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
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)
|
2012-08-28 21:38:17 +05:30
|
|
|
|
write(6,'(a16,1x,i2,1x,a,i8,1x,i5,a)') 'computationMode',computationMode,'(',nElement(n),nMatPoint(n),')'; call flush(6)
|
2010-03-25 13:57:42 +05:30
|
|
|
|
!$OMP END CRITICAL (write2out)
|
|
|
|
|
endif
|
2010-02-18 15:53:42 +05:30
|
|
|
|
|
2010-03-25 13:57:42 +05:30
|
|
|
|
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)
|
|
|
|
|
endif
|
|
|
|
|
|
2012-11-14 20:08:10 +05:30
|
|
|
|
cp_en = mesh_FEasCP('elem',nElement(n))
|
|
|
|
|
mesh_ipCoordinates(1:3,n,cp_en) = numerics_unitlength * coordMp(n,1:3)
|
|
|
|
|
|
|
|
|
|
call CPFEM_general(computationMode,defgrd0,defgrd1,temp,timeInc,cp_en,nMatPoint(n),stress,ddsdde, pstress, dPdF)
|
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)
|
|
|
|
|
|
|
|
|
|
stateNew(n,:) = materialpoint_results(1:min(nstatev,materialpoint_sizeResults),nMatPoint(n),mesh_FEasCP('elem', nElement(n)))
|
|
|
|
|
tempNew(n) = temp
|
|
|
|
|
|
|
|
|
|
enddo
|
|
|
|
|
|
2012-06-15 21:40:21 +05:30
|
|
|
|
end subroutine vumatXtrArg
|
2010-02-18 15:53:42 +05:30
|
|
|
|
|
|
|
|
|
!********************************************************************
|
|
|
|
|
! This subroutine replaces the corresponding Marc subroutine
|
|
|
|
|
!********************************************************************
|
|
|
|
|
subroutine quit(mpie_error)
|
|
|
|
|
|
2012-06-15 21:40:21 +05:30
|
|
|
|
use prec, only: pInt
|
|
|
|
|
|
2010-02-18 15:53:42 +05:30
|
|
|
|
implicit none
|
|
|
|
|
integer(pInt) mpie_error
|
|
|
|
|
|
|
|
|
|
call xit
|
2012-10-02 18:16:58 +05:30
|
|
|
|
flush(6)
|
2012-06-15 21:40:21 +05:30
|
|
|
|
end subroutine quit
|