not compatible with generalized solution handling
This commit is contained in:
parent
226bbad013
commit
708fc9f6b3
|
@ -26,9 +26,7 @@ module homogenization
|
|||
homogenization_maxSizePostResults, &
|
||||
thermal_maxSizePostResults, &
|
||||
damage_maxSizePostResults, &
|
||||
vacancyflux_maxSizePostResults, &
|
||||
porosity_maxSizePostResults, &
|
||||
hydrogenflux_maxSizePostResults
|
||||
porosity_maxSizePostResults
|
||||
|
||||
real(pReal), dimension(:,:,:,:), allocatable, private :: &
|
||||
materialpoint_subF0, & !< def grad of IP at beginning of homogenization increment
|
||||
|
@ -100,13 +98,8 @@ subroutine homogenization_init
|
|||
use damage_none
|
||||
use damage_local
|
||||
use damage_nonlocal
|
||||
use vacancyflux_isoconc
|
||||
use vacancyflux_isochempot
|
||||
use vacancyflux_cahnhilliard
|
||||
use porosity_none
|
||||
use porosity_phasefield
|
||||
use hydrogenflux_isoconc
|
||||
use hydrogenflux_cahnhilliard
|
||||
use IO
|
||||
use numerics, only: &
|
||||
worldrank
|
||||
|
@ -155,16 +148,6 @@ subroutine homogenization_init
|
|||
if (any(damage_type == DAMAGE_nonlocal_ID)) &
|
||||
call damage_nonlocal_init(FILEUNIT)
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! parse vacancy transport from config file
|
||||
call IO_checkAndRewind(FILEUNIT)
|
||||
if (any(vacancyflux_type == VACANCYFLUX_isoconc_ID)) &
|
||||
call vacancyflux_isoconc_init()
|
||||
if (any(vacancyflux_type == VACANCYFLUX_isochempot_ID)) &
|
||||
call vacancyflux_isochempot_init(FILEUNIT)
|
||||
if (any(vacancyflux_type == VACANCYFLUX_cahnhilliard_ID)) &
|
||||
call vacancyflux_cahnhilliard_init(FILEUNIT)
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! parse porosity from config file
|
||||
call IO_checkAndRewind(FILEUNIT)
|
||||
|
@ -173,15 +156,6 @@ subroutine homogenization_init
|
|||
if (any(porosity_type == POROSITY_phasefield_ID)) &
|
||||
call porosity_phasefield_init(FILEUNIT)
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! parse hydrogen transport from config file
|
||||
call IO_checkAndRewind(FILEUNIT)
|
||||
if (any(hydrogenflux_type == HYDROGENFLUX_isoconc_ID)) &
|
||||
call hydrogenflux_isoconc_init()
|
||||
if (any(hydrogenflux_type == HYDROGENFLUX_cahnhilliard_ID)) &
|
||||
call hydrogenflux_cahnhilliard_init(FILEUNIT)
|
||||
close(FILEUNIT)
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! write description file for homogenization output
|
||||
mainProcess2: if (worldrank == 0) then
|
||||
|
@ -277,35 +251,6 @@ subroutine homogenization_init
|
|||
enddo
|
||||
endif
|
||||
endif
|
||||
i = vacancyflux_typeInstance(p) ! which instance of this vacancy flux type
|
||||
valid = .true. ! assume valid
|
||||
select case(vacancyflux_type(p)) ! split per vacancy flux type
|
||||
case (VACANCYFLUX_isoconc_ID)
|
||||
outputName = VACANCYFLUX_isoconc_label
|
||||
thisNoutput => null()
|
||||
thisOutput => null()
|
||||
thisSize => null()
|
||||
case (VACANCYFLUX_isochempot_ID)
|
||||
outputName = VACANCYFLUX_isochempot_label
|
||||
thisNoutput => vacancyflux_isochempot_Noutput
|
||||
thisOutput => vacancyflux_isochempot_output
|
||||
thisSize => vacancyflux_isochempot_sizePostResult
|
||||
case (VACANCYFLUX_cahnhilliard_ID)
|
||||
outputName = VACANCYFLUX_cahnhilliard_label
|
||||
thisNoutput => vacancyflux_cahnhilliard_Noutput
|
||||
thisOutput => vacancyflux_cahnhilliard_output
|
||||
thisSize => vacancyflux_cahnhilliard_sizePostResult
|
||||
case default
|
||||
valid = .false.
|
||||
end select
|
||||
if (valid) then
|
||||
write(FILEUNIT,'(a)') '(vacancyflux)'//char(9)//trim(outputName)
|
||||
if (vacancyflux_type(p) /= VACANCYFLUX_isoconc_ID) then
|
||||
do e = 1,thisNoutput(i)
|
||||
write(FILEUNIT,'(a,i4)') trim(thisOutput(e,i))//char(9),thisSize(e,i)
|
||||
enddo
|
||||
endif
|
||||
endif
|
||||
i = porosity_typeInstance(p) ! which instance of this porosity type
|
||||
valid = .true. ! assume valid
|
||||
select case(porosity_type(p)) ! split per porosity type
|
||||
|
@ -330,30 +275,6 @@ subroutine homogenization_init
|
|||
enddo
|
||||
endif
|
||||
endif
|
||||
i = hydrogenflux_typeInstance(p) ! which instance of this hydrogen flux type
|
||||
valid = .true. ! assume valid
|
||||
select case(hydrogenflux_type(p)) ! split per hydrogen flux type
|
||||
case (HYDROGENFLUX_isoconc_ID)
|
||||
outputName = HYDROGENFLUX_isoconc_label
|
||||
thisNoutput => null()
|
||||
thisOutput => null()
|
||||
thisSize => null()
|
||||
case (HYDROGENFLUX_cahnhilliard_ID)
|
||||
outputName = HYDROGENFLUX_cahnhilliard_label
|
||||
thisNoutput => hydrogenflux_cahnhilliard_Noutput
|
||||
thisOutput => hydrogenflux_cahnhilliard_output
|
||||
thisSize => hydrogenflux_cahnhilliard_sizePostResult
|
||||
case default
|
||||
valid = .false.
|
||||
end select
|
||||
if (valid) then
|
||||
write(FILEUNIT,'(a)') '(hydrogenflux)'//char(9)//trim(outputName)
|
||||
if (hydrogenflux_type(p) /= HYDROGENFLUX_isoconc_ID) then
|
||||
do e = 1,thisNoutput(i)
|
||||
write(FILEUNIT,'(a,i4)') trim(thisOutput(e,i))//char(9),thisSize(e,i)
|
||||
enddo
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
enddo
|
||||
close(FILEUNIT)
|
||||
|
@ -383,25 +304,19 @@ subroutine homogenization_init
|
|||
homogenization_maxSizePostResults = 0_pInt
|
||||
thermal_maxSizePostResults = 0_pInt
|
||||
damage_maxSizePostResults = 0_pInt
|
||||
vacancyflux_maxSizePostResults = 0_pInt
|
||||
porosity_maxSizePostResults = 0_pInt
|
||||
hydrogenflux_maxSizePostResults = 0_pInt
|
||||
do p = 1,size(config_homogenization)
|
||||
homogenization_maxSizePostResults = max(homogenization_maxSizePostResults,homogState (p)%sizePostResults)
|
||||
thermal_maxSizePostResults = max(thermal_maxSizePostResults, thermalState (p)%sizePostResults)
|
||||
damage_maxSizePostResults = max(damage_maxSizePostResults ,damageState (p)%sizePostResults)
|
||||
vacancyflux_maxSizePostResults = max(vacancyflux_maxSizePostResults ,vacancyfluxState (p)%sizePostResults)
|
||||
porosity_maxSizePostResults = max(porosity_maxSizePostResults ,porosityState (p)%sizePostResults)
|
||||
hydrogenflux_maxSizePostResults = max(hydrogenflux_maxSizePostResults ,hydrogenfluxState(p)%sizePostResults)
|
||||
enddo
|
||||
|
||||
materialpoint_sizeResults = 1 & ! grain count
|
||||
+ 1 + homogenization_maxSizePostResults & ! homogSize & homogResult
|
||||
+ thermal_maxSizePostResults &
|
||||
+ damage_maxSizePostResults &
|
||||
+ vacancyflux_maxSizePostResults &
|
||||
+ porosity_maxSizePostResults &
|
||||
+ hydrogenflux_maxSizePostResults &
|
||||
+ homogenization_maxNgrains * (1 + crystallite_maxSizePostResults & ! crystallite size & crystallite results
|
||||
+ 1 + constitutive_plasticity_maxSizePostResults & ! constitutive size & constitutive results
|
||||
+ constitutive_source_maxSizePostResults)
|
||||
|
@ -460,9 +375,7 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
|
|||
homogState, &
|
||||
thermalState, &
|
||||
damageState, &
|
||||
vacancyfluxState, &
|
||||
porosityState, &
|
||||
hydrogenfluxState, &
|
||||
phase_Nsources, &
|
||||
mappingHomogenization, &
|
||||
phaseAt, phasememberAt, &
|
||||
|
@ -569,18 +482,10 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
|
|||
damageState(mappingHomogenization(2,i,e))%sizeState > 0_pInt) &
|
||||
damageState(mappingHomogenization(2,i,e))%subState0(:,mappingHomogenization(1,i,e)) = &
|
||||
damageState(mappingHomogenization(2,i,e))%State0( :,mappingHomogenization(1,i,e)) ! ...internal damage state
|
||||
forall(i = FEsolving_execIP(1,e):FEsolving_execIP(2,e), &
|
||||
vacancyfluxState(mappingHomogenization(2,i,e))%sizeState > 0_pInt) &
|
||||
vacancyfluxState(mappingHomogenization(2,i,e))%subState0(:,mappingHomogenization(1,i,e)) = &
|
||||
vacancyfluxState(mappingHomogenization(2,i,e))%State0( :,mappingHomogenization(1,i,e)) ! ...internal vacancy transport state
|
||||
forall(i = FEsolving_execIP(1,e):FEsolving_execIP(2,e), &
|
||||
porosityState(mappingHomogenization(2,i,e))%sizeState > 0_pInt) &
|
||||
porosityState(mappingHomogenization(2,i,e))%subState0(:,mappingHomogenization(1,i,e)) = &
|
||||
porosityState(mappingHomogenization(2,i,e))%State0( :,mappingHomogenization(1,i,e)) ! ...internal porosity state
|
||||
forall(i = FEsolving_execIP(1,e):FEsolving_execIP(2,e), &
|
||||
hydrogenfluxState(mappingHomogenization(2,i,e))%sizeState > 0_pInt) &
|
||||
hydrogenfluxState(mappingHomogenization(2,i,e))%subState0(:,mappingHomogenization(1,i,e)) = &
|
||||
hydrogenfluxState(mappingHomogenization(2,i,e))%State0( :,mappingHomogenization(1,i,e)) ! ...internal hydrogen transport state
|
||||
enddo
|
||||
NiterationHomog = 0_pInt
|
||||
|
||||
|
@ -654,18 +559,10 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
|
|||
damageState(mappingHomogenization(2,i,e))%sizeState > 0_pInt) &
|
||||
damageState(mappingHomogenization(2,i,e))%subState0(:,mappingHomogenization(1,i,e)) = &
|
||||
damageState(mappingHomogenization(2,i,e))%State( :,mappingHomogenization(1,i,e)) ! ...internal damage state
|
||||
forall(i = FEsolving_execIP(1,e):FEsolving_execIP(2,e), &
|
||||
vacancyfluxState(mappingHomogenization(2,i,e))%sizeState > 0_pInt) &
|
||||
vacancyfluxState(mappingHomogenization(2,i,e))%subState0(:,mappingHomogenization(1,i,e)) = &
|
||||
vacancyfluxState(mappingHomogenization(2,i,e))%State( :,mappingHomogenization(1,i,e))! ...internal vacancy transport state
|
||||
forall(i = FEsolving_execIP(1,e):FEsolving_execIP(2,e), &
|
||||
porosityState(mappingHomogenization(2,i,e))%sizeState > 0_pInt) &
|
||||
porosityState(mappingHomogenization(2,i,e))%subState0(:,mappingHomogenization(1,i,e)) = &
|
||||
porosityState(mappingHomogenization(2,i,e))%State( :,mappingHomogenization(1,i,e))! ...internal porosity state
|
||||
forall(i = FEsolving_execIP(1,e):FEsolving_execIP(2,e), &
|
||||
hydrogenfluxState(mappingHomogenization(2,i,e))%sizeState > 0_pInt) &
|
||||
hydrogenfluxState(mappingHomogenization(2,i,e))%subState0(:,mappingHomogenization(1,i,e)) = &
|
||||
hydrogenfluxState(mappingHomogenization(2,i,e))%State( :,mappingHomogenization(1,i,e))! ...internal hydrogen transport state
|
||||
materialpoint_subF0(1:3,1:3,i,e) = materialpoint_subF(1:3,1:3,i,e) ! ...def grad
|
||||
endif steppingNeeded
|
||||
|
||||
|
@ -729,18 +626,10 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
|
|||
damageState(mappingHomogenization(2,i,e))%sizeState > 0_pInt) &
|
||||
damageState(mappingHomogenization(2,i,e))%State( :,mappingHomogenization(1,i,e)) = &
|
||||
damageState(mappingHomogenization(2,i,e))%subState0(:,mappingHomogenization(1,i,e)) ! ...internal damage state
|
||||
forall(i = FEsolving_execIP(1,e):FEsolving_execIP(2,e), &
|
||||
vacancyfluxState(mappingHomogenization(2,i,e))%sizeState > 0_pInt) &
|
||||
vacancyfluxState(mappingHomogenization(2,i,e))%State( :,mappingHomogenization(1,i,e)) = &
|
||||
vacancyfluxState(mappingHomogenization(2,i,e))%subState0(:,mappingHomogenization(1,i,e))! ...internal vacancy transport state
|
||||
forall(i = FEsolving_execIP(1,e):FEsolving_execIP(2,e), &
|
||||
porosityState(mappingHomogenization(2,i,e))%sizeState > 0_pInt) &
|
||||
porosityState(mappingHomogenization(2,i,e))%State( :,mappingHomogenization(1,i,e)) = &
|
||||
porosityState(mappingHomogenization(2,i,e))%subState0(:,mappingHomogenization(1,i,e))! ...internal porosity state
|
||||
forall(i = FEsolving_execIP(1,e):FEsolving_execIP(2,e), &
|
||||
hydrogenfluxState(mappingHomogenization(2,i,e))%sizeState > 0_pInt) &
|
||||
hydrogenfluxState(mappingHomogenization(2,i,e))%State( :,mappingHomogenization(1,i,e)) = &
|
||||
hydrogenfluxState(mappingHomogenization(2,i,e))%subState0(:,mappingHomogenization(1,i,e))! ...internal hydrogen transport state
|
||||
endif
|
||||
endif converged
|
||||
|
||||
|
@ -846,9 +735,7 @@ subroutine materialpoint_postResults
|
|||
homogState, &
|
||||
thermalState, &
|
||||
damageState, &
|
||||
vacancyfluxState, &
|
||||
porosityState, &
|
||||
hydrogenfluxState, &
|
||||
plasticState, &
|
||||
sourceState, &
|
||||
material_phase, &
|
||||
|
@ -878,9 +765,7 @@ subroutine materialpoint_postResults
|
|||
theSize = homogState (mappingHomogenization(2,i,e))%sizePostResults &
|
||||
+ thermalState (mappingHomogenization(2,i,e))%sizePostResults &
|
||||
+ damageState (mappingHomogenization(2,i,e))%sizePostResults &
|
||||
+ vacancyfluxState (mappingHomogenization(2,i,e))%sizePostResults &
|
||||
+ porosityState (mappingHomogenization(2,i,e))%sizePostResults &
|
||||
+ hydrogenfluxState(mappingHomogenization(2,i,e))%sizePostResults
|
||||
+ porosityState (mappingHomogenization(2,i,e))%sizePostResults
|
||||
materialpoint_results(thePos+1,i,e) = real(theSize,pReal) ! tell size of homogenization results
|
||||
thePos = thePos + 1_pInt
|
||||
|
||||
|
@ -964,12 +849,10 @@ function homogenization_updateState(ip,el)
|
|||
homogenization_type, &
|
||||
thermal_type, &
|
||||
damage_type, &
|
||||
vacancyflux_type, &
|
||||
homogenization_maxNgrains, &
|
||||
HOMOGENIZATION_RGC_ID, &
|
||||
THERMAL_adiabatic_ID, &
|
||||
DAMAGE_local_ID, &
|
||||
VACANCYFLUX_isochempot_ID
|
||||
DAMAGE_local_ID
|
||||
use crystallite, only: &
|
||||
crystallite_P, &
|
||||
crystallite_dPdF, &
|
||||
|
@ -981,8 +864,6 @@ function homogenization_updateState(ip,el)
|
|||
thermal_adiabatic_updateState
|
||||
use damage_local, only: &
|
||||
damage_local_updateState
|
||||
use vacancyflux_isochempot, only: &
|
||||
vacancyflux_isochempot_updateState
|
||||
|
||||
implicit none
|
||||
integer(pInt), intent(in) :: &
|
||||
|
@ -1023,15 +904,6 @@ function homogenization_updateState(ip,el)
|
|||
el)
|
||||
end select chosenDamage
|
||||
|
||||
chosenVacancyflux: select case (vacancyflux_type(mesh_element(3,el)))
|
||||
case (VACANCYFLUX_isochempot_ID) chosenVacancyflux
|
||||
homogenization_updateState = &
|
||||
homogenization_updateState .and. &
|
||||
vacancyflux_isochempot_updateState(materialpoint_subdt(ip,el), &
|
||||
ip, &
|
||||
el)
|
||||
end select chosenVacancyflux
|
||||
|
||||
end function homogenization_updateState
|
||||
|
||||
|
||||
|
@ -1095,15 +967,11 @@ function homogenization_postResults(ip,el)
|
|||
homogState, &
|
||||
thermalState, &
|
||||
damageState, &
|
||||
vacancyfluxState, &
|
||||
porosityState, &
|
||||
hydrogenfluxState, &
|
||||
homogenization_type, &
|
||||
thermal_type, &
|
||||
damage_type, &
|
||||
vacancyflux_type, &
|
||||
porosity_type, &
|
||||
hydrogenflux_type, &
|
||||
HOMOGENIZATION_NONE_ID, &
|
||||
HOMOGENIZATION_ISOSTRAIN_ID, &
|
||||
HOMOGENIZATION_RGC_ID, &
|
||||
|
@ -1113,13 +981,8 @@ function homogenization_postResults(ip,el)
|
|||
DAMAGE_none_ID, &
|
||||
DAMAGE_local_ID, &
|
||||
DAMAGE_nonlocal_ID, &
|
||||
VACANCYFLUX_isoconc_ID, &
|
||||
VACANCYFLUX_isochempot_ID, &
|
||||
VACANCYFLUX_cahnhilliard_ID, &
|
||||
POROSITY_none_ID, &
|
||||
POROSITY_phasefield_ID, &
|
||||
HYDROGENFLUX_isoconc_ID, &
|
||||
HYDROGENFLUX_cahnhilliard_ID
|
||||
POROSITY_phasefield_ID
|
||||
use homogenization_isostrain, only: &
|
||||
homogenization_isostrain_postResults
|
||||
use homogenization_RGC, only: &
|
||||
|
@ -1132,14 +995,8 @@ function homogenization_postResults(ip,el)
|
|||
damage_local_postResults
|
||||
use damage_nonlocal, only: &
|
||||
damage_nonlocal_postResults
|
||||
use vacancyflux_isochempot, only: &
|
||||
vacancyflux_isochempot_postResults
|
||||
use vacancyflux_cahnhilliard, only: &
|
||||
vacancyflux_cahnhilliard_postResults
|
||||
use porosity_phasefield, only: &
|
||||
porosity_phasefield_postResults
|
||||
use hydrogenflux_cahnhilliard, only: &
|
||||
hydrogenflux_cahnhilliard_postResults
|
||||
|
||||
implicit none
|
||||
integer(pInt), intent(in) :: &
|
||||
|
@ -1148,9 +1005,7 @@ function homogenization_postResults(ip,el)
|
|||
real(pReal), dimension( homogState (mappingHomogenization(2,ip,el))%sizePostResults &
|
||||
+ thermalState (mappingHomogenization(2,ip,el))%sizePostResults &
|
||||
+ damageState (mappingHomogenization(2,ip,el))%sizePostResults &
|
||||
+ vacancyfluxState (mappingHomogenization(2,ip,el))%sizePostResults &
|
||||
+ porosityState (mappingHomogenization(2,ip,el))%sizePostResults &
|
||||
+ hydrogenfluxState(mappingHomogenization(2,ip,el))%sizePostResults) :: &
|
||||
+ porosityState (mappingHomogenization(2,ip,el))%sizePostResults) :: &
|
||||
homogenization_postResults
|
||||
integer(pInt) :: &
|
||||
startPos, endPos
|
||||
|
@ -1205,18 +1060,6 @@ function homogenization_postResults(ip,el)
|
|||
damage_nonlocal_postResults(ip, el)
|
||||
end select chosenDamage
|
||||
|
||||
startPos = endPos + 1_pInt
|
||||
endPos = endPos + vacancyfluxState(mappingHomogenization(2,ip,el))%sizePostResults
|
||||
chosenVacancyflux: select case (vacancyflux_type(mesh_element(3,el)))
|
||||
case (VACANCYFLUX_isoconc_ID) chosenVacancyflux
|
||||
|
||||
case (VACANCYFLUX_isochempot_ID) chosenVacancyflux
|
||||
homogenization_postResults(startPos:endPos) = &
|
||||
vacancyflux_isochempot_postResults(ip, el)
|
||||
case (VACANCYFLUX_cahnhilliard_ID) chosenVacancyflux
|
||||
homogenization_postResults(startPos:endPos) = &
|
||||
vacancyflux_cahnhilliard_postResults(ip, el)
|
||||
end select chosenVacancyflux
|
||||
|
||||
startPos = endPos + 1_pInt
|
||||
endPos = endPos + porosityState(mappingHomogenization(2,ip,el))%sizePostResults
|
||||
|
@ -1228,15 +1071,6 @@ function homogenization_postResults(ip,el)
|
|||
porosity_phasefield_postResults(ip, el)
|
||||
end select chosenPorosity
|
||||
|
||||
startPos = endPos + 1_pInt
|
||||
endPos = endPos + hydrogenfluxState(mappingHomogenization(2,ip,el))%sizePostResults
|
||||
chosenHydrogenflux: select case (hydrogenflux_type(mesh_element(3,el)))
|
||||
case (HYDROGENFLUX_isoconc_ID) chosenHydrogenflux
|
||||
|
||||
case (HYDROGENFLUX_cahnhilliard_ID) chosenHydrogenflux
|
||||
homogenization_postResults(startPos:endPos) = &
|
||||
hydrogenflux_cahnhilliard_postResults(ip, el)
|
||||
end select chosenHydrogenflux
|
||||
|
||||
end function homogenization_postResults
|
||||
|
||||
|
|
Loading…
Reference in New Issue