Modifications of cpfem_marc2005r3 according the ones in cpfem_marc2007r1

This commit is contained in:
Luc Hantcherli 2008-03-14 21:56:46 +00:00
parent 1267ce78b6
commit 6d721dc16c
1 changed files with 154 additions and 136 deletions

View File

@ -28,6 +28,7 @@
!******************************************************************** !********************************************************************
! !
include "prec.f90" include "prec.f90"
include "FEsolving.f90"
include "debug.f90" include "debug.f90"
include "math.f90" include "math.f90"
include "IO.f90" include "IO.f90"
@ -35,6 +36,7 @@
include "crystal.f90" include "crystal.f90"
include "constitutive.f90" include "constitutive.f90"
include "CPFEM.f90" include "CPFEM.f90"
!
SUBROUTINE hypela2(d,g,e,de,s,t,dt,ngens,n,nn,kcus,matus,ndi,& SUBROUTINE hypela2(d,g,e,de,s,t,dt,ngens,n,nn,kcus,matus,ndi,&
nshear,disp,dispt,coord,ffn,frotn,strechn,eigvn,ffn1,& nshear,disp,dispt,coord,ffn,frotn,strechn,eigvn,ffn1,&
@ -120,11 +122,20 @@
!2 continue !2 continue
!3 continue !3 continue
! !
!
use prec, only: pReal,pInt use prec, only: pReal,pInt, ijaco
use FEsolving
use CPFEM, only: CPFEM_general use CPFEM, only: CPFEM_general
use math, only: invnrmMandel
implicit real(pReal) (a-h,o-z) implicit real(pReal) (a-h,o-z)
!
integer(pInt) computationMode
dimension e(*),de(*),t(*),dt(*),g(*),d(ngens,*),s(*), n(2),coord(ncrd,*),disp(ndeg,*),matus(2),dispt(ndeg,*),ffn(itel,*),&
frotn(itel,*),strechn(itel),eigvn(itel,*),ffn1(itel,*),frotn1(itel,*),strechn1(itel),eigvn1(itel,*),kcus(2)
! Marc common blocks are in fixed format so they have to be pasted in here ! Marc common blocks are in fixed format so they have to be pasted in here
! Beware of changes in newer Marc versions -- these are from 2005r3 ! Beware of changes in newer Marc versions -- these are from 2005r3
! concom is needed for inc, subinc, ncycle, lovl ! concom is needed for inc, subinc, ncycle, lovl
@ -145,35 +156,42 @@
kgmsto ,jpzo, ifricsh, iremkin,iremfor, ishearp,jspf, machining, jlshell,icompsol,& kgmsto ,jpzo, ifricsh, iremkin,iremfor, ishearp,jspf, machining, jlshell,icompsol,&
iupblgfo,jcondir,nstcrp, nactive,ipassref, nstspnt,ibeart,icheckmpc, noline, icuring,& iupblgfo,jcondir,nstcrp, nactive,ipassref, nstspnt,ibeart,icheckmpc, noline, icuring,&
ishrink,ioffsflg,isetoff, iharmt, inc_incdat, iautspc,ibrake ishrink,ioffsflg,isetoff, iharmt, inc_incdat, iautspc,ibrake
! creeps is needed for timinc (time increment) ! creeps is needed for timinc (time increment)
! include 'creeps' ! include 'creeps'
common/creeps/ & common/marc_creeps/ &
cptim,timinc,timinc_p,timinc_s,timincm,timinc_a,timinc_b,creept(33),icptim,icfte,icfst,& cptim,timinc,timinc_p,timinc_s,timincm,timinc_a,timinc_b,creept(33),icptim,icfte,icfst,&
icfeq,icftm,icetem,mcreep,jcreep,icpa,icftmp,icfstr,icfqcp,icfcpm,icrppr,icrcha,icpb,iicpmt,iicpa icfeq,icftm,icetem,mcreep,jcreep,icpa,icftmp,icfstr,icfqcp,icfcpm,icrppr,icrcha,icpb,iicpmt,iicpa
!
dimension e(*),de(*),t(*),dt(*),g(*),d(ngens,*),s(*), n(2),coord(ncrd,*),disp(ndeg,*),matus(2),dispt(ndeg,*),ffn(itel,*),&
frotn(itel,*),strechn(itel),eigvn(itel,*),ffn1(itel,*),frotn1(itel,*),strechn1(itel),eigvn1(itel,*),kcus(2) if (inc == 0) then
! cycleCounter = 0
! subroutine cpfem_general(mpie_ffn, mpie_ffn1, temperature, mpie_inc, mpie_subinc, mpie_cn, else
! mpie_stress_recovery, mpie_tinc, mpie_en, mpie_in, mpie_s, mpie_d, mpie_ngens) if (theInc /= inc .or. theCycle /= ncycle .or. theLovl /= lovl) cycleCounter = cycleCounter+1
!******************************************************************** endif
! This routine calculates the material behaviour
!******************************************************************** if (theInc /= inc) outdatedByNewInc = .true.
! mpie_ffn deformation gradient for t=t0
! mpie_ffn1 deformation gradient for t=t1 if (mod(cycleCounter,2) /= 0) computationMode = 4 ! recycle
! temperature temperature if (mod(cycleCounter,4) == 2) computationMode = 3 ! collect
! mpie_inc increment number if (mod(cycleCounter,4) == 0) computationMode = 2 ! compute
! mpie_subinc subincrement number if (computationMode == 2 .and. outdatedByNewInc) then
! mpie_cn number of cycle outdatedByNewInc = .false.
! mpie_stress_recovery indicates wether we are in stiffness assemly(lovl==4) or stress recovery(lovl==6) computationMode = 1 ! compute and age former results
! mpie_tinc time increment endif
! mpie_en element number
! mpie_in intergration point number theInc = inc
! mpie_s stress vector in Marc notation, i.e. 11 22 33 12, 23, 13 theCycle = ncycle
! mpie_d jacoby in Marc notation theLovl = lovl
! mpie_ngens size of stress strain law
!******************************************************************** call CPFEM_general(computationMode,ffn,ffn1,t(1),timinc,n(1),nn,s,mod(theCycle,2_pInt*ijaco)==0,d,ngens)
call CPFEM_general(ffn, ffn1, t(1), inc, incsub, ncycle, stress_recovery, timinc, n(1), nn, s, d, ngens)
! Mandel: 11, 22, 33, SQRT(2)*12, SQRT(2)*23, SQRT(2)*13
! Marc: 11, 22, 33, 12, 23, 13
forall(i=1:ngens) d(1:ngens,i) = invnrmMandel(i)*d(1:ngens,i)*invnrmMandel(1:ngens)
s(1:ngens) = s(1:ngens)*invnrmMandel(1:ngens)
return return
END SUBROUTINE END SUBROUTINE