cleaning almost done
This commit is contained in:
parent
1520adb3fb
commit
13f321d992
|
@ -90,9 +90,7 @@ list(APPEND OBJECTFILES $<TARGET_OBJECTS:PLASTIC>)
|
|||
add_library (KINEMATICS OBJECT
|
||||
"kinematics_cleavage_opening.f90"
|
||||
"kinematics_slipplane_opening.f90"
|
||||
"kinematics_thermal_expansion.f90"
|
||||
"kinematics_vacancy_strain.f90"
|
||||
"kinematics_hydrogen_strain.f90")
|
||||
"kinematics_thermal_expansion.f90")
|
||||
add_dependencies(KINEMATICS DAMASK_HELPERS)
|
||||
list(APPEND OBJECTFILES $<TARGET_OBJECTS:KINEMATICS>)
|
||||
|
||||
|
@ -102,10 +100,7 @@ add_library (SOURCE OBJECT
|
|||
"source_damage_isoBrittle.f90"
|
||||
"source_damage_isoDuctile.f90"
|
||||
"source_damage_anisoBrittle.f90"
|
||||
"source_damage_anisoDuctile.f90"
|
||||
"source_vacancy_phenoplasticity.f90"
|
||||
"source_vacancy_irradiation.f90"
|
||||
"source_vacancy_thermalfluc.f90")
|
||||
"source_damage_anisoDuctile.f90")
|
||||
add_dependencies(SOURCE DAMASK_HELPERS)
|
||||
list(APPEND OBJECTFILES $<TARGET_OBJECTS:SOURCE>)
|
||||
|
||||
|
@ -124,25 +119,6 @@ add_library(HOMOGENIZATION OBJECT
|
|||
add_dependencies(HOMOGENIZATION CRYSTALLITE)
|
||||
list(APPEND OBJECTFILES $<TARGET_OBJECTS:HOMOGENIZATION>)
|
||||
|
||||
add_library(HYDROGENFLUX OBJECT
|
||||
"hydrogenflux_isoconc.f90"
|
||||
"hydrogenflux_cahnhilliard.f90")
|
||||
add_dependencies(HYDROGENFLUX CRYSTALLITE)
|
||||
list(APPEND OBJECTFILES $<TARGET_OBJECTS:HYDROGENFLUX>)
|
||||
|
||||
add_library(POROSITY OBJECT
|
||||
"porosity_none.f90"
|
||||
"porosity_phasefield.f90")
|
||||
add_dependencies(POROSITY CRYSTALLITE)
|
||||
list(APPEND OBJECTFILES $<TARGET_OBJECTS:POROSITY>)
|
||||
|
||||
add_library(VACANCYFLUX OBJECT
|
||||
"vacancyflux_isoconc.f90"
|
||||
"vacancyflux_isochempot.f90"
|
||||
"vacancyflux_cahnhilliard.f90")
|
||||
add_dependencies(VACANCYFLUX CRYSTALLITE)
|
||||
list(APPEND OBJECTFILES $<TARGET_OBJECTS:VACANCYFLUX>)
|
||||
|
||||
add_library(DAMAGE OBJECT
|
||||
"damage_none.f90"
|
||||
"damage_local.f90"
|
||||
|
@ -158,7 +134,7 @@ add_dependencies(THERMAL CRYSTALLITE)
|
|||
list(APPEND OBJECTFILES $<TARGET_OBJECTS:THERMAL>)
|
||||
|
||||
add_library(DAMASK_ENGINE OBJECT "homogenization.f90")
|
||||
add_dependencies(DAMASK_ENGINE THERMAL DAMAGE VACANCYFLUX POROSITY HYDROGENFLUX HOMOGENIZATION)
|
||||
add_dependencies(DAMASK_ENGINE THERMAL DAMAGE HOMOGENIZATION)
|
||||
list(APPEND OBJECTFILES $<TARGET_OBJECTS:DAMASK_ENGINE>)
|
||||
|
||||
add_library(DAMASK_CPFE OBJECT "CPFEM2.f90")
|
||||
|
|
|
@ -304,8 +304,6 @@ subroutine CPFEM_general(mode, parallelExecution, ffn, ffn1, temperature_inp, dt
|
|||
homogState, &
|
||||
thermalState, &
|
||||
damageState, &
|
||||
vacancyfluxState, &
|
||||
hydrogenfluxState, &
|
||||
phaseAt, phasememberAt, &
|
||||
material_phase, &
|
||||
phase_plasticity, &
|
||||
|
@ -421,8 +419,6 @@ subroutine CPFEM_general(mode, parallelExecution, ffn, ffn1, temperature_inp, dt
|
|||
homogState (homog)%state0 = homogState (homog)%state
|
||||
thermalState (homog)%state0 = thermalState (homog)%state
|
||||
damageState (homog)%state0 = damageState (homog)%state
|
||||
vacancyfluxState (homog)%state0 = vacancyfluxState (homog)%state
|
||||
hydrogenfluxState(homog)%state0 = hydrogenfluxState(homog)%state
|
||||
enddo
|
||||
|
||||
|
||||
|
|
|
@ -203,8 +203,6 @@ subroutine CPFEM_age()
|
|||
homogState, &
|
||||
thermalState, &
|
||||
damageState, &
|
||||
vacancyfluxState, &
|
||||
hydrogenfluxState, &
|
||||
material_phase, &
|
||||
phase_plasticity, &
|
||||
phase_Nsources
|
||||
|
@ -268,8 +266,6 @@ if (iand(debug_level(debug_CPFEM), debug_levelBasic) /= 0_pInt) &
|
|||
homogState (homog)%state0 = homogState (homog)%state
|
||||
thermalState (homog)%state0 = thermalState (homog)%state
|
||||
damageState (homog)%state0 = damageState (homog)%state
|
||||
vacancyfluxState (homog)%state0 = vacancyfluxState (homog)%state
|
||||
hydrogenfluxState(homog)%state0 = hydrogenfluxState(homog)%state
|
||||
enddo
|
||||
|
||||
if (restartWrite) then
|
||||
|
|
|
@ -21,14 +21,9 @@
|
|||
#include "source_damage_isoDuctile.f90"
|
||||
#include "source_damage_anisoBrittle.f90"
|
||||
#include "source_damage_anisoDuctile.f90"
|
||||
#include "source_vacancy_phenoplasticity.f90"
|
||||
#include "source_vacancy_irradiation.f90"
|
||||
#include "source_vacancy_thermalfluc.f90"
|
||||
#include "kinematics_cleavage_opening.f90"
|
||||
#include "kinematics_slipplane_opening.f90"
|
||||
#include "kinematics_thermal_expansion.f90"
|
||||
#include "kinematics_vacancy_strain.f90"
|
||||
#include "kinematics_hydrogen_strain.f90"
|
||||
#include "plastic_none.f90"
|
||||
#include "plastic_isotropic.f90"
|
||||
#include "plastic_phenopowerlaw.f90"
|
||||
|
@ -47,12 +42,5 @@
|
|||
#include "damage_none.f90"
|
||||
#include "damage_local.f90"
|
||||
#include "damage_nonlocal.f90"
|
||||
#include "vacancyflux_isoconc.f90"
|
||||
#include "vacancyflux_isochempot.f90"
|
||||
#include "vacancyflux_cahnhilliard.f90"
|
||||
#include "porosity_none.f90"
|
||||
#include "porosity_phasefield.f90"
|
||||
#include "hydrogenflux_isoconc.f90"
|
||||
#include "hydrogenflux_cahnhilliard.f90"
|
||||
#include "homogenization.f90"
|
||||
#include "CPFEM.f90"
|
||||
|
|
|
@ -25,8 +25,7 @@ module homogenization
|
|||
materialpoint_sizeResults, &
|
||||
homogenization_maxSizePostResults, &
|
||||
thermal_maxSizePostResults, &
|
||||
damage_maxSizePostResults, &
|
||||
porosity_maxSizePostResults
|
||||
damage_maxSizePostResults
|
||||
|
||||
real(pReal), dimension(:,:,:,:), allocatable, private :: &
|
||||
materialpoint_subF0, & !< def grad of IP at beginning of homogenization increment
|
||||
|
@ -98,8 +97,6 @@ subroutine homogenization_init
|
|||
use damage_none
|
||||
use damage_local
|
||||
use damage_nonlocal
|
||||
use porosity_none
|
||||
use porosity_phasefield
|
||||
use IO
|
||||
use numerics, only: &
|
||||
worldrank
|
||||
|
@ -148,14 +145,6 @@ subroutine homogenization_init
|
|||
if (any(damage_type == DAMAGE_nonlocal_ID)) &
|
||||
call damage_nonlocal_init(FILEUNIT)
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! parse porosity from config file
|
||||
call IO_checkAndRewind(FILEUNIT)
|
||||
if (any(porosity_type == POROSITY_none_ID)) &
|
||||
call porosity_none_init()
|
||||
if (any(porosity_type == POROSITY_phasefield_ID)) &
|
||||
call porosity_phasefield_init(FILEUNIT)
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! write description file for homogenization output
|
||||
mainProcess2: if (worldrank == 0) then
|
||||
|
@ -251,30 +240,6 @@ subroutine homogenization_init
|
|||
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
|
||||
case (POROSITY_none_ID)
|
||||
outputName = POROSITY_none_label
|
||||
thisNoutput => null()
|
||||
thisOutput => null()
|
||||
thisSize => null()
|
||||
case (POROSITY_phasefield_ID)
|
||||
outputName = POROSITY_phasefield_label
|
||||
thisNoutput => porosity_phasefield_Noutput
|
||||
thisOutput => porosity_phasefield_output
|
||||
thisSize => porosity_phasefield_sizePostResult
|
||||
case default
|
||||
valid = .false.
|
||||
end select
|
||||
if (valid) then
|
||||
write(FILEUNIT,'(a)') '(porosity)'//char(9)//trim(outputName)
|
||||
if (porosity_type(p) /= POROSITY_none_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)
|
||||
|
@ -304,19 +269,16 @@ subroutine homogenization_init
|
|||
homogenization_maxSizePostResults = 0_pInt
|
||||
thermal_maxSizePostResults = 0_pInt
|
||||
damage_maxSizePostResults = 0_pInt
|
||||
porosity_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)
|
||||
porosity_maxSizePostResults = max(porosity_maxSizePostResults ,porosityState (p)%sizePostResults)
|
||||
enddo
|
||||
|
||||
materialpoint_sizeResults = 1 & ! grain count
|
||||
+ 1 + homogenization_maxSizePostResults & ! homogSize & homogResult
|
||||
+ thermal_maxSizePostResults &
|
||||
+ damage_maxSizePostResults &
|
||||
+ porosity_maxSizePostResults &
|
||||
+ homogenization_maxNgrains * (1 + crystallite_maxSizePostResults & ! crystallite size & crystallite results
|
||||
+ 1 + constitutive_plasticity_maxSizePostResults & ! constitutive size & constitutive results
|
||||
+ constitutive_source_maxSizePostResults)
|
||||
|
@ -375,7 +337,6 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
|
|||
homogState, &
|
||||
thermalState, &
|
||||
damageState, &
|
||||
porosityState, &
|
||||
phase_Nsources, &
|
||||
mappingHomogenization, &
|
||||
phaseAt, phasememberAt, &
|
||||
|
@ -482,10 +443,6 @@ 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), &
|
||||
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
|
||||
enddo
|
||||
NiterationHomog = 0_pInt
|
||||
|
||||
|
@ -559,10 +516,6 @@ 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), &
|
||||
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
|
||||
materialpoint_subF0(1:3,1:3,i,e) = materialpoint_subF(1:3,1:3,i,e) ! ...def grad
|
||||
endif steppingNeeded
|
||||
|
||||
|
@ -626,10 +579,6 @@ 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), &
|
||||
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
|
||||
endif
|
||||
endif converged
|
||||
|
||||
|
@ -735,7 +684,6 @@ subroutine materialpoint_postResults
|
|||
homogState, &
|
||||
thermalState, &
|
||||
damageState, &
|
||||
porosityState, &
|
||||
plasticState, &
|
||||
sourceState, &
|
||||
material_phase, &
|
||||
|
@ -764,8 +712,7 @@ subroutine materialpoint_postResults
|
|||
|
||||
theSize = homogState (mappingHomogenization(2,i,e))%sizePostResults &
|
||||
+ thermalState (mappingHomogenization(2,i,e))%sizePostResults &
|
||||
+ damageState (mappingHomogenization(2,i,e))%sizePostResults &
|
||||
+ porosityState (mappingHomogenization(2,i,e))%sizePostResults
|
||||
+ damageState (mappingHomogenization(2,i,e))%sizePostResults
|
||||
materialpoint_results(thePos+1,i,e) = real(theSize,pReal) ! tell size of homogenization results
|
||||
thePos = thePos + 1_pInt
|
||||
|
||||
|
@ -967,11 +914,9 @@ function homogenization_postResults(ip,el)
|
|||
homogState, &
|
||||
thermalState, &
|
||||
damageState, &
|
||||
porosityState, &
|
||||
homogenization_type, &
|
||||
thermal_type, &
|
||||
damage_type, &
|
||||
porosity_type, &
|
||||
HOMOGENIZATION_NONE_ID, &
|
||||
HOMOGENIZATION_ISOSTRAIN_ID, &
|
||||
HOMOGENIZATION_RGC_ID, &
|
||||
|
@ -980,9 +925,7 @@ function homogenization_postResults(ip,el)
|
|||
THERMAL_conduction_ID, &
|
||||
DAMAGE_none_ID, &
|
||||
DAMAGE_local_ID, &
|
||||
DAMAGE_nonlocal_ID, &
|
||||
POROSITY_none_ID, &
|
||||
POROSITY_phasefield_ID
|
||||
DAMAGE_nonlocal_ID
|
||||
use homogenization_isostrain, only: &
|
||||
homogenization_isostrain_postResults
|
||||
use homogenization_RGC, only: &
|
||||
|
@ -995,8 +938,6 @@ function homogenization_postResults(ip,el)
|
|||
damage_local_postResults
|
||||
use damage_nonlocal, only: &
|
||||
damage_nonlocal_postResults
|
||||
use porosity_phasefield, only: &
|
||||
porosity_phasefield_postResults
|
||||
|
||||
implicit none
|
||||
integer(pInt), intent(in) :: &
|
||||
|
@ -1004,8 +945,7 @@ function homogenization_postResults(ip,el)
|
|||
el !< element number
|
||||
real(pReal), dimension( homogState (mappingHomogenization(2,ip,el))%sizePostResults &
|
||||
+ thermalState (mappingHomogenization(2,ip,el))%sizePostResults &
|
||||
+ damageState (mappingHomogenization(2,ip,el))%sizePostResults &
|
||||
+ porosityState (mappingHomogenization(2,ip,el))%sizePostResults) :: &
|
||||
+ damageState (mappingHomogenization(2,ip,el))%sizePostResults) :: &
|
||||
homogenization_postResults
|
||||
integer(pInt) :: &
|
||||
startPos, endPos
|
||||
|
@ -1060,18 +1000,6 @@ function homogenization_postResults(ip,el)
|
|||
damage_nonlocal_postResults(ip, el)
|
||||
end select chosenDamage
|
||||
|
||||
|
||||
startPos = endPos + 1_pInt
|
||||
endPos = endPos + porosityState(mappingHomogenization(2,ip,el))%sizePostResults
|
||||
chosenPorosity: select case (porosity_type(mesh_element(3,el)))
|
||||
case (POROSITY_none_ID) chosenPorosity
|
||||
|
||||
case (POROSITY_phasefield_ID) chosenPorosity
|
||||
homogenization_postResults(startPos:endPos) = &
|
||||
porosity_phasefield_postResults(ip, el)
|
||||
end select chosenPorosity
|
||||
|
||||
|
||||
end function homogenization_postResults
|
||||
|
||||
end module homogenization
|
||||
|
|
124
src/material.f90
124
src/material.f90
|
@ -36,14 +36,9 @@ module material
|
|||
SOURCE_damage_isoDuctile_label = 'damage_isoductile', &
|
||||
SOURCE_damage_anisoBrittle_label = 'damage_anisobrittle', &
|
||||
SOURCE_damage_anisoDuctile_label = 'damage_anisoductile', &
|
||||
SOURCE_vacancy_phenoplasticity_label = 'vacancy_phenoplasticity', &
|
||||
SOURCE_vacancy_irradiation_label = 'vacancy_irradiation', &
|
||||
SOURCE_vacancy_thermalfluc_label = 'vacancy_thermalfluctuation', &
|
||||
KINEMATICS_thermal_expansion_label = 'thermal_expansion', &
|
||||
KINEMATICS_cleavage_opening_label = 'cleavage_opening', &
|
||||
KINEMATICS_slipplane_opening_label = 'slipplane_opening', &
|
||||
KINEMATICS_vacancy_strain_label = 'vacancy_strain', &
|
||||
KINEMATICS_hydrogen_strain_label = 'hydrogen_strain', &
|
||||
STIFFNESS_DEGRADATION_damage_label = 'damage', &
|
||||
STIFFNESS_DEGRADATION_porosity_label = 'porosity', &
|
||||
THERMAL_isothermal_label = 'isothermal', &
|
||||
|
@ -52,13 +47,8 @@ module material
|
|||
DAMAGE_none_label = 'none', &
|
||||
DAMAGE_local_label = 'local', &
|
||||
DAMAGE_nonlocal_label = 'nonlocal', &
|
||||
VACANCYFLUX_isoconc_label = 'isoconcentration', &
|
||||
VACANCYFLUX_isochempot_label = 'isochemicalpotential', &
|
||||
VACANCYFLUX_cahnhilliard_label = 'cahnhilliard', &
|
||||
POROSITY_none_label = 'none', &
|
||||
POROSITY_phasefield_label = 'phasefield', &
|
||||
HYDROGENFLUX_isoconc_label = 'isoconcentration', &
|
||||
HYDROGENFLUX_cahnhilliard_label = 'cahnhilliard', &
|
||||
HOMOGENIZATION_none_label = 'none', &
|
||||
HOMOGENIZATION_isostrain_label = 'isostrain', &
|
||||
HOMOGENIZATION_rgc_label = 'rgc'
|
||||
|
@ -87,19 +77,14 @@ module material
|
|||
SOURCE_damage_isoBrittle_ID, &
|
||||
SOURCE_damage_isoDuctile_ID, &
|
||||
SOURCE_damage_anisoBrittle_ID, &
|
||||
SOURCE_damage_anisoDuctile_ID, &
|
||||
SOURCE_vacancy_phenoplasticity_ID, &
|
||||
SOURCE_vacancy_irradiation_ID, &
|
||||
SOURCE_vacancy_thermalfluc_ID
|
||||
SOURCE_damage_anisoDuctile_ID
|
||||
end enum
|
||||
|
||||
enum, bind(c)
|
||||
enumerator :: KINEMATICS_undefined_ID, &
|
||||
KINEMATICS_cleavage_opening_ID, &
|
||||
KINEMATICS_slipplane_opening_ID, &
|
||||
KINEMATICS_thermal_expansion_ID, &
|
||||
KINEMATICS_vacancy_strain_ID, &
|
||||
KINEMATICS_hydrogen_strain_ID
|
||||
KINEMATICS_thermal_expansion_ID
|
||||
end enum
|
||||
|
||||
enum, bind(c)
|
||||
|
@ -120,20 +105,11 @@ module material
|
|||
DAMAGE_nonlocal_ID
|
||||
end enum
|
||||
|
||||
enum, bind(c)
|
||||
enumerator :: VACANCYFLUX_isoconc_ID, &
|
||||
VACANCYFLUX_isochempot_ID, &
|
||||
VACANCYFLUX_cahnhilliard_ID
|
||||
end enum
|
||||
|
||||
enum, bind(c)
|
||||
enumerator :: POROSITY_none_ID, &
|
||||
POROSITY_phasefield_ID
|
||||
end enum
|
||||
enum, bind(c)
|
||||
enumerator :: HYDROGENFLUX_isoconc_ID, &
|
||||
HYDROGENFLUX_cahnhilliard_ID
|
||||
end enum
|
||||
|
||||
|
||||
enum, bind(c)
|
||||
enumerator :: HOMOGENIZATION_undefined_ID, &
|
||||
|
@ -150,12 +126,8 @@ module material
|
|||
thermal_type !< thermal transport model
|
||||
integer(kind(DAMAGE_none_ID)), dimension(:), allocatable, public, protected :: &
|
||||
damage_type !< nonlocal damage model
|
||||
integer(kind(VACANCYFLUX_isoconc_ID)), dimension(:), allocatable, public, protected :: &
|
||||
vacancyflux_type !< vacancy transport model
|
||||
integer(kind(POROSITY_none_ID)), dimension(:), allocatable, public, protected :: &
|
||||
porosity_type !< porosity evolution model
|
||||
integer(kind(HYDROGENFLUX_isoconc_ID)), dimension(:), allocatable, public, protected :: &
|
||||
hydrogenflux_type !< hydrogen transport model
|
||||
|
||||
integer(kind(SOURCE_undefined_ID)), dimension(:,:), allocatable, public, protected :: &
|
||||
phase_source, & !< active sources mechanisms of each phase
|
||||
|
@ -181,17 +153,13 @@ module material
|
|||
homogenization_typeInstance, & !< instance of particular type of each homogenization
|
||||
thermal_typeInstance, & !< instance of particular type of each thermal transport
|
||||
damage_typeInstance, & !< instance of particular type of each nonlocal damage
|
||||
vacancyflux_typeInstance, & !< instance of particular type of each vacancy flux
|
||||
porosity_typeInstance, & !< instance of particular type of each porosity model
|
||||
hydrogenflux_typeInstance, & !< instance of particular type of each hydrogen flux
|
||||
microstructure_crystallite !< crystallite setting ID of each microstructure ! DEPRECATED !!!!
|
||||
|
||||
real(pReal), dimension(:), allocatable, public, protected :: &
|
||||
thermal_initialT, & !< initial temperature per each homogenization
|
||||
damage_initialPhi, & !< initial damage per each homogenization
|
||||
vacancyflux_initialCv, & !< initial vacancy concentration per each homogenization
|
||||
porosity_initialPhi, & !< initial posority per each homogenization
|
||||
hydrogenflux_initialCh !< initial hydrogen concentration per each homogenization
|
||||
porosity_initialPhi !< initial posority per each homogenization
|
||||
|
||||
! NEW MAPPINGS
|
||||
integer(pInt), dimension(:), allocatable, public, protected :: &
|
||||
|
@ -222,9 +190,7 @@ module material
|
|||
homogState, &
|
||||
thermalState, &
|
||||
damageState, &
|
||||
vacancyfluxState, &
|
||||
porosityState, &
|
||||
hydrogenfluxState
|
||||
porosityState
|
||||
|
||||
integer(pInt), dimension(:,:,:), allocatable, public, protected :: &
|
||||
material_texture !< texture (index) of each grain,IP,element
|
||||
|
@ -275,19 +241,13 @@ module material
|
|||
type(tHomogMapping), allocatable, dimension(:), public :: &
|
||||
thermalMapping, & !< mapping for thermal state/fields
|
||||
damageMapping, & !< mapping for damage state/fields
|
||||
vacancyfluxMapping, & !< mapping for vacancy conc state/fields
|
||||
porosityMapping, & !< mapping for porosity state/fields
|
||||
hydrogenfluxMapping !< mapping for hydrogen conc state/fields
|
||||
porosityMapping !< mapping for porosity state/fields
|
||||
|
||||
type(group_float), allocatable, dimension(:), public :: &
|
||||
temperature, & !< temperature field
|
||||
damage, & !< damage field
|
||||
vacancyConc, & !< vacancy conc field
|
||||
porosity, & !< porosity field
|
||||
hydrogenConc, & !< hydrogen conc field
|
||||
temperatureRate, & !< temperature change rate field
|
||||
vacancyConcRate, & !< vacancy conc change field
|
||||
hydrogenConcRate !< hydrogen conc change field
|
||||
temperatureRate !< temperature change rate field
|
||||
|
||||
public :: &
|
||||
material_init, &
|
||||
|
@ -306,14 +266,9 @@ module material
|
|||
SOURCE_damage_isoDuctile_ID, &
|
||||
SOURCE_damage_anisoBrittle_ID, &
|
||||
SOURCE_damage_anisoDuctile_ID, &
|
||||
SOURCE_vacancy_phenoplasticity_ID, &
|
||||
SOURCE_vacancy_irradiation_ID, &
|
||||
SOURCE_vacancy_thermalfluc_ID, &
|
||||
KINEMATICS_cleavage_opening_ID, &
|
||||
KINEMATICS_slipplane_opening_ID, &
|
||||
KINEMATICS_thermal_expansion_ID, &
|
||||
KINEMATICS_vacancy_strain_ID, &
|
||||
KINEMATICS_hydrogen_strain_ID, &
|
||||
STIFFNESS_DEGRADATION_damage_ID, &
|
||||
STIFFNESS_DEGRADATION_porosity_ID, &
|
||||
THERMAL_isothermal_ID, &
|
||||
|
@ -322,13 +277,8 @@ module material
|
|||
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, &
|
||||
HOMOGENIZATION_none_ID, &
|
||||
HOMOGENIZATION_isostrain_ID, &
|
||||
HOMOGENIZATION_RGC_ID
|
||||
|
@ -420,25 +370,17 @@ subroutine material_init()
|
|||
allocate(homogState (size(config_homogenization)))
|
||||
allocate(thermalState (size(config_homogenization)))
|
||||
allocate(damageState (size(config_homogenization)))
|
||||
allocate(vacancyfluxState (size(config_homogenization)))
|
||||
allocate(porosityState (size(config_homogenization)))
|
||||
allocate(hydrogenfluxState (size(config_homogenization)))
|
||||
|
||||
allocate(thermalMapping (size(config_homogenization)))
|
||||
allocate(damageMapping (size(config_homogenization)))
|
||||
allocate(vacancyfluxMapping (size(config_homogenization)))
|
||||
allocate(porosityMapping (size(config_homogenization)))
|
||||
allocate(hydrogenfluxMapping(size(config_homogenization)))
|
||||
|
||||
allocate(temperature (size(config_homogenization)))
|
||||
allocate(damage (size(config_homogenization)))
|
||||
allocate(vacancyConc (size(config_homogenization)))
|
||||
allocate(porosity (size(config_homogenization)))
|
||||
allocate(hydrogenConc (size(config_homogenization)))
|
||||
|
||||
allocate(temperatureRate (size(config_homogenization)))
|
||||
allocate(vacancyConcRate (size(config_homogenization)))
|
||||
allocate(hydrogenConcRate (size(config_homogenization)))
|
||||
|
||||
do m = 1_pInt,size(config_microstructure)
|
||||
if(microstructure_crystallite(m) < 1_pInt .or. &
|
||||
|
@ -511,17 +453,11 @@ subroutine material_init()
|
|||
do myHomog = 1,size(config_homogenization)
|
||||
thermalMapping (myHomog)%p => mappingHomogenizationConst
|
||||
damageMapping (myHomog)%p => mappingHomogenizationConst
|
||||
vacancyfluxMapping (myHomog)%p => mappingHomogenizationConst
|
||||
porosityMapping (myHomog)%p => mappingHomogenizationConst
|
||||
hydrogenfluxMapping(myHomog)%p => mappingHomogenizationConst
|
||||
allocate(temperature (myHomog)%p(1), source=thermal_initialT(myHomog))
|
||||
allocate(damage (myHomog)%p(1), source=damage_initialPhi(myHomog))
|
||||
allocate(vacancyConc (myHomog)%p(1), source=vacancyflux_initialCv(myHomog))
|
||||
allocate(porosity (myHomog)%p(1), source=porosity_initialPhi(myHomog))
|
||||
allocate(hydrogenConc (myHomog)%p(1), source=hydrogenflux_initialCh(myHomog))
|
||||
allocate(temperatureRate (myHomog)%p(1), source=0.0_pReal)
|
||||
allocate(vacancyConcRate (myHomog)%p(1), source=0.0_pReal)
|
||||
allocate(hydrogenConcRate(myHomog)%p(1), source=0.0_pReal)
|
||||
enddo
|
||||
|
||||
end subroutine material_init
|
||||
|
@ -545,23 +481,17 @@ subroutine material_parseHomogenization
|
|||
allocate(homogenization_type(size(config_homogenization)), source=HOMOGENIZATION_undefined_ID)
|
||||
allocate(thermal_type(size(config_homogenization)), source=THERMAL_isothermal_ID)
|
||||
allocate(damage_type (size(config_homogenization)), source=DAMAGE_none_ID)
|
||||
allocate(vacancyflux_type(size(config_homogenization)), source=VACANCYFLUX_isoconc_ID)
|
||||
allocate(porosity_type (size(config_homogenization)), source=POROSITY_none_ID)
|
||||
allocate(hydrogenflux_type(size(config_homogenization)), source=HYDROGENFLUX_isoconc_ID)
|
||||
allocate(homogenization_typeInstance(size(config_homogenization)), source=0_pInt)
|
||||
allocate(thermal_typeInstance(size(config_homogenization)), source=0_pInt)
|
||||
allocate(damage_typeInstance(size(config_homogenization)), source=0_pInt)
|
||||
allocate(vacancyflux_typeInstance(size(config_homogenization)), source=0_pInt)
|
||||
allocate(porosity_typeInstance(size(config_homogenization)), source=0_pInt)
|
||||
allocate(hydrogenflux_typeInstance(size(config_homogenization)), source=0_pInt)
|
||||
allocate(homogenization_Ngrains(size(config_homogenization)), source=0_pInt)
|
||||
allocate(homogenization_Noutput(size(config_homogenization)), source=0_pInt)
|
||||
allocate(homogenization_active(size(config_homogenization)), source=.false.) !!!!!!!!!!!!!!!
|
||||
allocate(thermal_initialT(size(config_homogenization)), source=300.0_pReal)
|
||||
allocate(damage_initialPhi(size(config_homogenization)), source=1.0_pReal)
|
||||
allocate(vacancyflux_initialCv(size(config_homogenization)), source=0.0_pReal)
|
||||
allocate(porosity_initialPhi(size(config_homogenization)), source=1.0_pReal)
|
||||
allocate(hydrogenflux_initialCh(size(config_homogenization)), source=0.0_pReal)
|
||||
|
||||
forall (h = 1_pInt:size(config_homogenization)) &
|
||||
homogenization_active(h) = any(mesh_homogenizationAt == h)
|
||||
|
@ -621,22 +551,7 @@ subroutine material_parseHomogenization
|
|||
|
||||
endif
|
||||
|
||||
if (config_homogenization(h)%keyExists('vacancyflux')) then
|
||||
vacancyflux_initialCv(h) = config_homogenization(h)%getFloat('cv0',defaultVal=0.0_pReal)
|
||||
|
||||
tag = config_homogenization(h)%getString('vacancyflux')
|
||||
select case (trim(tag))
|
||||
case(VACANCYFLUX_isoconc_label)
|
||||
vacancyflux_type(h) = VACANCYFLUX_isoconc_ID
|
||||
case(VACANCYFLUX_isochempot_label)
|
||||
vacancyflux_type(h) = VACANCYFLUX_isochempot_ID
|
||||
case(VACANCYFLUX_cahnhilliard_label)
|
||||
vacancyflux_type(h) = VACANCYFLUX_cahnhilliard_ID
|
||||
case default
|
||||
call IO_error(500_pInt,ext_msg=trim(tag))
|
||||
end select
|
||||
|
||||
endif
|
||||
|
||||
if (config_homogenization(h)%keyExists('porosity')) then
|
||||
!ToDo?
|
||||
|
@ -653,20 +568,7 @@ subroutine material_parseHomogenization
|
|||
|
||||
endif
|
||||
|
||||
if (config_homogenization(h)%keyExists('hydrogenflux')) then
|
||||
hydrogenflux_initialCh(h) = config_homogenization(h)%getFloat('ch0',defaultVal=0.0_pReal)
|
||||
|
||||
tag = config_homogenization(h)%getString('hydrogenflux')
|
||||
select case (trim(tag))
|
||||
case(HYDROGENFLUX_isoconc_label)
|
||||
hydrogenflux_type(h) = HYDROGENFLUX_isoconc_ID
|
||||
case(HYDROGENFLUX_cahnhilliard_label)
|
||||
hydrogenflux_type(h) = HYDROGENFLUX_cahnhilliard_ID
|
||||
case default
|
||||
call IO_error(500_pInt,ext_msg=trim(tag))
|
||||
end select
|
||||
|
||||
endif
|
||||
|
||||
enddo
|
||||
|
||||
|
@ -674,9 +576,7 @@ subroutine material_parseHomogenization
|
|||
homogenization_typeInstance(h) = count(homogenization_type(1:h) == homogenization_type(h))
|
||||
thermal_typeInstance(h) = count(thermal_type (1:h) == thermal_type (h))
|
||||
damage_typeInstance(h) = count(damage_type (1:h) == damage_type (h))
|
||||
vacancyflux_typeInstance(h) = count(vacancyflux_type (1:h) == vacancyflux_type (h))
|
||||
porosity_typeInstance(h) = count(porosity_type (1:h) == porosity_type (h))
|
||||
hydrogenflux_typeInstance(h) = count(hydrogenflux_type (1:h) == hydrogenflux_type (h))
|
||||
enddo
|
||||
|
||||
homogenization_maxNgrains = maxval(homogenization_Ngrains,homogenization_active)
|
||||
|
@ -866,12 +766,6 @@ subroutine material_parsePhase
|
|||
phase_source(sourceCtr,p) = SOURCE_damage_anisoBrittle_ID
|
||||
case (SOURCE_damage_anisoDuctile_label)
|
||||
phase_source(sourceCtr,p) = SOURCE_damage_anisoDuctile_ID
|
||||
case (SOURCE_vacancy_phenoplasticity_label)
|
||||
phase_source(sourceCtr,p) = SOURCE_vacancy_phenoplasticity_ID
|
||||
case (SOURCE_vacancy_irradiation_label)
|
||||
phase_source(sourceCtr,p) = SOURCE_vacancy_irradiation_ID
|
||||
case (SOURCE_vacancy_thermalfluc_label)
|
||||
phase_source(sourceCtr,p) = SOURCE_vacancy_thermalfluc_ID
|
||||
end select
|
||||
enddo
|
||||
|
||||
|
@ -890,10 +784,6 @@ subroutine material_parsePhase
|
|||
phase_kinematics(kinematicsCtr,p) = KINEMATICS_slipplane_opening_ID
|
||||
case (KINEMATICS_thermal_expansion_label)
|
||||
phase_kinematics(kinematicsCtr,p) = KINEMATICS_thermal_expansion_ID
|
||||
case (KINEMATICS_vacancy_strain_label)
|
||||
phase_kinematics(kinematicsCtr,p) = KINEMATICS_vacancy_strain_ID
|
||||
case (KINEMATICS_hydrogen_strain_label)
|
||||
phase_kinematics(kinematicsCtr,p) = KINEMATICS_hydrogen_strain_ID
|
||||
end select
|
||||
enddo
|
||||
#if defined(__GFORTRAN__)
|
||||
|
|
|
@ -279,15 +279,7 @@ subroutine source_damage_isoBrittle_deltaState(C, Fe, ipc, ip, el)
|
|||
instance = source_damage_isoBrittle_instance(phase) !< instance of damage_isoBrittle source
|
||||
sourceOffset = source_damage_isoBrittle_offset(phase)
|
||||
|
||||
stiffness = C
|
||||
do mech = 1_pInt, phase_NstiffnessDegradations(phase)
|
||||
select case(phase_stiffnessDegradation(mech,phase))
|
||||
case (STIFFNESS_DEGRADATION_porosity_ID)
|
||||
stiffness = porosity(material_homog(ip,el))%p(porosityMapping(material_homog(ip,el))%p(ip,el))* &
|
||||
porosity(material_homog(ip,el))%p(porosityMapping(material_homog(ip,el))%p(ip,el))* &
|
||||
stiffness
|
||||
end select
|
||||
enddo
|
||||
stiffness = C
|
||||
strain = 0.5_pReal*math_Mandel33to6(math_mul33x33(math_transpose33(Fe),Fe)-math_I3)
|
||||
|
||||
strainenergy = 2.0_pReal*sum(strain*math_mul66x6(stiffness,strain))/ &
|
||||
|
|
Loading…
Reference in New Issue