simplified constitutive_init call
This commit is contained in:
parent
b4092966fe
commit
5c1889e6cd
|
@ -68,24 +68,24 @@ subroutine constitutive_init()
|
||||||
case (constitutive_phenomenological_label)
|
case (constitutive_phenomenological_label)
|
||||||
allocate(constitutive_state_old(g,i,e)%p(constitutive_phenomenological_sizeState(myInstance)))
|
allocate(constitutive_state_old(g,i,e)%p(constitutive_phenomenological_sizeState(myInstance)))
|
||||||
allocate(constitutive_state_new(g,i,e)%p(constitutive_phenomenological_sizeState(myInstance)))
|
allocate(constitutive_state_new(g,i,e)%p(constitutive_phenomenological_sizeState(myInstance)))
|
||||||
constitutive_state_new(g,i,e)%p = constitutive_phenomenological_stateInit(g,i,e)
|
constitutive_state_new(g,i,e)%p = constitutive_phenomenological_stateInit(myInstance)
|
||||||
constitutive_state_old(g,i,e)%p = constitutive_phenomenological_stateInit(g,i,e)
|
constitutive_state_old(g,i,e)%p = constitutive_phenomenological_stateInit(myInstance)
|
||||||
constitutive_sizeDotState(g,i,e) = constitutive_phenomenological_sizeDotState(myInstance)
|
constitutive_sizeDotState(g,i,e) = constitutive_phenomenological_sizeDotState(myInstance)
|
||||||
constitutive_sizeState(g,i,e) = constitutive_phenomenological_sizeState(myInstance)
|
constitutive_sizeState(g,i,e) = constitutive_phenomenological_sizeState(myInstance)
|
||||||
constitutive_sizePostResults(g,i,e) = constitutive_phenomenological_sizePostResults(myInstance)
|
constitutive_sizePostResults(g,i,e) = constitutive_phenomenological_sizePostResults(myInstance)
|
||||||
case (constitutive_j2_label)
|
case (constitutive_j2_label)
|
||||||
allocate(constitutive_state_old(g,i,e)%p(constitutive_j2_sizeState(myInstance)))
|
allocate(constitutive_state_old(g,i,e)%p(constitutive_j2_sizeState(myInstance)))
|
||||||
allocate(constitutive_state_new(g,i,e)%p(constitutive_j2_sizeState(myInstance)))
|
allocate(constitutive_state_new(g,i,e)%p(constitutive_j2_sizeState(myInstance)))
|
||||||
constitutive_state_new(g,i,e)%p = constitutive_j2_stateInit(g,i,e)
|
constitutive_state_new(g,i,e)%p = constitutive_j2_stateInit(myInstance)
|
||||||
constitutive_state_old(g,i,e)%p = constitutive_j2_stateInit(g,i,e)
|
constitutive_state_old(g,i,e)%p = constitutive_j2_stateInit(myInstance)
|
||||||
constitutive_sizeDotState(g,i,e) = constitutive_j2_sizeDotState(myInstance)
|
constitutive_sizeDotState(g,i,e) = constitutive_j2_sizeDotState(myInstance)
|
||||||
constitutive_sizeState(g,i,e) = constitutive_j2_sizeState(myInstance)
|
constitutive_sizeState(g,i,e) = constitutive_j2_sizeState(myInstance)
|
||||||
constitutive_sizePostResults(g,i,e) = constitutive_j2_sizePostResults(myInstance)
|
constitutive_sizePostResults(g,i,e) = constitutive_j2_sizePostResults(myInstance)
|
||||||
case (constitutive_dislobased_label)
|
case (constitutive_dislobased_label)
|
||||||
allocate(constitutive_state_old(g,i,e)%p(constitutive_dislobased_sizeState(myInstance)))
|
allocate(constitutive_state_old(g,i,e)%p(constitutive_dislobased_sizeState(myInstance)))
|
||||||
allocate(constitutive_state_new(g,i,e)%p(constitutive_dislobased_sizeState(myInstance)))
|
allocate(constitutive_state_new(g,i,e)%p(constitutive_dislobased_sizeState(myInstance)))
|
||||||
constitutive_state_new(g,i,e)%p = constitutive_dislobased_stateInit(g,i,e)
|
constitutive_state_new(g,i,e)%p = constitutive_dislobased_stateInit(myInstance)
|
||||||
constitutive_state_old(g,i,e)%p = constitutive_dislobased_stateInit(g,i,e)
|
constitutive_state_old(g,i,e)%p = constitutive_dislobased_stateInit(myInstance)
|
||||||
constitutive_sizeDotState(g,i,e) = constitutive_dislobased_sizeDotState(myInstance)
|
constitutive_sizeDotState(g,i,e) = constitutive_dislobased_sizeDotState(myInstance)
|
||||||
constitutive_sizeState(g,i,e) = constitutive_dislobased_sizeState(myInstance)
|
constitutive_sizeState(g,i,e) = constitutive_dislobased_sizeState(myInstance)
|
||||||
constitutive_sizePostResults(g,i,e) = constitutive_dislobased_sizePostResults(myInstance)
|
constitutive_sizePostResults(g,i,e) = constitutive_dislobased_sizePostResults(myInstance)
|
||||||
|
|
|
@ -309,22 +309,18 @@ subroutine constitutive_dislobased_init(file)
|
||||||
end subroutine
|
end subroutine
|
||||||
|
|
||||||
|
|
||||||
function constitutive_dislobased_stateInit(ipc,ip,el)
|
function constitutive_dislobased_stateInit(myInstance)
|
||||||
!*********************************************************************
|
!*********************************************************************
|
||||||
!* initial microstructural state *
|
!* initial microstructural state *
|
||||||
!*********************************************************************
|
!*********************************************************************
|
||||||
use prec, only: pReal,pInt
|
use prec, only: pReal,pInt
|
||||||
use material, only: material_phase, phase_constitutionInstance
|
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
!* Definition of variables
|
!* Definition of variables
|
||||||
integer(pInt), intent(in) :: ipc,ip,el
|
integer(pInt), intent(in) :: myInstance
|
||||||
integer(pInt) matID
|
real(pReal), dimension(constitutive_dislobased_Nslip(myInstance)) :: constitutive_dislobased_stateInit
|
||||||
real(pReal), dimension(constitutive_dislobased_Nslip(phase_constitutionInstance(material_phase(ipc,ip,el)))) :: &
|
|
||||||
constitutive_dislobased_stateInit
|
|
||||||
|
|
||||||
matID = phase_constitutionInstance(material_phase(ipc,ip,el))
|
constitutive_dislobased_stateInit = constitutive_dislobased_rho0(myInstance)
|
||||||
constitutive_dislobased_stateInit = constitutive_dislobased_rho0(matID)
|
|
||||||
|
|
||||||
return
|
return
|
||||||
end function
|
end function
|
||||||
|
|
|
@ -179,22 +179,18 @@ subroutine constitutive_j2_init(file)
|
||||||
end subroutine
|
end subroutine
|
||||||
|
|
||||||
|
|
||||||
function constitutive_j2_stateInit(ipc,ip,el)
|
function constitutive_j2_stateInit(myInstance)
|
||||||
!*********************************************************************
|
!*********************************************************************
|
||||||
!* initial microstructural state *
|
!* initial microstructural state *
|
||||||
!*********************************************************************
|
!*********************************************************************
|
||||||
use prec, only: pReal,pInt
|
use prec, only: pReal,pInt
|
||||||
use material, only: material_phase, phase_constitutionInstance
|
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
!* Definition of variables
|
!* Definition of variables
|
||||||
integer(pInt), intent(in) :: ipc,ip,el
|
integer(pInt), intent(in) :: myInstance
|
||||||
integer(pInt) matID
|
real(pReal), dimension(1) :: constitutive_j2_stateInit
|
||||||
real(pReal), dimension(1) :: &
|
|
||||||
constitutive_j2_stateInit
|
|
||||||
|
|
||||||
matID = phase_constitutionInstance(material_phase(ipc,ip,el))
|
constitutive_j2_stateInit = constitutive_j2_s0(myInstance)
|
||||||
constitutive_j2_stateInit = constitutive_j2_s0(matID)
|
|
||||||
|
|
||||||
return
|
return
|
||||||
end function
|
end function
|
||||||
|
|
|
@ -38,9 +38,11 @@ MODULE constitutive_phenomenological
|
||||||
constitutive_phenomenological_sizeState, &
|
constitutive_phenomenological_sizeState, &
|
||||||
constitutive_phenomenological_sizePostResults
|
constitutive_phenomenological_sizePostResults
|
||||||
character(len=64), dimension(:,:), allocatable :: constitutive_phenomenological_output
|
character(len=64), dimension(:,:), allocatable :: constitutive_phenomenological_output
|
||||||
|
|
||||||
character(len=32), dimension(:), allocatable :: constitutive_phenomenological_structureName
|
character(len=32), dimension(:), allocatable :: constitutive_phenomenological_structureName
|
||||||
integer(pInt), dimension(:), allocatable :: constitutive_phenomenological_structure
|
integer(pInt), dimension(:), allocatable :: constitutive_phenomenological_structure
|
||||||
integer(pInt), dimension(:), allocatable :: constitutive_phenomenological_Nslip
|
integer(pInt), dimension(:), allocatable :: constitutive_phenomenological_Nslip
|
||||||
|
|
||||||
real(pReal), dimension(:), allocatable :: constitutive_phenomenological_CoverA
|
real(pReal), dimension(:), allocatable :: constitutive_phenomenological_CoverA
|
||||||
real(pReal), dimension(:), allocatable :: constitutive_phenomenological_C11
|
real(pReal), dimension(:), allocatable :: constitutive_phenomenological_C11
|
||||||
real(pReal), dimension(:), allocatable :: constitutive_phenomenological_C12
|
real(pReal), dimension(:), allocatable :: constitutive_phenomenological_C12
|
||||||
|
@ -80,6 +82,7 @@ subroutine constitutive_phenomenological_init(file)
|
||||||
use math, only: math_Mandel3333to66, math_Voigt66to3333
|
use math, only: math_Mandel3333to66, math_Voigt66to3333
|
||||||
use IO
|
use IO
|
||||||
use material
|
use material
|
||||||
|
|
||||||
use lattice, only: lattice_initializeStructure
|
use lattice, only: lattice_initializeStructure
|
||||||
integer(pInt), intent(in) :: file
|
integer(pInt), intent(in) :: file
|
||||||
integer(pInt), parameter :: maxNchunks = 7
|
integer(pInt), parameter :: maxNchunks = 7
|
||||||
|
@ -96,9 +99,11 @@ subroutine constitutive_phenomenological_init(file)
|
||||||
allocate(constitutive_phenomenological_sizePostResults(maxNinstance)); constitutive_phenomenological_sizePostResults = 0_pInt
|
allocate(constitutive_phenomenological_sizePostResults(maxNinstance)); constitutive_phenomenological_sizePostResults = 0_pInt
|
||||||
allocate(constitutive_phenomenological_output(maxval(phase_Noutput), &
|
allocate(constitutive_phenomenological_output(maxval(phase_Noutput), &
|
||||||
maxNinstance)) ; constitutive_phenomenological_output = ''
|
maxNinstance)) ; constitutive_phenomenological_output = ''
|
||||||
|
|
||||||
allocate(constitutive_phenomenological_structureName(maxNinstance)) ; constitutive_phenomenological_structureName = ''
|
allocate(constitutive_phenomenological_structureName(maxNinstance)) ; constitutive_phenomenological_structureName = ''
|
||||||
allocate(constitutive_phenomenological_structure(maxNinstance)) ; constitutive_phenomenological_structure = 0_pInt
|
allocate(constitutive_phenomenological_structure(maxNinstance)) ; constitutive_phenomenological_structure = 0_pInt
|
||||||
allocate(constitutive_phenomenological_Nslip(maxNinstance)) ; constitutive_phenomenological_Nslip = 0_pInt
|
allocate(constitutive_phenomenological_Nslip(maxNinstance)) ; constitutive_phenomenological_Nslip = 0_pInt
|
||||||
|
|
||||||
allocate(constitutive_phenomenological_CoverA(maxNinstance)) ; constitutive_phenomenological_CoverA = 0.0_pReal
|
allocate(constitutive_phenomenological_CoverA(maxNinstance)) ; constitutive_phenomenological_CoverA = 0.0_pReal
|
||||||
allocate(constitutive_phenomenological_C11(maxNinstance)) ; constitutive_phenomenological_C11 = 0.0_pReal
|
allocate(constitutive_phenomenological_C11(maxNinstance)) ; constitutive_phenomenological_C11 = 0.0_pReal
|
||||||
allocate(constitutive_phenomenological_C12(maxNinstance)) ; constitutive_phenomenological_C12 = 0.0_pReal
|
allocate(constitutive_phenomenological_C12(maxNinstance)) ; constitutive_phenomenological_C12 = 0.0_pReal
|
||||||
|
@ -139,10 +144,13 @@ subroutine constitutive_phenomenological_init(file)
|
||||||
output = output + 1
|
output = output + 1
|
||||||
constitutive_phenomenological_output(output,i) = IO_lc(IO_stringValue(line,positions,2))
|
constitutive_phenomenological_output(output,i) = IO_lc(IO_stringValue(line,positions,2))
|
||||||
case ('lattice_structure')
|
case ('lattice_structure')
|
||||||
|
|
||||||
constitutive_phenomenological_structureName(i) = IO_lc(IO_stringValue(line,positions,2))
|
constitutive_phenomenological_structureName(i) = IO_lc(IO_stringValue(line,positions,2))
|
||||||
case ('nslip')
|
case ('nslip')
|
||||||
constitutive_phenomenological_Nslip(i) = IO_intValue(line,positions,2)
|
constitutive_phenomenological_Nslip(i) = IO_intValue(line,positions,2)
|
||||||
|
|
||||||
case ('covera_ratio')
|
case ('covera_ratio')
|
||||||
|
|
||||||
constitutive_phenomenological_CoverA(i) = IO_floatValue(line,positions,2)
|
constitutive_phenomenological_CoverA(i) = IO_floatValue(line,positions,2)
|
||||||
case ('c11')
|
case ('c11')
|
||||||
constitutive_phenomenological_C11(i) = IO_floatValue(line,positions,2)
|
constitutive_phenomenological_C11(i) = IO_floatValue(line,positions,2)
|
||||||
|
@ -173,7 +181,9 @@ subroutine constitutive_phenomenological_init(file)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
100 do i = 1,maxNinstance
|
100 do i = 1,maxNinstance
|
||||||
|
|
||||||
constitutive_phenomenological_structure(i) = lattice_initializeStructure(constitutive_phenomenological_structureName(i), &
|
constitutive_phenomenological_structure(i) = lattice_initializeStructure(constitutive_phenomenological_structureName(i), &
|
||||||
|
|
||||||
constitutive_phenomenological_CoverA(i)) ! sanity checks
|
constitutive_phenomenological_CoverA(i)) ! sanity checks
|
||||||
if (constitutive_phenomenological_structure(i) < 1 .or. &
|
if (constitutive_phenomenological_structure(i) < 1 .or. &
|
||||||
constitutive_phenomenological_structure(i) > 3) call IO_error(201)
|
constitutive_phenomenological_structure(i) > 3) call IO_error(201)
|
||||||
|
@ -242,22 +252,18 @@ subroutine constitutive_phenomenological_init(file)
|
||||||
end subroutine
|
end subroutine
|
||||||
|
|
||||||
|
|
||||||
function constitutive_phenomenological_stateInit(ipc,ip,el)
|
function constitutive_phenomenological_stateInit(myInstance)
|
||||||
!*********************************************************************
|
!*********************************************************************
|
||||||
!* initial microstructural state *
|
!* initial microstructural state *
|
||||||
!*********************************************************************
|
!*********************************************************************
|
||||||
use prec, only: pReal,pInt
|
use prec, only: pReal,pInt
|
||||||
use material, only: material_phase, phase_constitutionInstance
|
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
!* Definition of variables
|
!* Definition of variables
|
||||||
integer(pInt), intent(in) :: ipc,ip,el
|
integer(pInt), intent(in) :: myInstance
|
||||||
integer(pInt) matID
|
real(pReal), dimension(constitutive_phenomenological_Nslip(myInstance)) :: constitutive_phenomenological_stateInit
|
||||||
real(pReal), dimension(constitutive_phenomenological_Nslip(phase_constitutionInstance(material_phase(ipc,ip,el)))) :: &
|
|
||||||
constitutive_phenomenological_stateInit
|
|
||||||
|
|
||||||
matID = phase_constitutionInstance(material_phase(ipc,ip,el))
|
constitutive_phenomenological_stateInit = constitutive_phenomenological_s0_slip(myInstance)
|
||||||
constitutive_phenomenological_stateInit = constitutive_phenomenological_s0_slip(matID)
|
|
||||||
|
|
||||||
return
|
return
|
||||||
end function
|
end function
|
||||||
|
|
Loading…
Reference in New Issue