WIP: crystallite HDF5 results
will be stored according to the phase sections
This commit is contained in:
parent
7af3e70061
commit
bfb6ad557f
|
@ -300,6 +300,8 @@ subroutine CPFEM_results(inc,time)
|
||||||
use HDF5_utilities
|
use HDF5_utilities
|
||||||
use constitutive, only: &
|
use constitutive, only: &
|
||||||
constitutive_results
|
constitutive_results
|
||||||
|
use crystallite, only: &
|
||||||
|
crystallite_results
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt), intent(in) :: inc
|
integer(pInt), intent(in) :: inc
|
||||||
|
@ -307,7 +309,8 @@ subroutine CPFEM_results(inc,time)
|
||||||
|
|
||||||
call results_openJobFile
|
call results_openJobFile
|
||||||
call results_addIncrement(inc,time)
|
call results_addIncrement(inc,time)
|
||||||
call constitutive_results()
|
call constitutive_results
|
||||||
|
call crystallite_results
|
||||||
call results_removeLink('current') ! ToDo: put this into closeJobFile
|
call results_removeLink('current') ! ToDo: put this into closeJobFile
|
||||||
call results_closeJobFile
|
call results_closeJobFile
|
||||||
|
|
||||||
|
|
|
@ -50,8 +50,7 @@ subroutine constitutive_init
|
||||||
IO_write_jobFile
|
IO_write_jobFile
|
||||||
use config, only: &
|
use config, only: &
|
||||||
material_Nphase, &
|
material_Nphase, &
|
||||||
phase_name, &
|
phase_name
|
||||||
config_deallocate
|
|
||||||
use material, only: &
|
use material, only: &
|
||||||
material_phase, &
|
material_phase, &
|
||||||
phase_plasticity, &
|
phase_plasticity, &
|
||||||
|
@ -149,8 +148,6 @@ subroutine constitutive_init
|
||||||
if (any(phase_kinematics == KINEMATICS_slipplane_opening_ID)) call kinematics_slipplane_opening_init
|
if (any(phase_kinematics == KINEMATICS_slipplane_opening_ID)) call kinematics_slipplane_opening_init
|
||||||
if (any(phase_kinematics == KINEMATICS_thermal_expansion_ID)) call kinematics_thermal_expansion_init
|
if (any(phase_kinematics == KINEMATICS_thermal_expansion_ID)) call kinematics_thermal_expansion_init
|
||||||
|
|
||||||
call config_deallocate('material.config/phase')
|
|
||||||
|
|
||||||
write(6,'(/,a)') ' <<<+- constitutive init -+>>>'
|
write(6,'(/,a)') ' <<<+- constitutive init -+>>>'
|
||||||
|
|
||||||
mainProcess: if (worldrank == 0) then
|
mainProcess: if (worldrank == 0) then
|
||||||
|
@ -1077,7 +1074,7 @@ end function constitutive_postResults
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief writes constitutive results to HDF5 output file
|
!> @brief writes constitutive results to HDF5 output file
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine constitutive_results()
|
subroutine constitutive_results
|
||||||
use material, only: &
|
use material, only: &
|
||||||
PLASTICITY_ISOTROPIC_ID, &
|
PLASTICITY_ISOTROPIC_ID, &
|
||||||
PLASTICITY_PHENOPOWERLAW_ID, &
|
PLASTICITY_PHENOPOWERLAW_ID, &
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
|
|
||||||
module crystallite
|
module crystallite
|
||||||
use prec, only: &
|
use prec, only: &
|
||||||
pReal
|
pReal, &
|
||||||
|
pStringLen
|
||||||
use rotations, only: &
|
use rotations, only: &
|
||||||
rotation
|
rotation
|
||||||
use FEsolving, only: &
|
use FEsolving, only: &
|
||||||
|
@ -103,6 +104,8 @@ module crystallite
|
||||||
end enum
|
end enum
|
||||||
integer(kind(undefined_ID)),dimension(:,:), allocatable, private :: &
|
integer(kind(undefined_ID)),dimension(:,:), allocatable, private :: &
|
||||||
crystallite_outputID !< ID of each post result output
|
crystallite_outputID !< ID of each post result output
|
||||||
|
character(len=pStringLen), dimension(:), allocatable, private :: &
|
||||||
|
constituent_output
|
||||||
procedure(), pointer :: integrateState
|
procedure(), pointer :: integrateState
|
||||||
|
|
||||||
public :: &
|
public :: &
|
||||||
|
@ -111,7 +114,8 @@ module crystallite
|
||||||
crystallite_stressTangent, &
|
crystallite_stressTangent, &
|
||||||
crystallite_orientations, &
|
crystallite_orientations, &
|
||||||
crystallite_push33ToRef, &
|
crystallite_push33ToRef, &
|
||||||
crystallite_postResults
|
crystallite_postResults, &
|
||||||
|
crystallite_results
|
||||||
private :: &
|
private :: &
|
||||||
integrateStress, &
|
integrateStress, &
|
||||||
integrateState, &
|
integrateState, &
|
||||||
|
@ -156,6 +160,7 @@ subroutine crystallite_init
|
||||||
use config, only: &
|
use config, only: &
|
||||||
config_deallocate, &
|
config_deallocate, &
|
||||||
config_crystallite, &
|
config_crystallite, &
|
||||||
|
config_phase, &
|
||||||
crystallite_name
|
crystallite_name
|
||||||
use constitutive, only: &
|
use constitutive, only: &
|
||||||
constitutive_initialFi, &
|
constitutive_initialFi, &
|
||||||
|
@ -297,6 +302,21 @@ subroutine crystallite_init
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
allocate(constituent_output(size(config_phase)))
|
||||||
|
do c = 1, size(config_phase)
|
||||||
|
#if defined(__GFORTRAN__)
|
||||||
|
str = ['GfortranBug86277']
|
||||||
|
str = config_crystallite(c)%getStrings('(output)',defaultVal=str)
|
||||||
|
if (str(1) == 'GfortranBug86277') str = [character(len=65536)::]
|
||||||
|
#else
|
||||||
|
str = config_crystallite(c)%getStrings('(output)',defaultVal=[character(len=65536)::])
|
||||||
|
#endif
|
||||||
|
constituent_output(c) = '+'
|
||||||
|
do o = 1, size(str)
|
||||||
|
constituent_output(c) = trim(constituent_output(c))//trim(str(o))//'+'
|
||||||
|
enddo
|
||||||
|
enddo
|
||||||
|
|
||||||
|
|
||||||
do r = 1,size(config_crystallite)
|
do r = 1,size(config_crystallite)
|
||||||
do o = 1,crystallite_Noutput(r)
|
do o = 1,crystallite_Noutput(r)
|
||||||
|
@ -340,6 +360,7 @@ subroutine crystallite_init
|
||||||
close(FILEUNIT)
|
close(FILEUNIT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
call config_deallocate('material.config/phase')
|
||||||
call config_deallocate('material.config/crystallite')
|
call config_deallocate('material.config/crystallite')
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
@ -1053,6 +1074,55 @@ function crystallite_postResults(ipc, ip, el)
|
||||||
end function crystallite_postResults
|
end function crystallite_postResults
|
||||||
|
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
!> @brief writes constitutive results to HDF5 output file
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
subroutine crystallite_results
|
||||||
|
#if defined(PETSc) || defined(DAMASK_HDF5)
|
||||||
|
use results
|
||||||
|
use HDF5_utilities
|
||||||
|
use config, only: &
|
||||||
|
config_name_phase => phase_name ! anticipate logical name
|
||||||
|
|
||||||
|
use material, only: &
|
||||||
|
material_phaseAt, &
|
||||||
|
phase_plasticityInstance, &
|
||||||
|
material_phase_plasticity_type => phase_plasticity
|
||||||
|
|
||||||
|
implicit none
|
||||||
|
integer :: p
|
||||||
|
real(pReal), allocatable, dimension(:,:,:) :: packe
|
||||||
|
character(len=256) :: group
|
||||||
|
character(len=16) :: i
|
||||||
|
|
||||||
|
call HDF5_closeGroup(results_addGroup('current/constituent'))
|
||||||
|
|
||||||
|
do p=1,size(config_name_phase)
|
||||||
|
write(i,('(i2.2)')) p ! allow 99 groups
|
||||||
|
group = trim('current/constituent')//'/'//trim(i)//'_'//trim(config_name_phase(p))
|
||||||
|
if (index(constituent_output(p),'+f+') /= 0) then
|
||||||
|
print*, 'f'
|
||||||
|
endif
|
||||||
|
if (index(constituent_output(p),'+p+') /= 0) then
|
||||||
|
print*, 'p'
|
||||||
|
endif
|
||||||
|
enddo
|
||||||
|
|
||||||
|
contains
|
||||||
|
|
||||||
|
function packed(res)
|
||||||
|
|
||||||
|
real(pReal), dimension(:,:,:,:,:), intent(in) :: res
|
||||||
|
real(pReal), allocatable, dimension(:,:,:) :: packed
|
||||||
|
|
||||||
|
|
||||||
|
end function packed
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
end subroutine crystallite_results
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief calculation of stress (P) with time integration based on a residuum in Lp and
|
!> @brief calculation of stress (P) with time integration based on a residuum in Lp and
|
||||||
!> intermediate acceleration of the Newton-Raphson correction
|
!> intermediate acceleration of the Newton-Raphson correction
|
||||||
|
|
Loading…
Reference in New Issue