added NAssi-Schneidermann-Diagrams to the documentation for better understanding. Also reordered the declaration of variables in the corresponding function in crystallite.f90

This commit is contained in:
Christoph Kords 2009-06-02 09:37:38 +00:00
parent 364bacf568
commit e5311476c0
6 changed files with 43278 additions and 54 deletions

View File

@ -548,67 +548,93 @@ endsubroutine
i,& ! integration point number
e) ! element number
use prec
use debug
use constitutive, only: constitutive_microstructure, &
constitutive_homogenizedC, &
constitutive_LpAndItsTangent
use math
!*** variables and functions from other modules ***!
use prec, only: pReal, &
pInt, &
nStress, &
aTol_crystalliteStress, &
rTol_crystalliteStress, &
relevantStrain
use debug, only: debugger, &
debug_cumLpCalls, &
debug_cumLpTicks, &
debug_StressLoopDistribution
use constitutive, only: constitutive_microstructure, &
constitutive_homogenizedC, &
constitutive_LpAndItsTangent
use math, only: math_mul33x33, &
math_mul66x6, &
math_mul99x99, &
math_inv3x3, &
math_invert3x3, &
math_i3, &
math_identity2nd, &
math_Mandel66to3333, &
math_mandel33to6
implicit none
!*** input variables ***!
integer(pInt), intent(in) :: e, & ! element index
i, & ! integration point index
g ! grain index
integer(pInt), intent(in):: e, & ! element index
i, & ! integration point index
g ! grain index
!*** output variables ***!
logical crystallite_integrateStress ! flag indicating if integration suceeded
logical crystallite_integrateStress ! flag indicating if integration suceeded
!*** internal local variables ***!
real(pReal), dimension(3,3):: Fg_current, & ! deformation gradient at start of timestep
Fg_new, & ! deformation gradient at end of timestep
Fp_current, & ! plastic deformation gradient at start of timestep
Fp_new, & ! plastic deformation gradient at end of timestep
Fe_current, & ! elastic deformation gradient at start of timestep
Fe_new, & ! elastic deformation gradient at end of timestep
invFp_new, & ! inverse of Fp_new
invFp_current, & ! inverse of Fp_current
Lpguess, & ! current guess for plastic velocity gradient
Lpguess_old, & ! known last good guess for plastic velocity gradient
Lp_constitutive, & ! plastic velocity gradient resulting from constitutive law
residuum, & ! current residuum of plastic velocity gradient
residuum_old, & ! last residuum of plastic velocity gradient
A, &
B, &
BT, &
AB, &
BTA
real(pReal), dimension(6):: Tstar_v ! 2nd Piola-Kirchhoff Stress in Mandel-Notation
real(pReal), dimension(9,9):: dLp_constitutive, & ! partial derivative of plastic velocity gradient calculated by constitutive law
dTdLp, & ! partial derivative of 2nd Piola-Kirchhoff stress
dRdLp, & ! partial derivative of residuum (Jacobian for NEwton-Raphson scheme)
invdRdLp ! inverse of dRdLp
real(pReal), dimension(3,3,3,3):: C ! 4th rank elasticity tensor
real(pReal), dimension(6,6):: C_66 ! simplified 2nd rank elasticity tensor
real(pReal) p_hydro, & ! volumetric part of 2nd Piola-Kirchhoff Stress
det, & ! determinant
leapfrog, & ! acceleration factor for Newton-Raphson scheme
maxleap ! maximum acceleration factor
logical error ! flag indicating an error
integer(pInt) NiterationStress, & ! number of stress integrations
dummy, &
h, &
j, &
k, &
l, &
m, &
n
integer(pLongInt) tick, &
tock, &
tickrate, &
maxticks
!*** global variables ***!
! crystallite_subF0
! crystallite_subF
! crystallite_subFp0
! crystallite_Tstar_v
! crystallite_Lp
! crystallite_subdt
! crystallite_Temperature
!*** internal variables ***!
real(pReal), dimension(3,3) :: Fg_current, & ! deformation gradient at start of timestep
Fg_new, & ! deformation gradient at end of timestep
Fp_current, & ! plastic deformation gradient at start of timestep
Fp_new, & ! plastic deformation gradient at end of timestep
Fe_current, & ! elastic deformation gradient at start of timestep
Fe_new, & ! elastic deformation gradient at end of timestep
invFp_new, & ! inverse of Fp_new
invFp_current, & ! inverse of Fp_current
Lpguess, & ! current guess for plastic velocity gradient
Lpguess_old, & ! known last good guess for plastic velocity gradient
Lp_constitutive, & ! plastic velocity gradient resulting from constitutive law
residuum, & ! current residuum of plastic velocity gradient
residuum_old, & ! last residuum of plastic velocity gradient
A, &
B, &
BT, &
AB, &
BTA
real(pReal), dimension(6) :: Tstar_v ! 2nd Piola-Kirchhoff Stress in Mandel-Notation
real(pReal), dimension(9,9) :: dLp_constitutive, & ! partial derivative of plastic velocity gradient calculated by constitutive law
dTdLp, & ! partial derivative of 2nd Piola-Kirchhoff stress
dRdLp, & ! partial derivative of residuum (Jacobian for NEwton-Raphson scheme)
invdRdLp ! inverse of dRdLp
real(pReal), dimension(3,3,3,3) :: C ! 4th rank elasticity tensor
real(pReal), dimension(6,6) :: C_66 ! simplified 2nd rank elasticity tensor
real(pReal) p_hydro, & ! volumetric part of 2nd Piola-Kirchhoff Stress
det, & ! determinant
leapfrog, & ! acceleration factor for Newton-Raphson scheme
maxleap ! maximum acceleration factor
logical error ! flag indicating an error
integer(pInt) NiterationStress, & ! number of stress integrations
dummy, &
h, &
j, &
k, &
l, &
m, &
n
integer(pLongInt) tick, &
tock, &
tickrate, &
maxticks
! be pessimistic
crystallite_integrateStress = .false.

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<root text="&#34;crystallite_integrateStress&#34;" comment="" color="ffffff" type="sub" style="nice">
<children>
<instruction text="&#34;Fg_current = crystallite_subF0&#34;,&#34;Fg_new = crystallite_subF&#34;,&#34;Fp_current = crystallite_subFp0&#34;,&#34;Fe_current = Fg_current * Fp_current ^ -1&#34;,&#34;Tstar_v = crystallite_Tstar_v&#34;,&#34;Lpguess_old = crystallite_Lp&#34;,&#34;Lpguess = crystallite_Lp&#34;,&#34;crystallite_integrateStress = .false. &#34;" comment="&#34;&#34;" color="ffffff" rotated="0"></instruction>
<call text="&#34;invFp_current = math_inv3x3(Fp_current)&#34;" comment="" color="ffffff"></call>
<alternative text="&#34;invFp_current == 0.0&#34;" comment="" color="ffffff">
<qTrue>
<instruction text="&#34;return&#34;" comment="" color="ffffff" rotated="0"></instruction>
</qTrue>
<qFalse>
</qFalse>
</alternative>
<instruction text="&#34;A = invFp_current ^T * Fg_new ^T * Fg_new * invFp_current&#34;" comment="" color="ffffff" rotated="0"></instruction>
<call text="&#34;constitutive_microstructure&#34;" comment="" color="ffffff"></call>
<call text="&#34;C = math_Mandel66to3333( constitutive_homogenizedC ( ) )&#34;" comment="" color="ffffff"></call>
<instruction text="&#34;NiterationStress = 0&#34;,&#34;leapfrog = 1.0&#34;,&#34;maxleap = 1024.0&#34;" comment="" color="ffffff" rotated="0"></instruction>
<forever text="" comment="" color="ffffff">
<qForever>
<instruction text="&#34;LP LOOP (see crystallite_integrateStress_LpLoop)&#34;" comment="" color="ffffff" rotated="0"></instruction>
</qForever>
</forever>
<instruction text="&#34;invFp_new = invFp_current * B&#34;,&#34;invFp_new = invFp_new / math_det3x3(invFp_new)^(1.0/3.0)&#34;" comment="" color="ffffff" rotated="0"></instruction>
<call text="&#34;[Fp_new,det,error] = math_invert3x3(invFp_new)&#34;" comment="" color="ffffff"></call>
<alternative text="&#34;error&#34;" comment="" color="ffffff">
<qTrue>
<instruction text="&#34;INVERSION FAILED: return&#34;" comment="" color="ffffff" rotated="0"></instruction>
</qTrue>
<qFalse>
</qFalse>
</alternative>
<instruction text="&#34;Fe_new = Fg_new * invFp_new&#34;,&#34;Tstar_v = Tstar_v + p_hydro&#34;" comment="" color="ffffff" rotated="0"></instruction>
<instruction text="&#34;crystallite_P = Fe_new * Tstar_v * invFp_new^T&#34;,&#34;crystallite_Lp = Lpguess&#34;,&#34;crystallite_Tstar_v = Tstar_v&#34;,&#34;crystallite_Fp = Fp_new&#34;,&#34;crystallite_Fe = Fe_new&#34;,&#34;crystallite_integrateStress = .true.&#34;" comment="&#34;&#34;" color="ffffff" rotated="0"></instruction>
</children>
</root>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<root text="&#34;crystallite_integrateStress LpLoop&#34;" comment="&#34;&#34;" color="ffffff" type="sub" style="nice">
<children>
<instruction text="&#34;NiterationStress = NiterationStress + 1&#34;" comment="" color="ffffff" rotated="0"></instruction>
<alternative text="&#34;NiterationStress &#62; nStress&#34;" comment="" color="ffffff">
<qTrue>
<instruction text="&#34;TOO MANY ITERATIONS: return&#34;" comment="" color="ffffff" rotated="0"></instruction>
</qTrue>
<qFalse>
</qFalse>
</alternative>
<instruction text="&#34;B = math_i3 - crystallite_subdt(g,i,e)*Lpguess&#34;,&#34;Tstar_v = 0.5 * C * (B^T * A * B - math_I3)&#34;,&#34;p_hydro = sum(Tstar_v(1:3))/3.0&#34;,&#34;forall (i=1:3) Tstar_v(i) = Tstar_v(i) - p_hydro&#34;" comment="" color="ffffff" rotated="0"></instruction>
<call text="&#34;[Lp_constitutive, dLp_constitutive] = constitutive_LpAndItsTangent (Tstar_v, crystallite_Temperature)&#34;" comment="" color="ffffff"></call>
<instruction text="&#34;residuum = Lpguess - Lp_constitutive&#34;" comment="" color="ffffff" rotated="0"></instruction>
<alternative text="&#34;no NaN ocuured in residuum&#34;,&#34;.and. (residuum below absolute tolerance .or. (above relevant strain .and. residuum below relative tolerance))&#34;" comment="&#34;&#34;" color="ffffff">
<qTrue>
<jump text="&#34;LOOP CONVERGED: exit LpLoop&#34;" comment="" color="ffffff"></jump>
</qTrue>
<qFalse>
</qFalse>
</alternative>
<alternative text="&#34;NaN occured in residuum .and. leapfrog == 1.0&#34;" comment="&#34;&#34;" color="ffffff">
<qTrue>
<instruction text="&#34;NO CONVERGENCE: return&#34;" comment="" color="ffffff" rotated="0"></instruction>
</qTrue>
<qFalse>
<alternative text="&#34;leapfrog &#62; 1.0&#34;,&#34;.and. (worse residuum .or. residuum changed sign .or. NaN occured)&#34;" comment="&#34;&#34;" color="ffffff">
<qTrue>
<instruction text="&#34;maxleap = 0.5 * leapfrog&#34;,&#34;leapfrog = 1.0&#34;,&#34;Lpguess = Lpguess_old&#34;,&#34;residuum = residuum_old&#34;" comment="" color="ffffff" rotated="0"></instruction>
</qTrue>
<qFalse>
<instruction text="&#34;dTdLp = - 0.5 * crystallite_subdt * C * (A*B + B^T*A)&#34;,&#34;dRdLp = math_identity2nd(9) - dLp_constitutive * dTdLp&#34;" comment="" color="ffffff" rotated="0"></instruction>
<call text="&#34;[invdRdLp,dummy,error] = math_invert(9,dRdLp)&#34;" comment="" color="ffffff"></call>
<alternative text="&#34;error&#34;" comment="" color="ffffff">
<qTrue>
<instruction text="&#34;INVERSION FAILED: return&#34;" comment="" color="ffffff" rotated="0"></instruction>
</qTrue>
<qFalse>
</qFalse>
</alternative>
<instruction text="&#34;residuum_old = residuum&#34;,&#34;Lpguess_old = Lpguess&#34;" comment="" color="ffffff" rotated="0"></instruction>
<alternative text="&#34;NiterationStress &#62; 1 .and. leapfrog &#60; maxleap&#34;" comment="" color="ffffff">
<qTrue>
<instruction text="&#34;leapfrog = 2.0 * leapfrog&#34;" comment="" color="ffffff" rotated="0"></instruction>
</qTrue>
<qFalse>
</qFalse>
</alternative>
</qFalse>
</alternative>
</qFalse>
</alternative>
<instruction text="&#34;Lpguess = Lpguess - leapfrog * invdRdLp * residuum&#34;" comment="" color="ffffff" rotated="0"></instruction>
</children>
</root>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,3 @@
Nassi-Schneidermann-Diagrams for selected functions and subroutines:
- *.nsd and *.pdf files created with the software "Structorizer" Version 3.12