single source of truth

This commit is contained in:
Martin Diehl 2021-11-25 06:21:56 +01:00
parent bc30248b95
commit e941867290
7 changed files with 19 additions and 11 deletions

View File

@ -4,6 +4,7 @@
!> @details List of files needed by MSC.Marc !> @details List of files needed by MSC.Marc
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
#include "parallelization.f90" #include "parallelization.f90"
#include "constants.f90"
#include "IO.f90" #include "IO.f90"
#include "YAML_types.f90" #include "YAML_types.f90"
#include "YAML_parse.f90" #include "YAML_parse.f90"

15
src/constants.f90 Normal file
View File

@ -0,0 +1,15 @@
!--------------------------------------------------------------------------------------------------
!> @author Martin Diehl, KU Leuven
!> @brief physical constants
!--------------------------------------------------------------------------------------------------
module constants
use prec
implicit none
public
real(pReal), parameter :: &
T_ROOM = 300.0_pReal, & !< Room temperature in K
kB = 1.38e-23_pReal !< Boltzmann constant in J/Kelvin
end module constants

View File

@ -5,6 +5,7 @@
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
module phase module phase
use prec use prec
use constants
use math use math
use rotations use rotations
use IO use IO

View File

@ -58,7 +58,7 @@ module function thermalexpansion_init(kinematics_length) result(myKinematics)
associate(prm => param(kinematics_thermal_expansion_instance(p))) associate(prm => param(kinematics_thermal_expansion_instance(p)))
kinematic_type => kinematics%get(k) kinematic_type => kinematics%get(k)
prm%T_ref = kinematic_type%get_asFloat('T_ref', defaultVal=300.0_pReal) prm%T_ref = kinematic_type%get_asFloat('T_ref', defaultVal=T_ROOM)
prm%A(1,1,1) = kinematic_type%get_asFloat('A_11') prm%A(1,1,1) = kinematic_type%get_asFloat('A_11')
prm%A(1,1,2) = kinematic_type%get_asFloat('A_11,T',defaultVal=0.0_pReal) prm%A(1,1,2) = kinematic_type%get_asFloat('A_11,T',defaultVal=0.0_pReal)

View File

@ -7,9 +7,6 @@
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
submodule(phase:plastic) dislotungsten submodule(phase:plastic) dislotungsten
real(pReal), parameter :: &
kB = 1.38e-23_pReal !< Boltzmann constant in J/Kelvin
type :: tParameters type :: tParameters
real(pReal) :: & real(pReal) :: &
D = 1.0_pReal, & !< grain size D = 1.0_pReal, & !< grain size

View File

@ -9,9 +9,6 @@
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
submodule(phase:plastic) dislotwin submodule(phase:plastic) dislotwin
real(pReal), parameter :: &
kB = 1.38e-23_pReal !< Boltzmann constant in J/Kelvin
type :: tParameters type :: tParameters
real(pReal) :: & real(pReal) :: &
Q_cl = 1.0_pReal, & !< activation energy for dislocation climb Q_cl = 1.0_pReal, & !< activation energy for dislocation climb
@ -31,7 +28,7 @@ submodule(phase:plastic) dislotwin
delta_G = 1.0_pReal, & !< Free energy difference between austensite and martensite delta_G = 1.0_pReal, & !< Free energy difference between austensite and martensite
i_tr = 1.0_pReal, & !< adjustment parameter to calculate MFP for transformation i_tr = 1.0_pReal, & !< adjustment parameter to calculate MFP for transformation
h = 1.0_pReal, & !< Stack height of hex nucleus h = 1.0_pReal, & !< Stack height of hex nucleus
T_ref = 300.0_pReal, & T_ref = T_ROOM, &
a_cI = 1.0_pReal, & a_cI = 1.0_pReal, &
a_cF = 1.0_pReal a_cF = 1.0_pReal
real(pReal), dimension(2) :: & real(pReal), dimension(2) :: &

View File

@ -19,9 +19,6 @@ submodule(phase:plastic) nonlocal
type(tGeometry), dimension(:), allocatable :: geom type(tGeometry), dimension(:), allocatable :: geom
real(pReal), parameter :: &
kB = 1.38e-23_pReal !< Boltzmann constant in J/Kelvin
! storage order of dislocation types ! storage order of dislocation types
integer, dimension(*), parameter :: & integer, dimension(*), parameter :: &
sgl = [1,2,3,4,5,6,7,8] !< signed (single) sgl = [1,2,3,4,5,6,7,8] !< signed (single)