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

Grid solver for mechanics: 1 Polarisation. More...

Data Types

type  tnumerics
 

Functions/Subroutines

subroutine, public grid_mech_spectral_polarisation_init
 allocates all necessary fields and fills them with data, potentially from restart info More...
 
type(tsolutionstate) function, public grid_mech_spectral_polarisation_solution (incInfoIn, timeinc, timeinc_old, stress_BC, rotation_BC)
 solution for the Polarisation scheme with internal iterations More...
 
subroutine, public grid_mech_spectral_polarisation_forward (cutBack, guess, timeinc, timeinc_old, loadCaseTime, deformation_BC, stress_BC, rotation_BC)
 forwarding routine More...
 
subroutine, public grid_mech_spectral_polarisation_updatecoords
 Age. More...
 
subroutine, public grid_mech_spectral_polarisation_restartwrite
 Write current solver and constitutive data for restart to file. More...
 
subroutine converged (snes_local, PETScIter, devNull1, devNull2, devNull3, reason, dummy, ierr)
 convergence check More...
 
subroutine formresidual (in, FandF_tau, residuum, dummy, ierr)
 forms the residual vector More...
 

Variables

type(tsolutionparams), private params
 
type(tnumericsnum
 
type(tdm), private da
 
type(tsnes), private snes
 
type(tvec), private solution_vec
 
real(preal), dimension(:,:,:,:,:), allocatable, private f_lastinc
 field of previous compatible deformation gradients More...
 
real(preal), dimension(:,:,:,:,:), allocatable, private f_tau_lastinc
 field of previous incompatible deformation gradient More...
 
real(preal), dimension(:,:,:,:,:), allocatable, private fdot
 field of assumed rate of compatible deformation gradient More...
 
real(preal), dimension(:,:,:,:,:), allocatable, private f_taudot
 field of assumed rate of incopatible deformation gradient More...
 
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_lastinc = math_I3
 previous average deformation gradient More...
 
real(preal), dimension(3, 3), private f_av = 0.0_pReal
 average incompatible def grad field 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 c_minmaxavg = 0.0_pReal
 current (min+max)/2 stiffness More...
 
real(preal), dimension(3, 3, 3, 3), private c_minmaxavglastinc = 0.0_pReal
 previous (min+max)/2 stiffness More...
 
real(preal), dimension(3, 3, 3, 3), private s = 0.0_pReal
 current compliance (filled up with zeros) More...
 
real(preal), dimension(3, 3, 3, 3), private c_scale = 0.0_pReal
 
real(preal), dimension(3, 3, 3, 3), private s_scale = 0.0_pReal
 
real(preal), private err_bc
 deviation from stress BC More...
 
real(preal), private err_curl
 RMS of curl of F. More...
 
real(preal), private err_div
 RMS of div of P. More...
 
integer, private totaliter = 0
 total iteration in current increment More...
 

Detailed Description

Grid solver for mechanics: 1 Polarisation.

Author
Pratheek Shanthraj, Max-Planck-Institut für Eisenforschung GmbH
Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH

Function/Subroutine Documentation

◆ converged()

subroutine grid_mech_spectral_polarisation::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)  devNull3,
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 2213 of file grid_mech_spectral_polarisation.f90.

References err_bc, err_curl, err_div, f_aim, numerics::itmax, numerics::itmin, math::math_i3, p_av, fesolving::terminallyill, and totaliter.

Referenced by grid_mech_spectral_polarisation_init().

+ Here is the caller graph for this function:

◆ formresidual()

subroutine grid_mech_spectral_polarisation::formresidual ( integer(kind=selected_int_kind(5)), dimension(25)  in,
real(kind=selected_real_kind(10)), dimension(3,3,2,in(13)+1:in(13)+in(16),in(14)+1:in(14)+in(17),in(15)+1:in(15)+in(18)), intent(in), target  FandF_tau,
real(kind=selected_real_kind(10)), dimension(3,3,2,in(7)+1:in(7)+in(10),in(8)+1:in(8)+in(11),in(9)+1:in(9)+in(12)), intent(out), target  residuum,
integer(kind=selected_int_kind(10))  dummy,
integer(kind=selected_int_kind(5))  ierr 
)
private

forms the residual vector

Parameters
in'da' info (needs to be named "in" for macros like XRANGE to work)
[out]residuumresiduum field

Definition at line 2264 of file grid_mech_spectral_polarisation.f90.

References c_minmaxavg, c_scale, c_volavg, debug::debug_level, debug::debug_spectral, debug::debug_spectralrotation, err_bc, err_curl, err_div, f_aim, f_av, discretization_grid::grid, discretization_grid::grid3, incinfo, numerics::itmax, numerics::itmin, homogenization::materialpoint_dpdf, math::math_i3, math::math_invsym3333(), math::math_mul3333xx33(), p_av, params, s, snes, spectral_utilities::tensorfield_real, fesolving::terminallyill, totaliter, spectral_utilities::utilities_constitutiveresponse(), spectral_utilities::utilities_curlrms(), spectral_utilities::utilities_divergencerms(), spectral_utilities::utilities_ffttensorbackward(), spectral_utilities::utilities_ffttensorforward(), spectral_utilities::utilities_fouriergammaconvolution(), and spectral_utilities::wgt.

Referenced by grid_mech_spectral_polarisation_init().

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

◆ grid_mech_spectral_polarisation_forward()

subroutine, public grid_mech_spectral_polarisation::grid_mech_spectral_polarisation_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 2070 of file grid_mech_spectral_polarisation.f90.

References c_minmaxavg, c_minmaxavglastinc, c_scale, c_volavg, c_volavglastinc, da, f_aim, f_aim_lastinc, f_aimdot, f_lastinc, f_tau_lastinc, f_taudot, fdot, discretization_grid::grid, discretization_grid::grid3, homogenization::materialpoint_f0, math::math_i3, math::math_mul3333xx33(), s_scale, solution_vec, spectral_utilities::utilities_calculaterate(), and spectral_utilities::utilities_forwardfield().

Referenced by damask_spectral().

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

◆ grid_mech_spectral_polarisation_init()

subroutine, public grid_mech_spectral_polarisation::grid_mech_spectral_polarisation_init

◆ grid_mech_spectral_polarisation_restartwrite()

subroutine, public grid_mech_spectral_polarisation::grid_mech_spectral_polarisation_restartwrite

Write current solver and constitutive data for restart to file.

Definition at line 2172 of file grid_mech_spectral_polarisation.f90.

References c_volavg, c_volavglastinc, da, f_aim, f_aim_lastinc, f_aimdot, f_lastinc, f_tau_lastinc, damask_interface::getsolverjobname(), hdf5_utilities::hdf5_addgroup(), hdf5_utilities::hdf5_closefile(), hdf5_utilities::hdf5_closegroup(), hdf5_utilities::hdf5_openfile(), num, solution_vec, spectral_utilities::utilities_savereferencestiffness(), 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_spectral_polarisation_solution()

type(tsolutionstate) function, public grid_mech_spectral_polarisation::grid_mech_spectral_polarisation_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 Polarisation scheme with internal iterations

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

Definition at line 2009 of file grid_mech_spectral_polarisation.f90.

References c_minmaxavg, c_scale, c_volavg, incinfo, math::math_invsym3333(), num, params, s, s_scale, snes, solution_vec, fesolving::terminallyill, totaliter, spectral_utilities::utilities_maskedcompliance(), and spectral_utilities::utilities_updategamma().

Referenced by damask_spectral().

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

◆ grid_mech_spectral_polarisation_updatecoords()

subroutine, public grid_mech_spectral_polarisation::grid_mech_spectral_polarisation_updatecoords

Age.

Definition at line 2157 of file grid_mech_spectral_polarisation.f90.

References da, solution_vec, 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

◆ c_minmaxavg

real(preal), dimension(3,3,3,3), private grid_mech_spectral_polarisation::c_minmaxavg = 0.0_pReal
private

◆ c_minmaxavglastinc

real(preal), dimension(3,3,3,3), private grid_mech_spectral_polarisation::c_minmaxavglastinc = 0.0_pReal
private

previous (min+max)/2 stiffness

Definition at line 1856 of file grid_mech_spectral_polarisation.f90.

Referenced by grid_mech_spectral_polarisation_forward().

◆ c_scale

real(preal), dimension(3,3,3,3), private grid_mech_spectral_polarisation::c_scale = 0.0_pReal
private

◆ c_volavg

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

◆ c_volavglastinc

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

◆ da

◆ err_bc

real(preal), private grid_mech_spectral_polarisation::err_bc
private

deviation from stress BC

Definition at line 1865 of file grid_mech_spectral_polarisation.f90.

Referenced by converged(), and formresidual().

◆ err_curl

real(preal), private grid_mech_spectral_polarisation::err_curl
private

RMS of curl of F.

Definition at line 1865 of file grid_mech_spectral_polarisation.f90.

Referenced by converged(), and formresidual().

◆ err_div

real(preal), private grid_mech_spectral_polarisation::err_div
private

RMS of div of P.

Definition at line 1865 of file grid_mech_spectral_polarisation.f90.

Referenced by converged(), and formresidual().

◆ f_aim

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

◆ f_aim_lastinc

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

◆ f_aimdot

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

◆ f_av

real(preal), dimension(3,3), private grid_mech_spectral_polarisation::f_av = 0.0_pReal
private

average incompatible def grad field

Definition at line 1848 of file grid_mech_spectral_polarisation.f90.

Referenced by formresidual().

◆ f_lastinc

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

◆ f_tau_lastinc

real(preal), dimension(:,:,:,:,:), allocatable, private grid_mech_spectral_polarisation::f_tau_lastinc
private

◆ f_taudot

real(preal), dimension(:,:,:,:,:), allocatable, private grid_mech_spectral_polarisation::f_taudot
private

field of assumed rate of incopatible deformation gradient

Definition at line 1840 of file grid_mech_spectral_polarisation.f90.

Referenced by grid_mech_spectral_polarisation_forward(), and grid_mech_spectral_polarisation_init().

◆ fdot

real(preal), dimension(:,:,:,:,:), allocatable, private grid_mech_spectral_polarisation::fdot
private

field of assumed rate of compatible deformation gradient

Definition at line 1840 of file grid_mech_spectral_polarisation.f90.

Referenced by grid_mech_spectral_polarisation_forward(), and grid_mech_spectral_polarisation_init().

◆ incinfo

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

time and increment information

Definition at line 1855 of file grid_mech_spectral_polarisation.f90.

Referenced by formresidual(), and grid_mech_spectral_polarisation_solution().

◆ num

◆ p_av

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

average 1st Piola–Kirchhoff stress

Definition at line 1848 of file grid_mech_spectral_polarisation.f90.

Referenced by converged(), and formresidual().

◆ params

type(tsolutionparams), private grid_mech_spectral_polarisation::params
private

◆ s

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

current compliance (filled up with zeros)

Definition at line 1856 of file grid_mech_spectral_polarisation.f90.

Referenced by formresidual(), and grid_mech_spectral_polarisation_solution().

◆ s_scale

real(preal), dimension(3,3,3,3), private grid_mech_spectral_polarisation::s_scale = 0.0_pReal
private

◆ snes

type(tsnes), private grid_mech_spectral_polarisation::snes
private

◆ solution_vec

◆ totaliter

integer, private grid_mech_spectral_polarisation::totaliter = 0
private

total iteration in current increment

Definition at line 1870 of file grid_mech_spectral_polarisation.f90.

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