Merge branch 'damage-polishing' into polishing-for-beta

This commit is contained in:
Martin Diehl 2021-07-09 11:27:51 +02:00
commit df44feb6f6
7 changed files with 16 additions and 16 deletions

@ -1 +1 @@
Subproject commit 15bb4a18292bf4f5d3b371dc1edbf9a33606eb60 Subproject commit 70310b426d03ef07dc053e080729d35e5eb3f0cb

View File

@ -7,5 +7,5 @@ q: 20
output: [f_phi] output: [f_phi]
D_11: 1.0 K_11: 1.0
M: 0.001 mu: 0.001

View File

@ -5,5 +5,5 @@ isoBrittle_atol: 0.01
output: [f_phi] output: [f_phi]
D_11: 1.0 K_11: 1.0
M: 0.001 mu: 0.001

View File

@ -188,9 +188,9 @@ function grid_damage_spectral_solution(timeinc) result(solution)
stagNorm = maxval(abs(phi_current - phi_stagInc)) stagNorm = maxval(abs(phi_current - phi_stagInc))
solnNorm = maxval(abs(phi_current)) solnNorm = maxval(abs(phi_current))
call MPI_Allreduce(MPI_IN_PLACE,stagNorm,1,MPI_DOUBLE,MPI_MAX,PETSC_COMM_WORLD,ierr) call MPI_Allreduce(MPI_IN_PLACE,stagNorm,1,MPI_DOUBLE,MPI_MAX,PETSC_COMM_WORLD,ierr)
call MPI_Allreduce(MPI_IN_PLACE,solnNorm,1,MPI_DOUBLE,MPI_MAX,PETSC_COMM_WORLD,ierr)
phi_stagInc = phi_current
solution%stagConverged = stagNorm < max(num%eps_damage_atol, num%eps_damage_rtol*solnNorm) solution%stagConverged = stagNorm < max(num%eps_damage_atol, num%eps_damage_rtol*solnNorm)
call MPI_Allreduce(MPI_IN_PLACE,solution%stagConverged,1,MPI_LOGICAL,MPI_LAND,PETSC_COMM_WORLD,ierr)
phi_stagInc = phi_current
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! updating damage state ! updating damage state

View File

@ -183,9 +183,9 @@ function grid_thermal_spectral_solution(timeinc) result(solution)
stagNorm = maxval(abs(T_current - T_stagInc)) stagNorm = maxval(abs(T_current - T_stagInc))
solnNorm = maxval(abs(T_current)) solnNorm = maxval(abs(T_current))
call MPI_Allreduce(MPI_IN_PLACE,stagNorm,1,MPI_DOUBLE,MPI_MAX,PETSC_COMM_WORLD,ierr) call MPI_Allreduce(MPI_IN_PLACE,stagNorm,1,MPI_DOUBLE,MPI_MAX,PETSC_COMM_WORLD,ierr)
call MPI_Allreduce(MPI_IN_PLACE,solnNorm,1,MPI_DOUBLE,MPI_MAX,PETSC_COMM_WORLD,ierr)
T_stagInc = T_current
solution%stagConverged = stagNorm < max(num%eps_thermal_atol, num%eps_thermal_rtol*solnNorm) solution%stagConverged = stagNorm < max(num%eps_thermal_atol, num%eps_thermal_rtol*solnNorm)
call MPI_Allreduce(MPI_IN_PLACE,solution%stagConverged,1,MPI_LOGICAL,MPI_LAND,PETSC_COMM_WORLD,ierr)
T_stagInc = T_current
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! updating thermal state ! updating thermal state

View File

@ -74,7 +74,7 @@ contains
module subroutine damage_init module subroutine damage_init
integer :: & integer :: &
ph, & !< counter in phase loop ph, &
Nmembers Nmembers
class(tNode), pointer :: & class(tNode), pointer :: &
phases, & phases, &
@ -105,10 +105,10 @@ module subroutine damage_init
if (sources%length == 1) then if (sources%length == 1) then
damage_active = .true. damage_active = .true.
source => sources%get(1) source => sources%get(1)
param(ph)%mu = source%get_asFloat('M',defaultVal=0.0_pReal) param(ph)%mu = source%get_asFloat('mu',defaultVal=0.0_pReal) ! ToDo: make mandatory?
param(ph)%K(1,1) = source%get_asFloat('D_11',defaultVal=0.0_pReal) param(ph)%K(1,1) = source%get_asFloat('K_11',defaultVal=0.0_pReal) ! ToDo: make mandatory?
param(ph)%K(3,3) = source%get_asFloat('D_33',defaultVal=0.0_pReal) param(ph)%K(3,3) = source%get_asFloat('K_33',defaultVal=0.0_pReal) ! ToDo: depends on symmetry
param(ph)%K = lattice_applyLatticeSymmetry33(param(ph)%K,phase%get_asString('lattice')) param(ph)%K = lattice_applyLatticeSymmetry33(param(ph)%K,phase_lattice(ph))
endif endif
enddo enddo

View File

@ -100,10 +100,10 @@ module subroutine thermal_init(phases)
allocate(current(ph)%dot_T(Nmembers),source=0.0_pReal) allocate(current(ph)%dot_T(Nmembers),source=0.0_pReal)
phase => phases%get(ph) phase => phases%get(ph)
thermal => phase%get('thermal',defaultVal=emptyDict) thermal => phase%get('thermal',defaultVal=emptyDict)
param(ph)%C_p = thermal%get_asFloat('C_p',defaultVal=0.0_pReal) param(ph)%C_p = thermal%get_asFloat('C_p',defaultVal=0.0_pReal) ! ToDo: make mandatory?
param(ph)%K(1,1) = thermal%get_asFloat('K_11',defaultVal=0.0_pReal) ! ToDo: make mandatory? param(ph)%K(1,1) = thermal%get_asFloat('K_11',defaultVal=0.0_pReal) ! ToDo: make mandatory?
param(ph)%K(3,3) = thermal%get_asFloat('K_33',defaultVal=0.0_pReal) ! ToDo: depends on symmtery param(ph)%K(3,3) = thermal%get_asFloat('K_33',defaultVal=0.0_pReal) ! ToDo: depends on symmtery
param(ph)%K = lattice_applyLatticeSymmetry33(param(ph)%K,phase%get_asString('lattice')) param(ph)%K = lattice_applyLatticeSymmetry33(param(ph)%K,phase_lattice(ph))
sources => thermal%get('source',defaultVal=emptyList) sources => thermal%get('source',defaultVal=emptyList)
thermal_Nsources(ph) = sources%length thermal_Nsources(ph) = sources%length