encapsulation and namespace-like names
This commit is contained in:
parent
cb6b7a5fb9
commit
1fbf14c148
|
@ -282,9 +282,7 @@ subroutine formResidual(in,x_scal,f_scal,dummy,ierr)
|
||||||
ce = ce + 1
|
ce = ce + 1
|
||||||
call thermal_conduction_getSource(Tdot,1,ce)
|
call thermal_conduction_getSource(Tdot,1,ce)
|
||||||
scalarField_real(i,j,k) = params%timeinc*(scalarField_real(i,j,k) + Tdot) &
|
scalarField_real(i,j,k) = params%timeinc*(scalarField_real(i,j,k) + Tdot) &
|
||||||
+ thermal_conduction_getMassDensity (ce)* &
|
+ homogenization_thermal_mu_T(ce) * (T_lastInc(i,j,k) - T_current(i,j,k)) &
|
||||||
thermal_conduction_getSpecificHeat(ce)*(T_lastInc(i,j,k) - &
|
|
||||||
T_current(i,j,k))&
|
|
||||||
+ mu_ref*T_current(i,j,k)
|
+ mu_ref*T_current(i,j,k)
|
||||||
enddo; enddo; enddo
|
enddo; enddo; enddo
|
||||||
|
|
||||||
|
@ -314,7 +312,7 @@ subroutine updateReference
|
||||||
do k = 1, grid3; do j = 1, grid(2); do i = 1,grid(1)
|
do k = 1, grid3; do j = 1, grid(2); do i = 1,grid(1)
|
||||||
ce = ce + 1
|
ce = ce + 1
|
||||||
K_ref = K_ref + thermal_conduction_getConductivity(ce)
|
K_ref = K_ref + thermal_conduction_getConductivity(ce)
|
||||||
mu_ref = mu_ref + thermal_conduction_getMassDensity(ce)* thermal_conduction_getSpecificHeat(ce)
|
mu_ref = mu_ref + homogenization_thermal_mu_T(ce)
|
||||||
enddo; enddo; enddo
|
enddo; enddo; enddo
|
||||||
K_ref = K_ref*wgt
|
K_ref = K_ref*wgt
|
||||||
call MPI_Allreduce(MPI_IN_PLACE,K_ref,9,MPI_DOUBLE,MPI_SUM,PETSC_COMM_WORLD,ierr)
|
call MPI_Allreduce(MPI_IN_PLACE,K_ref,9,MPI_DOUBLE,MPI_SUM,PETSC_COMM_WORLD,ierr)
|
||||||
|
|
|
@ -143,15 +143,10 @@ module homogenization
|
||||||
real(pReal), dimension(3,3) :: K
|
real(pReal), dimension(3,3) :: K
|
||||||
end function thermal_conduction_getConductivity
|
end function thermal_conduction_getConductivity
|
||||||
|
|
||||||
module function thermal_conduction_getSpecificHeat(ce) result(c_P)
|
module function homogenization_thermal_mu_T(ce) result(mu_T)
|
||||||
integer, intent(in) :: ce
|
integer, intent(in) :: ce
|
||||||
real(pReal) :: c_P
|
real(pReal) :: mu_T
|
||||||
end function thermal_conduction_getSpecificHeat
|
end function homogenization_thermal_mu_T
|
||||||
|
|
||||||
module function thermal_conduction_getMassDensity(ce) result(rho)
|
|
||||||
integer, intent(in) :: ce
|
|
||||||
real(pReal) :: rho
|
|
||||||
end function thermal_conduction_getMassDensity
|
|
||||||
|
|
||||||
module subroutine homogenization_thermal_setField(T,dot_T, ce)
|
module subroutine homogenization_thermal_setField(T,dot_T, ce)
|
||||||
integer, intent(in) :: ce
|
integer, intent(in) :: ce
|
||||||
|
@ -194,9 +189,8 @@ module homogenization
|
||||||
public :: &
|
public :: &
|
||||||
homogenization_init, &
|
homogenization_init, &
|
||||||
materialpoint_stressAndItsTangent, &
|
materialpoint_stressAndItsTangent, &
|
||||||
thermal_conduction_getSpecificHeat, &
|
homogenization_thermal_mu_T, &
|
||||||
thermal_conduction_getConductivity, &
|
thermal_conduction_getConductivity, &
|
||||||
thermal_conduction_getMassDensity, &
|
|
||||||
thermal_conduction_getSource, &
|
thermal_conduction_getSource, &
|
||||||
damage_nonlocal_getMobility, &
|
damage_nonlocal_getMobility, &
|
||||||
damage_nonlocal_getSourceAndItsTangent, &
|
damage_nonlocal_getSourceAndItsTangent, &
|
||||||
|
|
|
@ -128,10 +128,20 @@ module function thermal_conduction_getConductivity(ce) result(K)
|
||||||
end function thermal_conduction_getConductivity
|
end function thermal_conduction_getConductivity
|
||||||
|
|
||||||
|
|
||||||
|
module function homogenization_thermal_mu_T(ce) result(mu_T)
|
||||||
|
|
||||||
|
integer, intent(in) :: ce
|
||||||
|
real(pReal) :: mu_T
|
||||||
|
|
||||||
|
mu_T = c_P(ce) * rho(ce)
|
||||||
|
|
||||||
|
end function homogenization_thermal_mu_T
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief returns homogenized specific heat capacity
|
!> @brief returns homogenized specific heat capacity
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module function thermal_conduction_getSpecificHeat(ce) result(c_P)
|
function c_P(ce)
|
||||||
|
|
||||||
integer, intent(in) :: ce
|
integer, intent(in) :: ce
|
||||||
real(pReal) :: c_P
|
real(pReal) :: c_P
|
||||||
|
@ -139,21 +149,20 @@ module function thermal_conduction_getSpecificHeat(ce) result(c_P)
|
||||||
integer :: co
|
integer :: co
|
||||||
|
|
||||||
|
|
||||||
c_P = 0.0_pReal
|
c_P = lattice_c_p(material_phaseID(1,ce))
|
||||||
|
do co = 2, homogenization_Nconstituents(material_homogenizationID(ce))
|
||||||
do co = 1, homogenization_Nconstituents(material_homogenizationID(ce))
|
|
||||||
c_P = c_P + lattice_c_p(material_phaseID(co,ce))
|
c_P = c_P + lattice_c_p(material_phaseID(co,ce))
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
c_P = c_P / real(homogenization_Nconstituents(material_homogenizationID(ce)),pReal)
|
c_P = c_P / real(homogenization_Nconstituents(material_homogenizationID(ce)),pReal)
|
||||||
|
|
||||||
end function thermal_conduction_getSpecificHeat
|
end function c_P
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief returns homogenized mass density
|
!> @brief returns homogenized mass density
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module function thermal_conduction_getMassDensity(ce) result(rho)
|
function rho(ce)
|
||||||
|
|
||||||
integer, intent(in) :: ce
|
integer, intent(in) :: ce
|
||||||
real(pReal) :: rho
|
real(pReal) :: rho
|
||||||
|
@ -161,15 +170,14 @@ module function thermal_conduction_getMassDensity(ce) result(rho)
|
||||||
integer :: co
|
integer :: co
|
||||||
|
|
||||||
|
|
||||||
rho = 0.0_pReal
|
rho = lattice_rho(material_phaseID(1,ce))
|
||||||
|
do co = 2, homogenization_Nconstituents(material_homogenizationID(ce))
|
||||||
do co = 1, homogenization_Nconstituents(material_homogenizationID(ce))
|
|
||||||
rho = rho + lattice_rho(material_phaseID(co,ce))
|
rho = rho + lattice_rho(material_phaseID(co,ce))
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
rho = rho / real(homogenization_Nconstituents(material_homogenizationID(ce)),pReal)
|
rho = rho / real(homogenization_Nconstituents(material_homogenizationID(ce)),pReal)
|
||||||
|
|
||||||
end function thermal_conduction_getMassDensity
|
end function rho
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue