DAMASK with grid solvers  Revision: v2.0.3-2204-gdb1f2151
The Düsseldorf Advanced Material Simulation Kit with Grid Solvers
grid_mech_fem Module Reference

Grid solver for mechanics: FEM. More...

Functions/Subroutines

subroutine, public grid_mech_fem_init
 allocates all necessary fields and fills them with data, potentially from restart info More...
 
type(tsolutionstate) function, public grid_mech_fem_solution (incInfoIn, timeinc, timeinc_old, stress_BC, rotation_BC)
 solution for the FEM scheme with internal iterations More...
 
subroutine, public grid_mech_fem_forward (cutBack, guess, timeinc, timeinc_old, loadCaseTime, deformation_BC, stress_BC, rotation_BC)
 forwarding routine More...
 
subroutine, public grid_mech_fem_updatecoords
 Age. More...
 
subroutine, public grid_mech_fem_restartwrite
 Write current solver and constitutive data for restart to file. More...
 
subroutine converged (snes_local, PETScIter, devNull1, devNull2, fnorm, reason, dummy, ierr)
 convergence check More...
 
subroutine formresidual (da_local, x_local, f_local, dummy, ierr)
 forms the residual vector More...
 
subroutine formjacobian (da_local, x_local, Jac_pre, Jac, dummy, ierr)
 forms the FEM stiffness matrix More...
 

Variables

type(tsolutionparams), private params
 
type(tdm), private mech_grid
 
type(tsnes), private mech_snes
 
type(tvec), private solution_current
 
type(tvec), private solution_lastinc
 
type(tvec), private solution_rate
 
real(preal), dimension(:,:,:,:,:), allocatable, private f
 
real(preal), dimension(:,:,:,:,:), allocatable, private p_current
 
real(preal), dimension(:,:,:,:,:), allocatable, private f_lastinc
 
real(preal), private detj
 
real(preal), dimension(3), private delta
 
real(preal), dimension(3, 8), private bmat
 
real(preal), dimension(8, 8), private hgmat
 
integer(kind=selected_int_kind(5)), private xstart
 
integer(kind=selected_int_kind(5)), private ystart
 
integer(kind=selected_int_kind(5)), private zstart
 
integer(kind=selected_int_kind(5)), private xend
 
integer(kind=selected_int_kind(5)), private yend
 
integer(kind=selected_int_kind(5)), private zend
 
real(preal), dimension(3, 3), private f_aimdot = 0.0_pReal
 assumed rate of average deformation gradient More...
 
real(preal), dimension(3, 3), private f_aim = math_I3
 current prescribed deformation gradient More...
 
real(preal), dimension(3, 3), private f_aim_lastiter = math_I3
 
real(preal), dimension(3, 3), private f_aim_lastinc = math_I3
 previous average deformation gradient More...
 
real(preal), dimension(3, 3), private p_av = 0.0_pReal
 average 1st Piola–Kirchhoff stress More...
 
character(len=pstringlen), private incinfo
 time and increment information More...
 
real(preal), dimension(3, 3, 3, 3), private c_volavg = 0.0_pReal
 current volume average stiffness More...
 
real(preal), dimension(3, 3, 3, 3), private c_volavglastinc = 0.0_pReal
 previous volume average stiffness More...
 
real(preal), dimension(3, 3, 3, 3), private s = 0.0_pReal
 current compliance (filled up with zeros) More...
 
real(preal), private err_bc
 deviation from stress BC More...
 
integer, private totaliter = 0
 total iteration in current increment More...
 

Detailed Description

Grid solver for mechanics: FEM.

Author
Arko Jyoti Bhattacharjee, Max-Planck-Institut für Eisenforschung GmbH
Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
Pratheek Shanthraj, Max-Planck-Institut für Eisenforschung GmbH

Function/Subroutine Documentation

◆ converged()

subroutine grid_mech_fem::converged ( type(tsnes)  snes_local,
integer(kind=selected_int_kind(5)), intent(in)  PETScIter,
real(kind=selected_real_kind(10)), intent(in)  devNull1,
real(kind=selected_real_kind(10)), intent(in)  devNull2,
real(kind=selected_real_kind(10)), intent(in)  fnorm,
integer(kind=selected_int_kind(5))  reason,
integer(kind=selected_int_kind(10))  dummy,
integer(kind=selected_int_kind(5))  ierr 
)
private

convergence check

Definition at line 2195 of file grid_mech_FEM.f90.

References detj, err_bc, discretization_grid::geomsize, numerics::itmax, numerics::itmin, p_av, spectral_utilities::scaledgeomsize, fesolving::terminallyill, totaliter, and spectral_utilities::wgt.

Referenced by grid_mech_fem_init().

+ Here is the caller graph for this function:

◆ formjacobian()

subroutine grid_mech_fem::formjacobian ( type(tdm)  da_local,
type(tvec)  x_local,
type(tmat)  Jac_pre,
type(tmat)  Jac,
integer(kind=selected_int_kind(10))  dummy,
integer(kind=selected_int_kind(5))  ierr 
)
private

forms the FEM stiffness matrix

Definition at line 2356 of file grid_mech_FEM.f90.

References bmat, c_volavg, delta, detj, discretization::discretization_ipcoords, hgmat, homogenization::materialpoint_dpdf, xend, xstart, yend, ystart, zend, and zstart.

Referenced by grid_mech_fem_init().

+ Here is the caller graph for this function:

◆ formresidual()

subroutine grid_mech_fem::formresidual ( type(tdm)  da_local,
type(tvec)  x_local,
type(tvec)  f_local,
integer(kind=selected_int_kind(10))  dummy,
integer(kind=selected_int_kind(5))  ierr 
)
private

forms the residual vector

Definition at line 2243 of file grid_mech_FEM.f90.

References bmat, c_volavg, debug::debug_level, debug::debug_spectral, debug::debug_spectralrotation, detj, err_bc, f, f_aim, f_aim_lastiter, discretization_grid::grid, hgmat, incinfo, numerics::itmax, numerics::itmin, homogenization::materialpoint_dpdf, math::math_mul3333xx33(), mech_snes, p_av, p_current, params, s, fesolving::terminallyill, totaliter, spectral_utilities::utilities_constitutiveresponse(), xend, xstart, yend, ystart, zend, and zstart.

Referenced by grid_mech_fem_init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ grid_mech_fem_forward()

subroutine, public grid_mech_fem::grid_mech_fem_forward ( logical, intent(in)  cutBack,
logical, intent(in)  guess,
real(preal), intent(in)  timeinc,
real(preal), intent(in)  timeinc_old,
real(preal), intent(in)  loadCaseTime,
type(tboundarycondition), intent(in)  deformation_BC,
type(tboundarycondition), intent(in)  stress_BC,
type(rotation), intent(in)  rotation_BC 
)

forwarding routine

find new boundary conditions and best F estimate for end of current timestep possibly writing restart information, triggering of state increment in DAMASK, and updating of IPcoordinates

Parameters
[in]loadcasetimeremaining time of current load case

Definition at line 2076 of file grid_mech_FEM.f90.

References c_volavg, c_volavglastinc, f, f_aim, f_aim_lastinc, f_aimdot, f_lastinc, discretization_grid::grid, discretization_grid::grid3, homogenization::materialpoint_f0, mech_grid, solution_current, solution_lastinc, and solution_rate.

Referenced by damask_spectral().

+ Here is the caller graph for this function:

◆ grid_mech_fem_init()

subroutine, public grid_mech_fem::grid_mech_fem_init

allocates all necessary fields and fills them with data, potentially from restart info

Definition at line 1875 of file grid_mech_FEM.f90.

References bmat, c_volavg, c_volavglastinc, converged(), delta, detj, f, f_aim, f_aim_lastinc, f_aimdot, f_lastinc, formjacobian(), formresidual(), discretization_grid::geomsize, damask_interface::getsolverjobname(), discretization_grid::grid, discretization_grid::grid3, hdf5_utilities::hdf5_closefile(), hdf5_utilities::hdf5_closegroup(), hdf5_utilities::hdf5_openfile(), hdf5_utilities::hdf5_opengroup(), hgmat, damask_interface::interface_restartinc, homogenization::materialpoint_f0, math::math_i3, mech_grid, mech_snes, p_current, prec::preal, solution_current, solution_lastinc, solution_rate, spectral_utilities::utilities_constitutiveresponse(), spectral_utilities::utilities_updatecoords(), numerics::worldrank, numerics::worldsize, xend, xstart, yend, ystart, zend, and zstart.

Referenced by damask_spectral().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ grid_mech_fem_restartwrite()

subroutine, public grid_mech_fem::grid_mech_fem_restartwrite

Write current solver and constitutive data for restart to file.

Definition at line 2156 of file grid_mech_FEM.f90.

References c_volavg, c_volavglastinc, f, f_aim, f_aim_lastinc, f_aimdot, f_lastinc, damask_interface::getsolverjobname(), hdf5_utilities::hdf5_addgroup(), hdf5_utilities::hdf5_closefile(), hdf5_utilities::hdf5_closegroup(), hdf5_utilities::hdf5_openfile(), mech_grid, solution_current, solution_lastinc, and numerics::worldrank.

Referenced by damask_spectral().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ grid_mech_fem_solution()

type(tsolutionstate) function, public grid_mech_fem::grid_mech_fem_solution ( character(len=*), intent(in)  incInfoIn,
real(preal), intent(in)  timeinc,
real(preal), intent(in)  timeinc_old,
type(tboundarycondition), intent(in)  stress_BC,
type(rotation), intent(in)  rotation_BC 
)

solution for the FEM scheme with internal iterations

Parameters
[in]timeinc_oldtime increment of last successful increment
Parameters
timeinctime increment of current solution

Definition at line 2021 of file grid_mech_FEM.f90.

References c_volavg, incinfo, mech_snes, params, s, solution_current, fesolving::terminallyill, totaliter, and spectral_utilities::utilities_maskedcompliance().

Referenced by damask_spectral().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ grid_mech_fem_updatecoords()

subroutine, public grid_mech_fem::grid_mech_fem_updatecoords

Age.

Definition at line 2146 of file grid_mech_FEM.f90.

References f, and spectral_utilities::utilities_updatecoords().

Referenced by damask_spectral().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ bmat

real(preal), dimension(3,8), private grid_mech_fem::bmat
private

Definition at line 1836 of file grid_mech_FEM.f90.

Referenced by formjacobian(), formresidual(), and grid_mech_fem_init().

◆ c_volavg

real(preal), dimension(3,3,3,3), private grid_mech_fem::c_volavg = 0.0_pReal
private

◆ c_volavglastinc

real(preal), dimension(3,3,3,3), private grid_mech_fem::c_volavglastinc = 0.0_pReal
private

previous volume average stiffness

Definition at line 1851 of file grid_mech_FEM.f90.

Referenced by grid_mech_fem_forward(), grid_mech_fem_init(), and grid_mech_fem_restartwrite().

◆ delta

real(preal), dimension(3), private grid_mech_fem::delta
private

Definition at line 1835 of file grid_mech_FEM.f90.

Referenced by formjacobian(), and grid_mech_fem_init().

◆ detj

real(preal), private grid_mech_fem::detj
private

Definition at line 1834 of file grid_mech_FEM.f90.

Referenced by converged(), formjacobian(), formresidual(), and grid_mech_fem_init().

◆ err_bc

real(preal), private grid_mech_fem::err_bc
private

deviation from stress BC

Definition at line 1856 of file grid_mech_FEM.f90.

Referenced by converged(), and formresidual().

◆ f

real(preal), dimension(:,:,:,:,:), allocatable, private grid_mech_fem::f
private

◆ f_aim

real(preal), dimension(3,3), private grid_mech_fem::f_aim = math_I3
private

current prescribed deformation gradient

Definition at line 1842 of file grid_mech_FEM.f90.

Referenced by formresidual(), grid_mech_fem_forward(), grid_mech_fem_init(), and grid_mech_fem_restartwrite().

◆ f_aim_lastinc

real(preal), dimension(3,3), private grid_mech_fem::f_aim_lastinc = math_I3
private

previous average deformation gradient

Definition at line 1842 of file grid_mech_FEM.f90.

Referenced by grid_mech_fem_forward(), grid_mech_fem_init(), and grid_mech_fem_restartwrite().

◆ f_aim_lastiter

real(preal), dimension(3,3), private grid_mech_fem::f_aim_lastiter = math_I3
private

Definition at line 1842 of file grid_mech_FEM.f90.

Referenced by formresidual().

◆ f_aimdot

real(preal), dimension(3,3), private grid_mech_fem::f_aimdot = 0.0_pReal
private

assumed rate of average deformation gradient

Definition at line 1842 of file grid_mech_FEM.f90.

Referenced by grid_mech_fem_forward(), grid_mech_fem_init(), and grid_mech_fem_restartwrite().

◆ f_lastinc

real(preal), dimension(:,:,:,:,:), allocatable, private grid_mech_fem::f_lastinc
private

◆ hgmat

real(preal), dimension(8,8), private grid_mech_fem::hgmat
private

Definition at line 1837 of file grid_mech_FEM.f90.

Referenced by formjacobian(), formresidual(), and grid_mech_fem_init().

◆ incinfo

character(len=pstringlen), private grid_mech_fem::incinfo
private

time and increment information

Definition at line 1849 of file grid_mech_FEM.f90.

Referenced by damask_spectral(), formresidual(), and grid_mech_fem_solution().

◆ mech_grid

type(tdm), private grid_mech_fem::mech_grid
private

◆ mech_snes

type(tsnes), private grid_mech_fem::mech_snes
private

Definition at line 1828 of file grid_mech_FEM.f90.

Referenced by formresidual(), grid_mech_fem_init(), and grid_mech_fem_solution().

◆ p_av

real(preal), dimension(3,3), private grid_mech_fem::p_av = 0.0_pReal
private

average 1st Piola–Kirchhoff stress

Definition at line 1842 of file grid_mech_FEM.f90.

Referenced by converged(), and formresidual().

◆ p_current

real(preal), dimension(:,:,:,:,:), allocatable, private grid_mech_fem::p_current
private

Definition at line 1833 of file grid_mech_FEM.f90.

Referenced by formresidual(), and grid_mech_fem_init().

◆ params

type(tsolutionparams), private grid_mech_fem::params
private

Definition at line 1823 of file grid_mech_FEM.f90.

Referenced by formresidual(), and grid_mech_fem_solution().

◆ s

real(preal), dimension(3,3,3,3), private grid_mech_fem::s = 0.0_pReal
private

current compliance (filled up with zeros)

Definition at line 1851 of file grid_mech_FEM.f90.

Referenced by formresidual(), and grid_mech_fem_solution().

◆ solution_current

type(tvec), private grid_mech_fem::solution_current
private

◆ solution_lastinc

type(tvec), private grid_mech_fem::solution_lastinc
private

◆ solution_rate

type(tvec), private grid_mech_fem::solution_rate
private

Definition at line 1829 of file grid_mech_FEM.f90.

Referenced by grid_mech_fem_forward(), and grid_mech_fem_init().

◆ totaliter

integer, private grid_mech_fem::totaliter = 0
private

total iteration in current increment

Definition at line 1859 of file grid_mech_FEM.f90.

Referenced by converged(), formresidual(), and grid_mech_fem_solution().

◆ xend

integer(kind=selected_int_kind(5)), private grid_mech_fem::xend
private

Definition at line 1838 of file grid_mech_FEM.f90.

Referenced by formjacobian(), formresidual(), and grid_mech_fem_init().

◆ xstart

integer(kind=selected_int_kind(5)), private grid_mech_fem::xstart
private

Definition at line 1838 of file grid_mech_FEM.f90.

Referenced by formjacobian(), formresidual(), and grid_mech_fem_init().

◆ yend

integer(kind=selected_int_kind(5)), private grid_mech_fem::yend
private

Definition at line 1838 of file grid_mech_FEM.f90.

Referenced by formjacobian(), formresidual(), and grid_mech_fem_init().

◆ ystart

integer(kind=selected_int_kind(5)), private grid_mech_fem::ystart
private

Definition at line 1838 of file grid_mech_FEM.f90.

Referenced by formjacobian(), formresidual(), and grid_mech_fem_init().

◆ zend

integer(kind=selected_int_kind(5)), private grid_mech_fem::zend
private

Definition at line 1838 of file grid_mech_FEM.f90.

Referenced by formjacobian(), formresidual(), and grid_mech_fem_init().

◆ zstart

integer(kind=selected_int_kind(5)), private grid_mech_fem::zstart
private

Definition at line 1838 of file grid_mech_FEM.f90.

Referenced by formjacobian(), formresidual(), and grid_mech_fem_init().