From 039d5e0fce7b408ff5907a721c8c994e9c33720e Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 24 Jul 2023 18:30:02 +0200 Subject: [PATCH] improved comments and naming --- src/phase.f90 | 5 +++-- src/phase_damage.f90 | 3 ++- src/phase_mechanical_eigen.f90 | 9 +++------ 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/phase.f90 b/src/phase.f90 index 7dbaa9f7c..ab365dbd6 100644 --- a/src/phase.f90 +++ b/src/phase.f90 @@ -68,9 +68,10 @@ module phase integer(kind(UNDEFINED)), dimension(:), allocatable :: & mechanical_plasticity_type, & !< plasticity of each phase - damage_type !< active sources mechanisms of each phase + damage_type !< damage type of each phase integer(kind(UNDEFINED)), dimension(:,:), allocatable :: & - thermal_source_type + thermal_source_type, & + mechanical_eigen_kinematics_type character(len=2), allocatable, dimension(:) :: phase_lattice real(pREAL), allocatable, dimension(:) :: phase_cOverA diff --git a/src/phase_damage.f90 b/src/phase_damage.f90 index 44c52bc80..2c605c963 100644 --- a/src/phase_damage.f90 +++ b/src/phase_damage.f90 @@ -195,13 +195,14 @@ module function phase_f_phi(phi,co,ce) result(f) ph, & en + ph = material_ID_phase(co,ce) en = material_entry_phase(co,ce) select case(damage_type(ph)) case(DAMAGE_ISOBRITTLE,DAMAGE_ANISOBRITTLE) f = 1.0_pREAL & - - 2.0_pREAL * phi*damageState(ph)%state(1,en) + - 2.0_pREAL * phi*damageState(ph)%state(1,en) ! ToDo: MD: seems to be phi**2 case default f = 0.0_pREAL end select diff --git a/src/phase_mechanical_eigen.f90 b/src/phase_mechanical_eigen.f90 index 4d5771cca..5bdb57f57 100644 --- a/src/phase_mechanical_eigen.f90 +++ b/src/phase_mechanical_eigen.f90 @@ -3,9 +3,6 @@ submodule(phase:mechanical) eigen integer, dimension(:), allocatable :: & Nmodels - integer(kind(UNDEFINED)), dimension(:,:), allocatable :: & - model - interface module function thermalexpansion_init(kinematics_length) result(myKinematics) @@ -55,10 +52,10 @@ module subroutine eigen_init(phases) Nmodels(ph) = kinematics%length end do - allocate(model(maxval(Nmodels),phases%length), source = UNDEFINED) + allocate(mechanical_eigen_kinematics_type(maxval(Nmodels),phases%length), source = UNDEFINED) if (maxval(Nmodels) /= 0) then - where(thermalexpansion_init(maxval(Nmodels))) model = MECHANICAL_EIGEN_THERMALEXPANSION + where(thermalexpansion_init(maxval(Nmodels))) mechanical_eigen_kinematics_type = MECHANICAL_EIGEN_THERMALEXPANSION end if end subroutine eigen_init @@ -164,7 +161,7 @@ module subroutine phase_LiAndItsTangents(Li, dLi_dS, dLi_dFi, & KinematicsLoop: do k = 1, Nmodels(ph) - kinematicsType: select case (model(k,ph)) + kinematicsType: select case (mechanical_eigen_kinematics_type(k,ph)) case (MECHANICAL_EIGEN_THERMALEXPANSION) kinematicsType call thermalexpansion_LiAndItsTangent(my_Li, my_dLi_dS, ph,en) Li = Li + my_Li