Abaqus explicit now with correct interface, seems to work now
This commit is contained in:
parent
57034c267f
commit
2a6f66d504
|
@ -122,30 +122,49 @@ end module DAMASK_interface
|
||||||
#include "CPFEM.f90"
|
#include "CPFEM.f90"
|
||||||
|
|
||||||
subroutine vumat (jblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal, &
|
subroutine vumat (jblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal, &
|
||||||
stepTime, totalTime, dt, cmname, coordMp, charLength, &
|
stepTime, totalTime, dt, cmname, coordMp, charLength, &
|
||||||
props, density, strainInc, relSpinInc, &
|
props, density, strainInc, relSpinInc, &
|
||||||
tempOld, stretchOld, defgradOld, fieldOld, &
|
tempOld, stretchOld, defgradOld, fieldOld, &
|
||||||
stressOld, stateOld, enerInternOld, enerInelasOld, &
|
stressOld, stateOld, enerInternOld, enerInelasOld, &
|
||||||
tempNew, stretchNew, defgradNew, fieldNew, &
|
tempNew, stretchNew, defgradNew, fieldNew, &
|
||||||
stressNew, stateNew, enerInternNew, enerInelasNew )
|
stressNew, stateNew, enerInternNew, enerInelasNew )
|
||||||
|
|
||||||
include 'vaba_param.inc'
|
use prec, only: pInt, pReal
|
||||||
|
|
||||||
dimension jblock(*), props(nprops), density(*), coordMp(*), &
|
implicit none
|
||||||
charLength(*), strainInc(*), &
|
|
||||||
relSpinInc(*), tempOld(*), &
|
integer(pInt) ndir, nshr, nstatev, nfieldv, nprops, lanneal
|
||||||
stretchOld(*), &
|
|
||||||
defgradOld(*), &
|
real(pReal) stepTime, totalTime, dt
|
||||||
fieldOld(*), stressOld(*), &
|
|
||||||
stateOld(*), enerInternOld(*), &
|
|
||||||
enerInelasOld(*), tempNew(*), &
|
|
||||||
stretchNew(*), &
|
|
||||||
defgradNew(*), &
|
|
||||||
fieldNew(*), &
|
|
||||||
stressNew(*), stateNew(*), &
|
|
||||||
enerInternNew(*), enerInelasNew(*)
|
|
||||||
|
|
||||||
character(80) cmname
|
integer(pInt), dimension(5) :: jblock
|
||||||
|
real(pReal), dimension(nprops) :: props(nprops)
|
||||||
|
real(pReal), dimension(jblock(1)) :: &
|
||||||
|
density, &
|
||||||
|
charLength, &
|
||||||
|
enerInternOld, &
|
||||||
|
enerInternNew, &
|
||||||
|
enerInelasOld, &
|
||||||
|
enerInelasNew, &
|
||||||
|
tempOld, &
|
||||||
|
tempNew
|
||||||
|
|
||||||
|
real(pReal):: &
|
||||||
|
strainInc(jblock(1),ndir+nshr), &
|
||||||
|
relSpinInc(jblock(1),nshr), &
|
||||||
|
coordMp(jblock(1),3), &
|
||||||
|
defgradOld(jblock(1),ndir+nshr+nshr), &
|
||||||
|
defgradNew(jblock(1),ndir+nshr+nshr), &
|
||||||
|
stressOld(jblock(1),ndir+nshr), &
|
||||||
|
stressNew(jblock(1),ndir+nshr), &
|
||||||
|
fieldOld(jblock(1),nfieldv), &
|
||||||
|
fieldNew(jblock(1),nfieldv), &
|
||||||
|
stateOld(jblock(1),nstatev), &
|
||||||
|
stateNew(jblock(1),nstatev), &
|
||||||
|
stretchOld(jblock(1),ndir+nshr), &
|
||||||
|
stretchNew(jblock(1),ndir+nshr)
|
||||||
|
|
||||||
|
character(80) :: cmname
|
||||||
|
|
||||||
|
|
||||||
call vumatXtrArg ( jblock(1), &
|
call vumatXtrArg ( jblock(1), &
|
||||||
|
@ -173,20 +192,24 @@ subroutine vumat (jblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal, &
|
||||||
use prec, only: pReal, &
|
use prec, only: pReal, &
|
||||||
pInt
|
pInt
|
||||||
use numerics, only: numerics_unitlength
|
use numerics, only: numerics_unitlength
|
||||||
use FEsolving, only: cycleCounter, &
|
use FEsolving, only: &
|
||||||
theTime, &
|
cycleCounter, &
|
||||||
outdatedByNewInc, &
|
theTime, &
|
||||||
outdatedFFN1, &
|
outdatedByNewInc, &
|
||||||
terminallyIll, &
|
outdatedFFN1, &
|
||||||
symmetricSolver
|
terminallyIll, &
|
||||||
use math, only: invnrmMandel
|
symmetricSolver
|
||||||
use debug, only: debug_info, &
|
use math, only: &
|
||||||
debug_reset, &
|
invnrmMandel
|
||||||
debug_levelBasic, &
|
use debug, only: &
|
||||||
debug_level, &
|
debug_info, &
|
||||||
debug_abaqus
|
debug_reset, &
|
||||||
use mesh, only: mesh_FEasCP, &
|
debug_levelBasic, &
|
||||||
mesh_ipCoordinates
|
debug_level, &
|
||||||
|
debug_abaqus
|
||||||
|
use mesh, only: &
|
||||||
|
mesh_FEasCP, &
|
||||||
|
mesh_ipCoordinates
|
||||||
use CPFEM, only: &
|
use CPFEM, only: &
|
||||||
CPFEM_general, &
|
CPFEM_general, &
|
||||||
CPFEM_init_done, &
|
CPFEM_init_done, &
|
||||||
|
@ -194,23 +217,30 @@ subroutine vumat (jblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal, &
|
||||||
CPFEM_CALCRESULTS, &
|
CPFEM_CALCRESULTS, &
|
||||||
CPFEM_AGERESULTS, &
|
CPFEM_AGERESULTS, &
|
||||||
CPFEM_EXPLICIT
|
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.
|
implicit none
|
||||||
! symbolic linking switches between .._sp.inc and .._dp.inc for both consecutive compilations...
|
|
||||||
|
|
||||||
|
integer(pInt) nblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal
|
||||||
|
|
||||||
|
real(pReal) stepTime, totalTime, dt
|
||||||
|
|
||||||
dimension props(nprops), density(nblock), &
|
real(pReal) props(nprops), density(nblock),&
|
||||||
strainInc(nblock,ndir+nshr), &
|
charLength(nblock), strainInc(nblock,ndir+nshr),&
|
||||||
relSpinInc(nblock,nshr), defgradOld(nblock,ndir+nshr+nshr), &
|
relSpinInc(nblock,nshr), coordMp(nblock,3),&
|
||||||
stressOld(nblock,ndir+nshr), &
|
defgradOld(nblock,ndir+nshr+nshr), defgradNew(nblock,ndir+nshr+nshr),&
|
||||||
stateOld(nblock,nstatev), enerInternOld(nblock), &
|
stressOld(nblock,ndir+nshr), stressNew(nblock,ndir+nshr),&
|
||||||
enerInelasOld(nblock), tempNew(nblock), tempOld(nblock), &
|
fieldOld(nblock,nfieldv), fieldNew(nblock,nfieldv),&
|
||||||
stretchNew(nblock,ndir+nshr), defgradNew(nblock,ndir+nshr+nshr), &
|
stateOld(nblock,nstatev), stateNew(nblock,nstatev),&
|
||||||
stressNew(nblock,ndir+nshr), coordMp(nblock,3)
|
enerInternOld(nblock), enerInternNew(nblock),&
|
||||||
|
enerInelasOld(nblock), enerInelasNew(nblock),&
|
||||||
dimension enerInelasNew(nblock),stateNew(nblock,nstatev),enerInternNew(nblock)
|
tempOld(nblock), tempNew(nblock),&
|
||||||
dimension nElement(nblock),nMatPoint(nblock)
|
stretchOld(nblock,ndir+nshr), stretchNew(nblock,ndir+nshr)
|
||||||
|
|
||||||
|
integer(pInt), dimension(nblock) :: nElement(nblock)
|
||||||
|
integer(pInt) :: nMatPoint
|
||||||
|
|
||||||
character(80) cmname
|
character(80) cmname
|
||||||
real(pReal), dimension (3,3) :: pstress ! not used, but needed for call of cpfem_general
|
real(pReal), dimension (3,3) :: pstress ! not used, but needed for call of cpfem_general
|
||||||
|
@ -228,29 +258,27 @@ subroutine vumat (jblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal, &
|
||||||
|
|
||||||
temp = tempOld(n)
|
temp = tempOld(n)
|
||||||
if ( .not. CPFEM_init_done ) then
|
if ( .not. CPFEM_init_done ) then
|
||||||
call CPFEM_initAll(temp,nElement(n),nMatPoint(n))
|
call CPFEM_initAll(temp,nElement(n),nMatPoint)
|
||||||
outdatedByNewInc = .false.
|
outdatedByNewInc = .false.
|
||||||
|
|
||||||
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,'(i8,1x,i2,1x,a)') nElement(n),nMatPoint(n),'first call special case..!'; call flush(6)
|
write(6,'(i8,1x,i2,1x,a)') nElement(n),nMatPoint,'first call special case..!'; call flush(6)
|
||||||
!$OMP END CRITICAL (write2out)
|
!$OMP END CRITICAL (write2out)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
else if (theTime < totalTime) then ! reached convergence
|
else if (theTime < totalTime) then ! reached convergence
|
||||||
outdatedByNewInc = .true.
|
outdatedByNewInc = .true.
|
||||||
|
|
||||||
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,'(i8,1x,i2,1x,a)') nElement(n),nMatPoint(n),'lastIncConverged + outdated'; call flush(6)
|
write (6,'(i8,1x,i2,1x,a)') nElement(n),nMatPoint,'lastIncConverged + outdated'; call flush(6)
|
||||||
!$OMP END CRITICAL (write2out)
|
!$OMP END CRITICAL (write2out)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
outdatedFFN1 = .false.
|
outdatedFFN1 = .false.
|
||||||
terminallyIll = .false.
|
terminallyIll = .false.
|
||||||
cycleCounter = 1
|
cycleCounter = 1_pInt
|
||||||
if ( outdatedByNewInc ) then
|
if ( outdatedByNewInc ) then
|
||||||
outdatedByNewInc = .false.
|
outdatedByNewInc = .false.
|
||||||
call debug_info() ! first after new inc reports debugging
|
call debug_info() ! first after new inc reports debugging
|
||||||
|
@ -259,14 +287,12 @@ subroutine vumat (jblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal, &
|
||||||
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,'(i2,1x,a,i8,1x,i5,a)') '(',nElement(n),nMatPoint(n),')'; call flush(6)
|
write(6,'(a,i8,i2,a)') '(',nElement(n),nMatPoint,')'; call flush(6)
|
||||||
write(6,'(a,l1)') 'Aging Results: ', iand(computationMode, CPFEM_AGERESULTS) /= 0_pInt
|
write(6,'(a,l1)') 'Aging Results: ', iand(computationMode, CPFEM_AGERESULTS) /= 0_pInt
|
||||||
!$OMP END CRITICAL (write2out)
|
!$OMP END CRITICAL (write2out)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
defgrd0 = 0.0_pReal
|
defgrd0 = 0.0_pReal
|
||||||
defgrd1 = 0.0_pReal
|
defgrd1 = 0.0_pReal
|
||||||
timeInc = dt
|
timeInc = dt
|
||||||
|
@ -297,11 +323,10 @@ subroutine vumat (jblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal, &
|
||||||
defgrd0(3,2) = defgradOld(n,8)
|
defgrd0(3,2) = defgradOld(n,8)
|
||||||
defgrd1(3,2) = defgradNew(n,8)
|
defgrd1(3,2) = defgradNew(n,8)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
cp_en = mesh_FEasCP('elem',nElement(n))
|
cp_en = mesh_FEasCP('elem',nElement(n))
|
||||||
mesh_ipCoordinates(1:3,n,cp_en) = numerics_unitlength * coordMp(n,1:3)
|
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)
|
call CPFEM_general(computationMode,defgrd0,defgrd1,temp,timeInc,cp_en,nMatPoint,stress,ddsdde, pstress, dPdF)
|
||||||
|
|
||||||
! Mandel: 11, 22, 33, SQRT(2)*12, SQRT(2)*23, SQRT(2)*13
|
! Mandel: 11, 22, 33, SQRT(2)*12, SQRT(2)*23, SQRT(2)*13
|
||||||
! straight: 11, 22, 33, 12, 23, 13
|
! straight: 11, 22, 33, 12, 23, 13
|
||||||
|
@ -311,7 +336,7 @@ subroutine vumat (jblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal, &
|
||||||
|
|
||||||
stressNew(n,1:ndir+nshr) = stress(1:ndir+nshr)*invnrmMandel(1:ndir+nshr)
|
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)))
|
stateNew(n,:) = materialpoint_results(1:min(nstatev,materialpoint_sizeResults),nMatPoint,mesh_FEasCP('elem', nElement(n)))
|
||||||
tempNew(n) = temp
|
tempNew(n) = temp
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
|
|
|
@ -36,8 +36,12 @@ compile_fortran = (fortCmd + " -c -fPIC -auto " +
|
||||||
"-implicitnone -assume byterecl " +
|
"-implicitnone -assume byterecl " +
|
||||||
"-real-size 64 -integer-size 32 -DFLOAT=8 -DINT=4")
|
"-real-size 64 -integer-size 32 -DFLOAT=8 -DINT=4")
|
||||||
|
|
||||||
# Do not use parts in input file
|
# Abaqus/CAE will generate an input file without parts and assemblies.
|
||||||
cae_no_parts_input_file=ON
|
cae_no_parts_input_file=ON
|
||||||
|
# Both the Abaqus/Explicit packager and analysis are run in double precision.
|
||||||
|
double_precision=BOTH
|
||||||
|
# The user will not be asked whether old job files of the same name should be deleted.
|
||||||
|
ask_delete=OFF
|
||||||
|
|
||||||
# You can compile DAMASK into a library to be used with abaqus
|
# You can compile DAMASK into a library to be used with abaqus
|
||||||
# it saves you from compiling the subroutine for each job
|
# it saves you from compiling the subroutine for each job
|
||||||
|
|
Loading…
Reference in New Issue