diff --git a/src/commercialFEM_fileList.f90 b/src/commercialFEM_fileList.f90 index a20fb1cee..42da97db7 100644 --- a/src/commercialFEM_fileList.f90 +++ b/src/commercialFEM_fileList.f90 @@ -17,38 +17,36 @@ #include "results.f90" #include "geometry_plastic_nonlocal.f90" #include "discretization.f90" -#ifdef Marc4DAMASK #include "marc/discretization_marc.f90" -#endif #include "material.f90" #include "lattice.f90" -#include "constitutive.f90" -#include "constitutive_mech.f90" -#include "constitutive_plastic_none.f90" -#include "constitutive_plastic_isotropic.f90" -#include "constitutive_plastic_phenopowerlaw.f90" -#include "constitutive_plastic_kinehardening.f90" -#include "constitutive_plastic_dislotwin.f90" -#include "constitutive_plastic_disloTungsten.f90" -#include "constitutive_plastic_nonlocal.f90" -#include "constitutive_thermal.f90" -#include "constitutive_thermal_dissipation.f90" -#include "constitutive_thermal_externalheat.f90" -#include "kinematics_thermal_expansion.f90" -#include "constitutive_damage.f90" -#include "source_damage_isoBrittle.f90" -#include "source_damage_isoDuctile.f90" -#include "source_damage_anisoBrittle.f90" -#include "source_damage_anisoDuctile.f90" -#include "kinematics_cleavage_opening.f90" -#include "kinematics_slipplane_opening.f90" +#include "phase.f90" +#include "phase_mechanics.f90" +#include "phase_mechanics_plastic_none.f90" +#include "phase_mechanics_plastic_isotropic.f90" +#include "phase_mechanics_plastic_phenopowerlaw.f90" +#include "phase_mechanics_plastic_kinehardening.f90" +#include "phase_mechanics_plastic_dislotwin.f90" +#include "phase_mechanics_plastic_disloTungsten.f90" +#include "phase_mechanics_plastic_nonlocal.f90" +#include "phase_mechancis_anelastic_thermalexpansion.f90" +#include "phase_mechanics_anelastic_cleavageopening.f90" +#include "phase_mechanics_anelastic_slipplaneopening.f90" +#include "phase_thermal.f90" +#include "phase_thermal_dissipation.f90" +#include "phase_thermal_externalheat.f90" +#include "phase_damage.f90" +#include "phase_damage_isobrittle.f90" +#include "phase_damage_isoductile.f90" +#include "phase_damage_anisobrittle.f90" +#include "phase_damage_anisoductile.f90" #include "damage_none.f90" #include "damage_nonlocal.f90" #include "homogenization.f90" -#include "homogenization_mech.f90" -#include "homogenization_mech_none.f90" -#include "homogenization_mech_isostrain.f90" -#include "homogenization_mech_RGC.f90" +#include "homogenization_mechanics.f90" +#include "homogenization_mechanics_none.f90" +#include "homogenization_mechanics_isostrain.f90" +#include "homogenization_mechanics_RGC.f90" #include "homogenization_thermal.f90" #include "homogenization_damage.f90" #include "CPFEM.f90" diff --git a/src/homogenization_mech.f90 b/src/homogenization_mechanics.f90 similarity index 100% rename from src/homogenization_mech.f90 rename to src/homogenization_mechanics.f90 diff --git a/src/homogenization_mech_RGC.f90 b/src/homogenization_mechanics_RGC.f90 similarity index 100% rename from src/homogenization_mech_RGC.f90 rename to src/homogenization_mechanics_RGC.f90 diff --git a/src/homogenization_mech_isostrain.f90 b/src/homogenization_mechanics_isostrain.f90 similarity index 100% rename from src/homogenization_mech_isostrain.f90 rename to src/homogenization_mechanics_isostrain.f90 diff --git a/src/homogenization_mech_none.f90 b/src/homogenization_mechanics_none.f90 similarity index 100% rename from src/homogenization_mech_none.f90 rename to src/homogenization_mechanics_none.f90 diff --git a/src/constitutive.f90 b/src/phase.f90 similarity index 100% rename from src/constitutive.f90 rename to src/phase.f90 diff --git a/src/constitutive_damage.f90 b/src/phase_damage.f90 similarity index 94% rename from src/constitutive_damage.f90 rename to src/phase_damage.f90 index 07bfbeeca..c1e555299 100644 --- a/src/constitutive_damage.f90 +++ b/src/phase_damage.f90 @@ -42,15 +42,6 @@ submodule(constitutive) constitutive_damage logical, dimension(:,:), allocatable :: mySources end function source_damage_isoDuctile_init - module function kinematics_cleavage_opening_init(kinematics_length) result(myKinematics) - integer, intent(in) :: kinematics_length - logical, dimension(:,:), allocatable :: myKinematics - end function kinematics_cleavage_opening_init - - module function kinematics_slipplane_opening_init(kinematics_length) result(myKinematics) - integer, intent(in) :: kinematics_length - logical, dimension(:,:), allocatable :: myKinematics - end function kinematics_slipplane_opening_init module subroutine source_damage_isoBrittle_deltaState(C, Fe, ph, me) integer, intent(in) :: ph,me @@ -164,8 +155,7 @@ module subroutine damage_init class(tNode), pointer :: & phases, & phase, & - sources, & - kinematics + sources phases => config_material%get('phase') @@ -197,22 +187,6 @@ module subroutine damage_init where(source_damage_anisoDuctile_init (maxval(phase_Nsources))) phase_source = DAMAGE_ANISODUCTILE_ID endif -!-------------------------------------------------------------------------------------------------- -! initialize kinematic mechanisms - allocate(phase_Nkinematics(phases%length),source = 0) - do ph = 1,phases%length - phase => phases%get(ph) - kinematics => phase%get('kinematics',defaultVal=emptyList) - phase_Nkinematics(ph) = kinematics%length - enddo - - allocate(phase_kinematics(maxval(phase_Nkinematics),phases%length), source = KINEMATICS_undefined_ID) - - if(maxval(phase_Nkinematics) /= 0) then - where(kinematics_cleavage_opening_init(maxval(phase_Nkinematics))) phase_kinematics = KINEMATICS_cleavage_opening_ID - where(kinematics_slipplane_opening_init(maxval(phase_Nkinematics))) phase_kinematics = KINEMATICS_slipplane_opening_ID - endif - end subroutine damage_init @@ -542,7 +516,7 @@ end subroutine constitutive_damage_set_phi module function constitutive_damage_get_phi(co,ip,el) result(phi) - + integer, intent(in) :: co, ip, el real(pReal) :: phi diff --git a/src/source_damage_anisoBrittle.f90 b/src/phase_damage_anisobrittle.f90 similarity index 100% rename from src/source_damage_anisoBrittle.f90 rename to src/phase_damage_anisobrittle.f90 diff --git a/src/source_damage_anisoDuctile.f90 b/src/phase_damage_anisoductile.f90 similarity index 100% rename from src/source_damage_anisoDuctile.f90 rename to src/phase_damage_anisoductile.f90 diff --git a/src/source_damage_isoBrittle.f90 b/src/phase_damage_isobrittle.f90 similarity index 100% rename from src/source_damage_isoBrittle.f90 rename to src/phase_damage_isobrittle.f90 diff --git a/src/source_damage_isoDuctile.f90 b/src/phase_damage_isoductile.f90 similarity index 100% rename from src/source_damage_isoDuctile.f90 rename to src/phase_damage_isoductile.f90 diff --git a/src/constitutive_mech.f90 b/src/phase_mechanics.f90 similarity index 98% rename from src/constitutive_mech.f90 rename to src/phase_mechanics.f90 index be933ef4f..53986191b 100644 --- a/src/constitutive_mech.f90 +++ b/src/phase_mechanics.f90 @@ -268,6 +268,16 @@ submodule(constitutive) constitutive_mech el end subroutine plastic_nonlocal_deltaState + module function kinematics_cleavage_opening_init(kinematics_length) result(myKinematics) + integer, intent(in) :: kinematics_length + logical, dimension(:,:), allocatable :: myKinematics + end function kinematics_cleavage_opening_init + + module function kinematics_slipplane_opening_init(kinematics_length) result(myKinematics) + integer, intent(in) :: kinematics_length + logical, dimension(:,:), allocatable :: myKinematics + end function kinematics_slipplane_opening_init + module subroutine plastic_isotropic_results(instance,group) integer, intent(in) :: instance character(len=*), intent(in) :: group @@ -338,7 +348,8 @@ module subroutine mech_init(phases) phase, & mech, & elastic, & - stiffDegradation + stiffDegradation, & + kinematics print'(/,a)', ' <<<+- constitutive_mech init -+>>>' @@ -481,6 +492,22 @@ module subroutine mech_init(phases) end select +!-------------------------------------------------------------------------------------------------- +! initialize kinematic mechanisms + allocate(phase_Nkinematics(phases%length),source = 0) + do ph = 1,phases%length + phase => phases%get(ph) + kinematics => phase%get('kinematics',defaultVal=emptyList) + phase_Nkinematics(ph) = kinematics%length + enddo + + allocate(phase_kinematics(maxval(phase_Nkinematics),phases%length), source = KINEMATICS_undefined_ID) + + if(maxval(phase_Nkinematics) /= 0) then + where(kinematics_cleavage_opening_init(maxval(phase_Nkinematics))) phase_kinematics = KINEMATICS_cleavage_opening_ID + where(kinematics_slipplane_opening_init(maxval(phase_Nkinematics))) phase_kinematics = KINEMATICS_slipplane_opening_ID + endif + end subroutine mech_init diff --git a/src/kinematics_cleavage_opening.f90 b/src/phase_mechanics_anelastic_cleavageopening.f90 similarity index 97% rename from src/kinematics_cleavage_opening.f90 rename to src/phase_mechanics_anelastic_cleavageopening.f90 index a29a290f8..01fbf0cb9 100644 --- a/src/kinematics_cleavage_opening.f90 +++ b/src/phase_mechanics_anelastic_cleavageopening.f90 @@ -4,7 +4,7 @@ !> @brief material subroutine incorporating kinematics resulting from opening of cleavage planes !> @details to be done !-------------------------------------------------------------------------------------------------- -submodule(constitutive:constitutive_damage) kinematics_cleavage_opening +submodule(constitutive:constitutive_mech) kinematics_cleavage_opening integer, dimension(:), allocatable :: kinematics_cleavage_opening_instance @@ -31,8 +31,8 @@ contains !> @details reads in material parameters, allocates arrays, and does sanity checks !-------------------------------------------------------------------------------------------------- module function kinematics_cleavage_opening_init(kinematics_length) result(myKinematics) - - integer, intent(in) :: kinematics_length + + integer, intent(in) :: kinematics_length logical, dimension(:,:), allocatable :: myKinematics integer :: Ninstances,p,k @@ -42,8 +42,8 @@ module function kinematics_cleavage_opening_init(kinematics_length) result(myKin phases, & phase, & kinematics, & - kinematic_type - + kinematic_type + print'(/,a)', ' <<<+- kinematics_cleavage_opening init -+>>>' myKinematics = kinematics_active('cleavage_opening',kinematics_length) @@ -63,7 +63,7 @@ module function kinematics_cleavage_opening_init(kinematics_length) result(myKin do k = 1, kinematics%length if(myKinematics(k,p)) then associate(prm => param(kinematics_cleavage_opening_instance(p))) - kinematic_type => kinematics%get(k) + kinematic_type => kinematics%get(k) N_cl = kinematic_type%get_asInts('N_cl') prm%sum_N_cl = sum(abs(N_cl)) diff --git a/src/kinematics_slipplane_opening.f90 b/src/phase_mechanics_anelastic_slipplaneopening.f90 similarity index 97% rename from src/kinematics_slipplane_opening.f90 rename to src/phase_mechanics_anelastic_slipplaneopening.f90 index 84edab122..c15608dea 100644 --- a/src/kinematics_slipplane_opening.f90 +++ b/src/phase_mechanics_anelastic_slipplaneopening.f90 @@ -4,7 +4,7 @@ !> @brief material subroutine incorporating kinematics resulting from opening of slip planes !> @details to be done !-------------------------------------------------------------------------------------------------- -submodule(constitutive:constitutive_damage) kinematics_slipplane_opening +submodule(constitutive:constitutive_mech) kinematics_slipplane_opening integer, dimension(:), allocatable :: kinematics_slipplane_opening_instance @@ -34,7 +34,7 @@ contains !-------------------------------------------------------------------------------------------------- module function kinematics_slipplane_opening_init(kinematics_length) result(myKinematics) - integer, intent(in) :: kinematics_length + integer, intent(in) :: kinematics_length logical, dimension(:,:), allocatable :: myKinematics integer :: Ninstances,p,i,k @@ -47,8 +47,8 @@ module function kinematics_slipplane_opening_init(kinematics_length) result(myKi mech, & pl, & kinematics, & - kinematic_type - + kinematic_type + print'(/,a)', ' <<<+- kinematics_slipplane init -+>>>' myKinematics = kinematics_active('slipplane_opening',kinematics_length) @@ -70,7 +70,7 @@ module function kinematics_slipplane_opening_init(kinematics_length) result(myKi do k = 1, kinematics%length if(myKinematics(k,p)) then associate(prm => param(kinematics_slipplane_opening_instance(p))) - kinematic_type => kinematics%get(k) + kinematic_type => kinematics%get(k) prm%dot_o = kinematic_type%get_asFloat('dot_o') prm%q = kinematic_type%get_asFloat('q') diff --git a/src/kinematics_thermal_expansion.f90 b/src/phase_mechanics_anelastic_thermalexpansion.f90 similarity index 100% rename from src/kinematics_thermal_expansion.f90 rename to src/phase_mechanics_anelastic_thermalexpansion.f90 diff --git a/src/constitutive_plastic_disloTungsten.f90 b/src/phase_mechanics_plastic_dislotungsten.f90 similarity index 100% rename from src/constitutive_plastic_disloTungsten.f90 rename to src/phase_mechanics_plastic_dislotungsten.f90 diff --git a/src/constitutive_plastic_dislotwin.f90 b/src/phase_mechanics_plastic_dislotwin.f90 similarity index 100% rename from src/constitutive_plastic_dislotwin.f90 rename to src/phase_mechanics_plastic_dislotwin.f90 diff --git a/src/constitutive_plastic_isotropic.f90 b/src/phase_mechanics_plastic_isotropic.f90 similarity index 100% rename from src/constitutive_plastic_isotropic.f90 rename to src/phase_mechanics_plastic_isotropic.f90 diff --git a/src/constitutive_plastic_kinehardening.f90 b/src/phase_mechanics_plastic_kinehardening.f90 similarity index 100% rename from src/constitutive_plastic_kinehardening.f90 rename to src/phase_mechanics_plastic_kinehardening.f90 diff --git a/src/constitutive_plastic_none.f90 b/src/phase_mechanics_plastic_none.f90 similarity index 100% rename from src/constitutive_plastic_none.f90 rename to src/phase_mechanics_plastic_none.f90 diff --git a/src/constitutive_plastic_nonlocal.f90 b/src/phase_mechanics_plastic_nonlocal.f90 similarity index 100% rename from src/constitutive_plastic_nonlocal.f90 rename to src/phase_mechanics_plastic_nonlocal.f90 diff --git a/src/constitutive_plastic_phenopowerlaw.f90 b/src/phase_mechanics_plastic_phenopowerlaw.f90 similarity index 100% rename from src/constitutive_plastic_phenopowerlaw.f90 rename to src/phase_mechanics_plastic_phenopowerlaw.f90 diff --git a/src/constitutive_thermal.f90 b/src/phase_thermal.f90 similarity index 100% rename from src/constitutive_thermal.f90 rename to src/phase_thermal.f90 diff --git a/src/constitutive_thermal_dissipation.f90 b/src/phase_thermal_dissipation.f90 similarity index 100% rename from src/constitutive_thermal_dissipation.f90 rename to src/phase_thermal_dissipation.f90 diff --git a/src/constitutive_thermal_externalheat.f90 b/src/phase_thermal_externalheat.f90 similarity index 100% rename from src/constitutive_thermal_externalheat.f90 rename to src/phase_thermal_externalheat.f90