made plain mode work with Abaqus

ATTENTION plain mode (Marc and Avaqus) does not support writung out the deformed geometries
This commit is contained in:
Franz Roters 2013-08-08 15:00:22 +00:00
parent 5bb9c95245
commit 591a3023e8
1 changed files with 53 additions and 30 deletions

View File

@ -235,70 +235,92 @@ subroutine UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,&
if (.not. CPFEM_init_done) call CPFEM_initAll(temperature,noel,npt) if (.not. CPFEM_init_done) call CPFEM_initAll(temperature,noel,npt)
computationMode = 0
cp_en = mesh_FEasCP('elem',noel) cp_en = mesh_FEasCP('elem',noel)
if (time(2) > theTime .or. kInc /= theInc) then ! reached convergence if (time(2) > theTime .or. kInc /= theInc) then ! reached convergence
terminallyIll = .false. terminallyIll = .false.
cycleCounter = -1 ! first calc step increments this to cycle = 0 cycleCounter = -1 ! first calc step increments this to cycle = 0
if (kInc == 1) then ! start of analysis if (kInc == 1) then ! >> start of analysis <<
lastIncConverged = .false. ! no Jacobian backup lastIncConverged = .false. ! no Jacobian backup
outdatedByNewInc = .false. ! no aging of state outdatedByNewInc = .false. ! no aging of state
calcMode = .false. ! pretend last step was collection calcMode = .false. ! pretend last step was collection
!$OMP CRITICAL (write2out) !$OMP CRITICAL (write2out)
write (6,'(i8,1x,i2,1x,a)') noel,npt,'<< UMAT >> start of analysis..!'; flush(6) write (6,'(i8,1x,i2,1x,a)') noel,npt,'<< UMAT >> start of analysis..!'
flush(6)
!$OMP END CRITICAL (write2out) !$OMP END CRITICAL (write2out)
else if (kInc - theInc > 1) then ! restart of broken analysis else if (kInc - theInc > 1) then ! >> restart of broken analysis <<
lastIncConverged = .false. ! no Jacobian backup lastIncConverged = .false. ! no Jacobian backup
outdatedByNewInc = .false. ! no aging of state outdatedByNewInc = .false. ! no aging of state
calcMode = .true. ! pretend last step was calculation calcMode = .true. ! pretend last step was calculation
!$OMP CRITICAL (write2out) !$OMP CRITICAL (write2out)
write (6,'(i8,1x,i2,1x,a)') noel,npt,'<< UMAT >> restart of analysis..!'; flush(6) write (6,'(i8,1x,i2,1x,a)') noel,npt,'<< UMAT >> restart of analysis..!'
flush(6)
!$OMP END CRITICAL (write2out) !$OMP END CRITICAL (write2out)
else ! just the next inc else ! >> just the next inc <<
lastIncConverged = .true. ! request Jacobian backup lastIncConverged = .true. ! request Jacobian backup
outdatedByNewInc = .true. ! request aging of state outdatedByNewInc = .true. ! request aging of state
calcMode = .true. ! assure last step was calculation calcMode = .true. ! assure last step was calculation
!$OMP CRITICAL (write2out) !$OMP CRITICAL (write2out)
write (6,'(i8,1x,i2,1x,a)') noel,npt,'<< UMAT >> new increment..!'; flush(6) write (6,'(i8,1x,i2,1x,a)') noel,npt,'<< UMAT >> new increment..!'
flush(6)
!$OMP END CRITICAL (write2out) !$OMP END CRITICAL (write2out)
endif endif
else if ( dtime < theDelta ) then ! cutBack else if ( dtime < theDelta ) then ! >> cutBack <<
cutBack = .true. lastIncConverged = .false. ! no Jacobian backup
outdatedByNewInc = .false. ! no aging of state
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
!$OMP CRITICAL (write2out) !$OMP CRITICAL (write2out)
write(6,'(i8,1x,i2,1x,a)') noel,npt,'<< UMAT >> cutback detected..!'; flush(6) write(6,'(i8,1x,i2,1x,a)') noel,npt,'<< UMAT >> cutback detected..!'
flush(6)
!$OMP END CRITICAL (write2out) !$OMP END CRITICAL (write2out)
endif ! convergence treatment end endif ! convergence treatment end
calcMode(npt,cp_en) = .not. calcMode(npt,cp_en) ! ping pong (calc <--> collect)
if (calcMode(npt,cp_en)) then ! now calc if (usePingPong) then
computationMode = CPFEM_CALCRESULTS calcMode(npt,cp_en) = .not. calcMode(npt,cp_en) ! ping pong (calc <--> collect)
if ( lastStep .neqv. kStep ) then ! first after ping pong if (calcMode(npt,cp_en)) then ! now --- CALC ---
call debug_reset() ! resets debugging computationMode = CPFEM_CALCRESULTS
outdatedFFN1 = .false. if ( lastStep /= kStep ) then ! first after ping pong
cycleCounter = cycleCounter + 1 call debug_reset() ! resets debugging
outdatedFFN1 = .false.
cycleCounter = cycleCounter + 1_pInt
endif
if(outdatedByNewInc) then
computationMode = ior(computationMode,CPFEM_AGERESULTS) ! calc and age results
outdatedByNewInc = .false. ! reset flag
endif
else ! now --- COLLECT ---
computationMode = CPFEM_COLLECT ! plain collect
if(lastStep /= kStep .and. .not. terminallyIll) &
call debug_info() ! first after ping pong reports (meaningful) debugging
if (lastIncConverged) then
computationMode = ior(computationMode,CPFEM_BACKUPJACOBIAN) ! collect and backup Jacobian after convergence
lastIncConverged = .false. ! reset flag
endif
mesh_ipCoordinates(1:3,npt,cp_en) = mesh_unitlength * COORDS
endif endif
if(outdatedByNewInc) then else ! --- PLAIN MODE ---
outdatedByNewInc = .false. computationMode = CPFEM_CALCRESULTS ! always calc
computationMode = ior(computationMode,CPFEM_AGERESULTS) ! calc and age results if (lastStep /= kStep) then
if (.not. terminallyIll) &
call debug_info() ! first reports (meaningful) debugging
call debug_reset() ! and resets debugging
outdatedFFN1 = .false.
cycleCounter = cycleCounter + 1_pInt
endif endif
else ! now collect if (outdatedByNewInc) then
computationMode = CPFEM_COLLECT computationMode = ior(computationMode,CPFEM_AGERESULTS)
if(lastStep .neqv. kStep .and. .not. terminallyIll) then outdatedByNewInc = .false. ! reset flag
call debug_info() ! first after ping pong reports debugging
endif endif
if (lastIncConverged) then if (lastIncConverged) then
lastIncConverged = .false.
computationMode = ior(computationMode,CPFEM_BACKUPJACOBIAN) ! backup Jacobian after convergence computationMode = ior(computationMode,CPFEM_BACKUPJACOBIAN) ! backup Jacobian after convergence
elseif ( cutBack ) then lastIncConverged = .false. ! reset flag
cutBack = .false.
computationMode = ior(computationMode,CPFEM_RESTOREJACOBIAN) ! restore Jacobian after cutback
endif endif
mesh_ipCoordinates(1:3,npt,cp_en) = mesh_unitlength * COORDS
endif endif
theTime = time(2) ! record current starting time theTime = time(2) ! record current starting time
theDelta = dtime ! record current time increment theDelta = dtime ! record current time increment
theInc = kInc ! record current increment number theInc = kInc ! record current increment number
@ -306,7 +328,8 @@ subroutine UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,&
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,a,i8,1x,i5,a)') 'computationMode',computationMode,'(',cp_en,':',noel,npt,')'; flush(6) write(6,'(a16,1x,i2,1x,a,i8,a,i8,1x,i5,a)') 'computationMode',computationMode,'(',cp_en,':',noel,npt,')'
flush(6)
!$OMP END CRITICAL (write2out) !$OMP END CRITICAL (write2out)
endif endif