commercial FEM solvers write results to HDF5
This commit is contained in:
parent
f65423fe9f
commit
4a0584fe25
|
@ -47,7 +47,8 @@ module CPFEM
|
||||||
|
|
||||||
public :: &
|
public :: &
|
||||||
CPFEM_general, &
|
CPFEM_general, &
|
||||||
CPFEM_initAll
|
CPFEM_initAll, &
|
||||||
|
CPFEM_results
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
|
@ -633,4 +634,35 @@ subroutine CPFEM_general(mode, parallelExecution, ffn, ffn1, temperature_inp, dt
|
||||||
|
|
||||||
end subroutine CPFEM_general
|
end subroutine CPFEM_general
|
||||||
|
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
!> @brief triggers writing of the results
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
subroutine CPFEM_results(inc,time)
|
||||||
|
use prec, only: &
|
||||||
|
pInt
|
||||||
|
#ifdef DAMASK_HDF5
|
||||||
|
use results
|
||||||
|
use HDF5_utilities
|
||||||
|
#endif
|
||||||
|
use constitutive, only: &
|
||||||
|
constitutive_results
|
||||||
|
use crystallite, only: &
|
||||||
|
crystallite_results
|
||||||
|
|
||||||
|
implicit none
|
||||||
|
integer(pInt), intent(in) :: inc
|
||||||
|
real(pReal), intent(in) :: time
|
||||||
|
|
||||||
|
#ifdef DAMASK_HDF5
|
||||||
|
call results_openJobFile
|
||||||
|
call results_addIncrement(inc,time)
|
||||||
|
call constitutive_results
|
||||||
|
call crystallite_results
|
||||||
|
call results_removeLink('current') ! ToDo: put this into closeJobFile
|
||||||
|
call results_closeJobFile
|
||||||
|
#endif
|
||||||
|
|
||||||
|
end subroutine CPFEM_results
|
||||||
|
|
||||||
end module CPFEM
|
end module CPFEM
|
||||||
|
|
|
@ -290,6 +290,7 @@ subroutine CPFEM_age()
|
||||||
|
|
||||||
end subroutine CPFEM_age
|
end subroutine CPFEM_age
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief triggers writing of the results
|
!> @brief triggers writing of the results
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
!> @details Marc subroutines used:
|
!> @details Marc subroutines used:
|
||||||
!> @details - hypela2
|
!> @details - hypela2
|
||||||
!> @details - plotv
|
!> @details - plotv
|
||||||
|
!> @details - uedinc
|
||||||
!> @details - flux
|
!> @details - flux
|
||||||
!> @details - quit
|
!> @details - quit
|
||||||
!> @details Marc common blocks included:
|
!> @details Marc common blocks included:
|
||||||
|
@ -273,26 +274,20 @@ subroutine hypela2(d,g,e,de,s,t,dt,ngens,m,nn,kcus,matus,ndi,nshear,disp, &
|
||||||
outdatedByNewInc = .false. ! no aging of state
|
outdatedByNewInc = .false. ! no aging of state
|
||||||
calcMode = .false. ! pretend last step was collection
|
calcMode = .false. ! pretend last step was collection
|
||||||
lastLovl = lovl ! pretend that this is NOT the first after a lovl change
|
lastLovl = lovl ! pretend that this is NOT the first after a lovl change
|
||||||
!$OMP CRITICAL (write2out)
|
write(6,'(a,i6,1x,i2)') '<< HYPELA2 >> start of analysis..! ',m(1),nn
|
||||||
write(6,'(a,i6,1x,i2)') '<< HYPELA2 >> start of analysis..! ',m(1),nn
|
flush(6)
|
||||||
flush(6)
|
|
||||||
!$OMP END CRITICAL (write2out)
|
|
||||||
else if (inc - theInc > 1) then ! >> restart of broken analysis <<
|
else if (inc - theInc > 1) then ! >> restart of broken analysis <<
|
||||||
lastIncConverged = .false. ! no Jacobian backup
|
lastIncConverged = .false. ! no Jacobian backup
|
||||||
outdatedByNewInc = .false. ! no aging of state
|
outdatedByNewInc = .false. ! no aging of state
|
||||||
calcMode = .true. ! pretend last step was calculation
|
calcMode = .true. ! pretend last step was calculation
|
||||||
!$OMP CRITICAL (write2out)
|
write(6,'(a,i6,1x,i2)') '<< HYPELA2 >> restart of analysis..! ',m(1),nn
|
||||||
write(6,'(a,i6,1x,i2)') '<< HYPELA2 >> restart of analysis..! ',m(1),nn
|
flush(6)
|
||||||
flush(6)
|
|
||||||
!$OMP END CRITICAL (write2out)
|
|
||||||
else ! >> just the next inc <<
|
else ! >> just the next inc <<
|
||||||
lastIncConverged = .true. ! request Jacobian backup
|
lastIncConverged = .true. ! request Jacobian backup
|
||||||
outdatedByNewInc = .true. ! request aging of state
|
outdatedByNewInc = .true. ! request aging of state
|
||||||
calcMode = .true. ! assure last step was calculation
|
calcMode = .true. ! assure last step was calculation
|
||||||
!$OMP CRITICAL (write2out)
|
write(6,'(a,i6,1x,i2)') '<< HYPELA2 >> new increment..! ',m(1),nn
|
||||||
write(6,'(a,i6,1x,i2)') '<< HYPELA2 >> new increment..! ',m(1),nn
|
flush(6)
|
||||||
flush(6)
|
|
||||||
!$OMP END CRITICAL (write2out)
|
|
||||||
endif
|
endif
|
||||||
else if ( timinc < theDelta ) then ! >> cutBack <<
|
else if ( timinc < theDelta ) then ! >> cutBack <<
|
||||||
lastIncConverged = .false. ! no Jacobian backup
|
lastIncConverged = .false. ! no Jacobian backup
|
||||||
|
@ -300,10 +295,8 @@ subroutine hypela2(d,g,e,de,s,t,dt,ngens,m,nn,kcus,matus,ndi,nshear,disp, &
|
||||||
terminallyIll = .false.
|
terminallyIll = .false.
|
||||||
cycleCounter = -1 ! first calc step increments this to cycle = 0
|
cycleCounter = -1 ! first calc step increments this to cycle = 0
|
||||||
calcMode = .true. ! pretend last step was calculation
|
calcMode = .true. ! pretend last step was calculation
|
||||||
!$OMP CRITICAL (write2out)
|
write(6,'(a,i6,1x,i2)') '<< HYPELA2 >> cutback detected..! ',m(1),nn
|
||||||
write(6,'(a,i6,1x,i2)') '<< HYPELA2 >> cutback detected..! ',m(1),nn
|
flush(6)
|
||||||
flush(6)
|
|
||||||
!$OMP END CRITICAL (write2out)
|
|
||||||
endif ! convergence treatment end
|
endif ! convergence treatment end
|
||||||
|
|
||||||
|
|
||||||
|
@ -365,7 +358,6 @@ subroutine hypela2(d,g,e,de,s,t,dt,ngens,m,nn,kcus,matus,ndi,nshear,disp, &
|
||||||
lastLovl = lovl ! record lovl
|
lastLovl = lovl ! record lovl
|
||||||
|
|
||||||
call CPFEM_general(computationMode,usePingPong,ffn,ffn1,t(1),timinc,m(1),nn,stress,ddsdde)
|
call CPFEM_general(computationMode,usePingPong,ffn,ffn1,t(1),timinc,m(1),nn,stress,ddsdde)
|
||||||
|
|
||||||
! Mandel: 11, 22, 33, SQRT(2)*12, SQRT(2)*23, SQRT(2)*13
|
! Mandel: 11, 22, 33, SQRT(2)*12, SQRT(2)*23, SQRT(2)*13
|
||||||
! Marc: 11, 22, 33, 12, 23, 13
|
! Marc: 11, 22, 33, 12, 23, 13
|
||||||
! Marc: 11, 22, 33, 12
|
! Marc: 11, 22, 33, 12
|
||||||
|
@ -407,6 +399,26 @@ subroutine flux(f,ts,n,time)
|
||||||
end subroutine flux
|
end subroutine flux
|
||||||
|
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
!> @brief sets user defined output variables for Marc
|
||||||
|
!> @details select a variable contour plotting (user subroutine).
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
subroutine uedinc(inc,incsub)
|
||||||
|
use prec, only: &
|
||||||
|
pReal, &
|
||||||
|
pInt
|
||||||
|
use CPFEM, only: &
|
||||||
|
CPFEM_results
|
||||||
|
|
||||||
|
implicit none
|
||||||
|
integer, intent(in) :: inc, incsub
|
||||||
|
#include QUOTE(PASTE(./MarcInclude/creeps,Marc4DAMASK)) ! creeps is needed for timinc (time increment)
|
||||||
|
|
||||||
|
call CPFEM_results(inc,cptim)
|
||||||
|
|
||||||
|
end subroutine uedinc
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief sets user defined output variables for Marc
|
!> @brief sets user defined output variables for Marc
|
||||||
!> @details select a variable contour plotting (user subroutine).
|
!> @details select a variable contour plotting (user subroutine).
|
||||||
|
|
Loading…
Reference in New Issue