doxygen documentation for constitutive_none

This commit is contained in:
Martin Diehl 2013-05-17 17:09:42 +00:00
parent 7833f79f75
commit 4416efe89b
1 changed files with 226 additions and 236 deletions

View File

@ -16,28 +16,17 @@
! You should have received a copy of the GNU General Public License ! You should have received a copy of the GNU General Public License
! along with DAMASK. If not, see <http://www.gnu.org/licenses/>. ! along with DAMASK. If not, see <http://www.gnu.org/licenses/>.
! !
!############################################################## !--------------------------------------------------------------------------------------------------
!* $Id$ ! $Id$
!***************************************************** !--------------------------------------------------------------------------------------------------
!* Module: CONSTITUTIVE_J2 * !> @author Franz Roters, Max-Planck-Institut für Eisenforschung GmbH
!***************************************************** !> @author Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH
!* contains: * !> @brief material subroutine for purely elastic material
!* - constitutive equations * !--------------------------------------------------------------------------------------------------
!* - parameters definition *
!*****************************************************
! [pure elasticity]
! elsticity hooke
! plasticity none
! lattice_structure hex
! covera_ratio 1.587
! c11 106.75e9
! c12 60.41e9
! c44 28.34e9
module constitutive_none module constitutive_none
use prec, only: &
use prec, only: pReal,pInt pReal, &
pInt
implicit none implicit none
private private
@ -57,7 +46,8 @@ module constitutive_none
real(pReal), dimension(:,:,:), allocatable, private :: & real(pReal), dimension(:,:,:), allocatable, private :: &
constitutive_none_Cslip_66 constitutive_none_Cslip_66
public :: constitutive_none_init, & public :: &
constitutive_none_init, &
constitutive_none_stateInit, & constitutive_none_stateInit, &
constitutive_none_aTolState, & constitutive_none_aTolState, &
constitutive_none_homogenizedC, & constitutive_none_homogenizedC, &
@ -68,12 +58,13 @@ module constitutive_none
constitutive_none_dotTemperature, & constitutive_none_dotTemperature, &
constitutive_none_postResults constitutive_none_postResults
contains contains
!--------------------------------------------------------------------------------------------------
!> @brief reads in material parameters and allocates arrays
!--------------------------------------------------------------------------------------------------
subroutine constitutive_none_init(myFile) subroutine constitutive_none_init(myFile)
!**************************************
!* Module initialization *
!**************************************
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment) use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
use math, only: & use math, only: &
math_Mandel3333to66, & math_Mandel3333to66, &
@ -99,23 +90,20 @@ subroutine constitutive_none_init(myFile)
integer(pInt), parameter :: maxNchunks = 7_pInt integer(pInt), parameter :: maxNchunks = 7_pInt
integer(pInt), dimension(1_pInt+2_pInt*maxNchunks) :: positions integer(pInt), dimension(1_pInt+2_pInt*maxNchunks) :: positions
integer(pInt) :: section = 0_pInt, maxNinstance, i,j,k, mySize, myStructure integer(pInt) :: section = 0_pInt, maxNinstance, i
character(len=64) :: tag character(len=64) :: tag
character(len=1024) :: line = '' ! to start initialized character(len=1024) :: line = '' ! to start initialized
write(6,*) write(6,'(/,a)') '<<<+- constitutive_',trim(constitutive_none_label),' init -+>>>'
write(6,*) '<<<+- constitutive_',trim(constitutive_none_label),' init -+>>>' write(6,'(a)') '$Id$'
write(6,*) '$Id$' write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
write(6,'(a16,a)') ' Current time : ',IO_timeStamp()
#include "compilation_info.f90" #include "compilation_info.f90"
maxNinstance = int(count(phase_plasticity == constitutive_none_label),pInt) maxNinstance = int(count(phase_plasticity == constitutive_none_label),pInt)
if (maxNinstance == 0_pInt) return if (maxNinstance == 0_pInt) return
if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) then if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) &
write(6,'(a16,1x,i5)') '# instances:',maxNinstance write(6,'(a16,1x,i5,/)') '# instances:',maxNinstance
write(6,*)
endif
allocate(constitutive_none_sizeDotState(maxNinstance)) allocate(constitutive_none_sizeDotState(maxNinstance))
constitutive_none_sizeDotState = 0_pInt constitutive_none_sizeDotState = 0_pInt
@ -193,13 +181,14 @@ subroutine constitutive_none_init(myFile)
end subroutine constitutive_none_init end subroutine constitutive_none_init
!********************************************************************* !--------------------------------------------------------------------------------------------------
!* initial microstructural state * !> @brief sets the initial microstructural state
!********************************************************************* !--------------------------------------------------------------------------------------------------
pure function constitutive_none_stateInit(myInstance) pure function constitutive_none_stateInit(myInstance)
implicit none implicit none
integer(pInt), intent(in) :: myInstance integer(pInt), intent(in) :: myInstance
real(pReal), dimension(1) :: constitutive_none_stateInit real(pReal), dimension(1) :: constitutive_none_stateInit
constitutive_none_stateInit = 0.0_pReal constitutive_none_stateInit = 0.0_pReal
@ -207,112 +196,25 @@ pure function constitutive_none_stateInit(myInstance)
end function constitutive_none_stateInit end function constitutive_none_stateInit
!********************************************************************* !--------------------------------------------------------------------------------------------------
!* relevant microstructural state * !> @brief relevant microstructural state (ensures convergence as state is always 0.0)
!********************************************************************* !--------------------------------------------------------------------------------------------------
pure function constitutive_none_aTolState(myInstance) pure function constitutive_none_aTolState(myInstance)
implicit none implicit none
!*** input variables integer(pInt), intent(in) :: myInstance !< number specifying the current instance of the plasticity
integer(pInt), intent(in) :: myInstance ! number specifying the current instance of the plasticity
!*** output variables
real(pReal), dimension(constitutive_none_sizeState(myInstance)) :: & real(pReal), dimension(constitutive_none_sizeState(myInstance)) :: &
constitutive_none_aTolState ! relevant state values for the current instance of this plasticity constitutive_none_aTolState !< relevant state values for the current instance of this plasticity
constitutive_none_aTolState = 1.0_pReal
constitutive_none_aTolState = 1.0_preal ! ensure convergence as state is always 0.0_pReal
end function constitutive_none_aTolState end function constitutive_none_aTolState
!--------------------------------------------------------------------------------------------------
!> @brief homogenized elacticity matrix
!--------------------------------------------------------------------------------------------------
pure function constitutive_none_homogenizedC(state,ipc,ip,el) pure function constitutive_none_homogenizedC(state,ipc,ip,el)
!*********************************************************************
!* homogenized elacticity matrix *
!* INPUT: *
!* - state : state variables *
!* - ipc : component-ID of current integration point *
!* - ip : current integration point *
!* - el : current element *
!*********************************************************************
use prec, only: p_vec
use mesh, only: mesh_NcpElems,mesh_maxNips
use material, only: homogenization_maxNgrains,material_phase, phase_plasticityInstance
implicit none
integer(pInt), intent(in) :: ipc,ip,el
type(p_vec), dimension(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), intent(in) :: state
integer(pInt) :: matID
real(pReal), dimension(6,6) :: constitutive_none_homogenizedC
matID = phase_plasticityInstance(material_phase(ipc,ip,el))
constitutive_none_homogenizedC = constitutive_none_Cslip_66(1:6,1:6,matID)
end function constitutive_none_homogenizedC
subroutine constitutive_none_microstructure(Temperature,state,ipc,ip,el)
!*********************************************************************
!* calculate derived quantities from state (not used here) *
!* INPUT: *
!* - Tp : temperature *
!* - ipc : component-ID of current integration point *
!* - ip : current integration point *
!* - el : current element *
!*********************************************************************
use prec, only: p_vec
use mesh, only: mesh_NcpElems,mesh_maxNips
use material, only: homogenization_maxNgrains,material_phase, phase_plasticityInstance
implicit none
!* Definition of variables
integer(pInt) ipc,ip,el, matID
real(pReal) Temperature
type(p_vec), dimension(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems) :: state
matID = phase_plasticityInstance(material_phase(ipc,ip,el))
end subroutine constitutive_none_microstructure
!****************************************************************
!* calculates plastic velocity gradient and its tangent *
!****************************************************************
pure subroutine constitutive_none_LpAndItsTangent(Lp, dLp_dTstar_99, Tstar_dev_v, Temperature, state, g, ip, el)
!*** variables and functions from other modules ***!
use prec, only: p_vec
use math, only: math_identity2nd
use mesh, only: mesh_NcpElems, &
mesh_maxNips
use material, only: homogenization_maxNgrains, &
material_phase, &
phase_plasticityInstance
implicit none
!*** input variables ***!
real(pReal), dimension(6), intent(in):: Tstar_dev_v ! deviatoric part of the 2nd Piola Kirchhoff stress tensor in Mandel notation
real(pReal), intent(in):: Temperature
integer(pInt), intent(in):: g, & ! grain number
ip, & ! integration point number
el ! element number
type(p_vec), dimension(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), intent(in):: state ! state of the current microstructure
!*** output variables ***!
real(pReal), dimension(3,3), intent(out) :: Lp ! plastic velocity gradient
real(pReal), dimension(9,9), intent(out) :: dLp_dTstar_99 ! derivative of Lp with respect to Tstar (9x9 matrix)
! Set Lp to zero and dLp_dTstar to Identity
Lp = 0.0_pReal
dLp_dTstar_99 = math_identity2nd(9)
end subroutine constitutive_none_LpAndItsTangent
!****************************************************************
!* calculates the rate of change of microstructure *
!****************************************************************
pure function constitutive_none_dotState(Tstar_v, Temperature, state, g, ip, el)
use prec, only: & use prec, only: &
p_vec p_vec
use mesh, only: & use mesh, only: &
@ -324,117 +226,205 @@ pure function constitutive_none_dotState(Tstar_v, Temperature, state, g, ip, el)
phase_plasticityInstance phase_plasticityInstance
implicit none implicit none
!*** input variables ***! real(pReal), dimension(6,6) :: constitutive_none_homogenizedC
real(pReal), dimension(6), intent(in) :: Tstar_v ! 2nd Piola Kirchhoff stress tensor in Mandel notation integer(pInt), intent(in) :: &
real(pReal), intent(in) :: Temperature ipc, & !< component-ID of current integration point
integer(pInt), intent(in):: g, & ! grain number ip, & !< current integration point
ip, & ! integration point number el !< current element
el ! element number type(p_vec), dimension(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), intent(in) :: state
type(p_vec), dimension(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), intent(in) :: state ! state of the current microstructure integer(pInt) :: matID
!*** output variables ***! matID = phase_plasticityInstance(material_phase(ipc,ip,el))
real(pReal), dimension(1) :: constitutive_none_dotState ! evolution of state variable constitutive_none_homogenizedC = constitutive_none_Cslip_66(1:6,1:6,matID)
end function constitutive_none_homogenizedC
!--------------------------------------------------------------------------------------------------
!> @brief calculates derived quantities from state (not used here)
!--------------------------------------------------------------------------------------------------
pure subroutine constitutive_none_microstructure(Temperature,state,ipc,ip,el)
use prec, only: &
p_vec
use mesh, only: &
mesh_NcpElems, &
mesh_maxNips
use material, only: &
homogenization_maxNgrains, &
material_phase, &
phase_plasticityInstance
implicit none
integer(pInt), intent(in) :: &
ipc, & !< component-ID of current integration point
ip, & !< current integration point
el !< current element
real(pReal), intent(in) :: &
Temperature !< temperature
type(p_vec), dimension(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), intent(in) :: state
end subroutine constitutive_none_microstructure
!--------------------------------------------------------------------------------------------------
!> @brief calculates plastic velocity gradient and its tangent
!--------------------------------------------------------------------------------------------------
pure subroutine constitutive_none_LpAndItsTangent(Lp, dLp_dTstar_99, Tstar_dev_v, Temperature, &
state, gr, ip, el)
use prec, only: &
p_vec
use math, only: &
math_identity2nd
use mesh, only: &
mesh_NcpElems, &
mesh_maxNips
use material, only: &
homogenization_maxNgrains, &
material_phase, &
phase_plasticityInstance
implicit none
real(pReal), dimension(6), intent(in) :: Tstar_dev_v !< deviatoric part of the 2nd Piola Kirchhoff stress tensor in Mandel notation
real(pReal), intent(in) :: Temperature
integer(pInt), intent(in) :: &
gr, & !< grain number
ip, & !< integration point number
el !< element number
type(p_vec), dimension(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), intent(in) :: state !< state of the current microstructure
real(pReal), dimension(3,3), intent(out) :: Lp !< plastic velocity gradient
real(pReal), dimension(9,9), intent(out) :: dLp_dTstar_99 !< derivative of Lp with respect to Tstar (9x9 matrix)
Lp = 0.0_pReal !< set Lp to zero
dLp_dTstar_99 = math_identity2nd(9) !< set dLp_dTstar to Identity
end subroutine constitutive_none_LpAndItsTangent
!--------------------------------------------------------------------------------------------------
!> @brief calculates the rate of change of microstructure
!--------------------------------------------------------------------------------------------------
pure function constitutive_none_dotState(Tstar_v, Temperature, state, gr, ip, el)
use prec, only: &
p_vec
use math, only: &
math_identity2nd
use mesh, only: &
mesh_NcpElems, &
mesh_maxNips
use material, only: &
homogenization_maxNgrains, &
material_phase, &
phase_plasticityInstance
implicit none
real(pReal), dimension(1) :: constitutive_none_dotState
real(pReal), dimension(6), intent(in) :: Tstar_v !< 2nd Piola Kirchhoff stress tensor in Mandel notation
real(pReal), intent(in) :: Temperature
integer(pInt), intent(in) :: &
gr, & !< grain number
ip, & !< integration point number
el !< element number
type(p_vec), dimension(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), intent(in) :: state !< state of the current microstructure
constitutive_none_dotState = 0.0_pReal constitutive_none_dotState = 0.0_pReal
end function constitutive_none_dotState end function constitutive_none_dotState
!--------------------------------------------------------------------------------------------------
!********************************************************************* !> @brief (instantaneous) incremental change of microstructure
!* (instantaneous) incremental change of microstructure * !--------------------------------------------------------------------------------------------------
!********************************************************************* function constitutive_none_deltaState(Tstar_v, Temperature, state, gr, ip, el)
function constitutive_none_deltaState(Tstar_v, Temperature, state, g,ip,el) use prec, only: &
use prec, only: pReal, &
pInt, &
p_vec p_vec
use mesh, only: mesh_NcpElems, & use math, only: &
math_identity2nd
use mesh, only: &
mesh_NcpElems, &
mesh_maxNips mesh_maxNips
use material, only: homogenization_maxNgrains, & use material, only: &
homogenization_maxNgrains, &
material_phase, & material_phase, &
phase_plasticityInstance phase_plasticityInstance
implicit none implicit none
real(pReal), dimension(6), intent(in) :: Tstar_v !< 2nd Piola Kirchhoff stress tensor in Mandel notation
real(pReal), intent(in) :: Temperature
integer(pInt), intent(in) :: &
gr, & !< grain number
ip, & !< integration point number
el !< element number
type(p_vec), dimension(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), intent(in) :: state !< state of the current microstructure
!*** input variables real(pReal), dimension(constitutive_none_sizeDotState(phase_plasticityInstance(&
integer(pInt), intent(in) :: g, & ! current grain number material_phase(gr,ip,el)))) :: constitutive_none_deltaState
ip, & ! current integration point
el ! current element number
real(pReal), intent(in) :: Temperature ! temperature
real(pReal), dimension(6), intent(in) :: Tstar_v ! current 2nd Piola-Kirchhoff stress in Mandel notation
type(p_vec), dimension(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), intent(in) :: &
state ! current microstructural state
!*** output variables constitutive_none_deltaState = 0.0_pReal
real(pReal), dimension(constitutive_none_sizeDotState(phase_plasticityInstance(material_phase(g,ip,el)))) :: &
constitutive_none_deltaState ! change of state variables / microstructure
!*** local variables
constitutive_none_deltaState = 0.0_pReal end function constitutive_none_deltaState
endfunction
!**************************************************************** !--------------------------------------------------------------------------------------------------
!* calculates the rate of change of temperature * !> @brief calculates the rate of change of temperature
!**************************************************************** !--------------------------------------------------------------------------------------------------
pure function constitutive_none_dotTemperature(Tstar_v, Temperature, state, g, ip, el) pure real(pReal) function constitutive_none_dotTemperature(Tstar_v, Temperature, state, gr, ip, el)
use prec, only: &
!*** variables and functions from other modules ***! p_vec
use prec, only: p_vec use math, only: &
use mesh, only: mesh_NcpElems,mesh_maxNips math_identity2nd
use material, only: homogenization_maxNgrains use mesh, only: &
mesh_NcpElems, &
mesh_maxNips
use material, only: &
homogenization_maxNgrains
implicit none implicit none
!*** input variables ***! real(pReal), dimension(6), intent(in) :: Tstar_v !< 2nd Piola Kirchhoff stress tensor in Mandel notation
real(pReal), dimension(6), intent(in) :: Tstar_v ! 2nd Piola Kirchhoff stress tensor in Mandel notation
real(pReal), intent(in) :: Temperature real(pReal), intent(in) :: Temperature
integer(pInt), intent(in):: g, & ! grain number integer(pInt), intent(in) :: &
ip, & ! integration point number gr, & !< grain number
el ! element number ip, & !< integration point number
type(p_vec), dimension(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), intent(in) :: state ! state of the current microstructure el !< element number
type(p_vec), dimension(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), intent(in) :: state !< state of the current microstructure
!*** output variables ***!
real(pReal) constitutive_none_dotTemperature ! rate of change of temperature
! calculate dotTemperature
constitutive_none_dotTemperature = 0.0_pReal constitutive_none_dotTemperature = 0.0_pReal
end function constitutive_none_dotTemperature end function constitutive_none_dotTemperature
!********************************************************************* !--------------------------------------------------------------------------------------------------
!* return array of constitutive results * !> @brief return array of constitutive results
!********************************************************************* !--------------------------------------------------------------------------------------------------
pure function constitutive_none_postResults(Tstar_v, Temperature, dt, state, g, ip, el) pure function constitutive_none_postResults(Tstar_v, Temperature, dt, state, gr, ip, el)
use prec, only: &
!*** variables and functions from other modules ***! p_vec
use prec, only: p_vec use math, only: &
use math, only: math_mul6x6 math_mul6x6
use mesh, only: mesh_NcpElems, & use mesh, only: &
mesh_NcpElems, &
mesh_maxNips mesh_maxNips
use material, only: homogenization_maxNgrains, & use material, only: &
homogenization_maxNgrains, &
material_phase, & material_phase, &
phase_plasticityInstance, & phase_plasticityInstance, &
phase_Noutput phase_Noutput
implicit none implicit none
!*** input variables ***! real(pReal), dimension(6), intent(in) :: Tstar_v !< 2nd Piola Kirchhoff stress tensor in Mandel notation
real(pReal), dimension(6), intent(in):: Tstar_v ! 2nd Piola Kirchhoff stress tensor in Mandel notation real(pReal), intent(in) :: &
real(pReal), intent(in):: Temperature, & Temperature, &
dt ! current time increment dt !< current time increment
integer(pInt), intent(in):: g, & ! grain number integer(pInt), intent(in) :: &
ip, & ! integration point number gr, & !< grain number
el ! element number ip, & !< integration point number
type(p_vec), dimension(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), intent(in) :: state ! state of the current microstructure el !< element number
type(p_vec), dimension(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), intent(in) :: state !< state of the current microstructure
!*** output variables ***!
real(pReal), dimension(constitutive_none_sizePostResults(phase_plasticityInstance(material_phase(g,ip,el)))) :: &
constitutive_none_postResults
real(pReal), dimension(constitutive_none_sizePostResults(phase_plasticityInstance(&
material_phase(gr,ip,el)))) :: constitutive_none_postResults
constitutive_none_postResults = 0.0_pReal constitutive_none_postResults = 0.0_pReal