Merge remote-tracking branch 'origin/numerics-comment-format' into restructure-numerics

This commit is contained in:
Sharan 2023-09-06 20:09:35 +02:00
commit 925da8aad4
2 changed files with 67 additions and 59 deletions

View File

@ -1,6 +1,57 @@
# Available numerical parameters
# Case sensitive keys
---
# Default values of all available numerical parameters
# Please note that keys are case sensitive
solver:
grid:
N_staggered_iter_max: 10 # max number of field-level staggered iterations
N_cutback_max: 3 # maximum cutback level (0: 1, 1: 0.5, 2: 0.25, etc)
damage:
N_iter_max: 100 # maximum iteration number
eps_abs_phi: 1.0e-2 # absolute tolerance for damage evolution
eps_rel_phi: 1.0e-6 # relative tolerance for damage evolution
thermal:
N_iter_max: 100 # maximum iteration number
eps_abs_T: 1.0e-2 # absolute tolerance for thermal equilibrium
eps_rel_T: 1.0e-6 # relative tolerance for thermal equilibrium
mechanical:
N_iter_min: 1 # minimum iteration number
N_iter_max: 100 # maximum iteration number
eps_abs_div(P): 1.0e-4 # absolute tolerance for fulfillment of stress equilibrium
eps_rel_div(P): 5.0e-4 # relative tolerance for fulfillment of stress equilibrium
eps_abs_P: 1.0e3 # absolute tolerance for fulfillment of stress BC
eps_rel_P: 1.0e-3 # relative tolerance for fulfillment of stress BC
update_gamma: false # update Gamma-operator with current dPdF (not possible if FFT: memory_efficient == true)
FFT:
memory_efficient: true # precalculate Gamma-operator (81 doubles per point)
divergence_correction: size+grid # use size-independent divergence criterion {none, size, size+grid}
derivative: continuous # approximation used for derivatives in Fourier space {continuous, central_difference, FWBW_difference}
FFTW_plan_mode: FFTW_MEASURE # planning-rigor flags, see manual at https://www.fftw.org/fftw3_doc/Planner-Flags.html
FFTW_timelimit: -1.0 # time limit of plan creation for FFTW, see manual on www.fftw.org. (-1.0: disable time limit)
PETSc_options: -snes_type ngmres -snes_ngmres_anderson # PETSc solver options
alpha: 1.0 # polarization scheme parameter 0.0 < alpha < 2.0 (1.0: AL scheme, 2.0: accelerated scheme)
beta: 1.0 # polarization scheme parameter 0.0 < beta < 2.0 (1.0: AL scheme, 2.0: accelerated scheme)
eps_abs_curl(F): 1.0e-10 # absolute tolerance for fulfillment of strain compatibility
eps_rel_curl(F): 5.0e-4 # relative tolerance for fulfillment of strain compatibility
mesh:
N_cutback_max: 3 # maximum cut back level (0: 1, 1: 0.5, 2: 0.25, etc)
N_staggered_iter_max: 10 # max number of field level staggered iterations
p_s: 2 # order of displacement shape functions
p_i: 2 # order of quadrature rule required
bbarstabilisation: false
mechanical:
N_iter_max: 250 # Maximum iteration number
eps_abs_div(P): 1.0e-10 # absolute tolerance for mechanical equilibrium
eps_rel_div(P): 1.0e-4 # relative tolerance for mechanical equilibrium
Marc:
unit_length: 1.0 # physical length of one computational length unit
homogenization:
mechanical:
@ -12,7 +63,7 @@ homogenization:
Delta_a: 1.0e-7 # perturbation for computing penalty tangent
relevant_mismatch: 1.0e-5 # minimum threshold of mismatch
viscosity_exponent: 1.0e+0 # power (sensitivity rate) of numerical viscosity in RGC scheme
viscosity_modulus: 0.0e+0 # stress modulus of RGC numerical viscosity (zero = without numerical viscosity)
viscosity_modulus: 0.0e+0 # stress modulus of RGC numerical viscosity (0: without numerical viscosity)
# suggestion: larger than the aTol_RGC but still far below the expected flow stress of material
dot_a_ref: 1.0e-3 # reference rate of relaxation (about the same magnitude as straining rate, possibly a bit higher)
dot_a_max: 1.0e+0 # threshold of maximum relaxation vector increment (if exceed this then cutback)
@ -20,54 +71,6 @@ homogenization:
Delta_V_modulus: 1.0e+12
Delta_V_exponent: 5.0
solver:
grid:
N_staggered_iter_max: 10 # max number of field level staggered iterations
N_cutback_max: 3 # maximum cut back level (0: 1, 1: 0.5, 2: 0.25, etc)
damage:
N_iter_max: 100 # maximum iteration number
eps_abs_phi: 1.0e-2 # absolute tolerance for damage evolution
eps_rel_phi: 1.0e-6 # relative tolerance for damage evolution
phi_min: 1.0e-6 # non-zero residual damage
thermal:
N_iter_max: 100 # maximum iteration number
eps_abs_T: 1.0e-2 # absolute tolerance for thermal equilibrium
eps_rel_T: 1.0e-6 # relative tolerance for thermal equilibrium
mechanical:
eps_abs_div(P): 1.0e-4 # absolute tolerance for fulfillment of stress equilibrium
eps_rel_div(P): 5.0e-4 # relative tolerance for fulfillment of stress equilibrium
eps_abs_P: 1.0e3 # absolute tolerance for fulfillment of stress BC
eps_rel_P: 1.0e-3 # relative tolerance for fulfillment of stress BC
N_iter_min: 1 # minimum iteration number
N_iter_max: 100 # maximum iteration number
update_gamma: false # Update Gamma-operator with current dPdF (not possible if memory_efficient=1)
FFT:
memory_efficient: True # Precalculate Gamma-operator (81 double per point)
divergence_correction: size+grid # Use size-independent divergence criterion
derivative: continuous # Approximation used for derivatives in Fourier space
FFTW_plan_mode: FFTW_MEASURE # planing-rigor flag, see manual on www.fftw.org
FFTW_timelimit: -1.0 # timelimit of plan creation for FFTW, see manual on www.fftw.org. -1.0: disable timelimit
alpha: 1.0 # polarization scheme parameter 0.0 < alpha < 2.0. alpha = 1.0 ==> AL scheme, alpha = 2.0 ==> accelerated scheme
beta: 1.0 # polarization scheme parameter 0.0 < beta < 2.0. beta = 1.0 ==> AL scheme, beta = 2.0 ==> accelerated scheme
eps_abs_curl(F): 1.0e-10 # absolute tolerance for fulfillment of strain compatibility
eps_rel_curl(F): 5.0e-4 # relative tolerance for fulfillment of strain compatibility
PETSc_options: -snes_type ngmres -snes_ngmres_anderson # PETSc solver options
mesh:
N_cutback_max: 3 # maximum cut back level (0: 1, 1: 0.5, 2: 0.25, etc)
N_staggered_iter_max: 10 # max number of field level staggered iterations
p_s: 2 # order of displacement shape functions (when mesh is defined)
bbarstabilisation: false
p_i: 2 # order of quadrature rule required (when mesh is defined)
N_iter_max: 250 # Maximum iteration number
eps_abs_div(P): 1.0e-10 # absolute tolerance for mechanical equilibrium
eps_rel_div(P): 1.0e-4 # relative tolerance for mechanical equilibrium
Marc:
unit_length: 1.0 # physical length of one computational length unit
phase:
mechanical:
@ -78,18 +81,19 @@ phase:
N_iter_state_max: 10 # state loop limit
plastic:
r_linesearch_Lp: 0.5 # factor to decrease the step due to non-convergence in Lp calculation
r_linesearch_Lp: 0.5 # factor to decrease the step if Lp calculation fails to converge
eps_rel_Lp: 1.0e-6 # relative tolerance in Lp residuum
eps_abs_Lp: 1.0e-8 # absolute tolerance in Lp residuum
N_iter_Lp_max: 40 # stress loop limit for Lp
f_update_jacobi_Lp: 1 # frequency of Jacobian update of residuum in Lp
integrator_state: FPI # integration method (FPI = Fixed Point Iteration, Euler = Euler, AdaptiveEuler = Adaptive Euler, RK4 = classical 4th order Runge-Kutta, RKCK45 = 5th order Runge-Kutta Cash-Karp)
eigen:
r_linesearch_Li: 0.5 # factor to decrease the step due to non-convergence in Li calculation
r_linesearch_Li: 0.5 # factor to decrease the step if Li calculation fails to converge
eps_rel_Li: 1.0e-6 # relative tolerance in Li residuum
eps_abs_Li: 1.0e-8 # absolute tolerance in Li residuum
N_iter_Li_max: 40 # stress loop limit for Li
f_update_jacobi_Li: 1 # frequency of Jacobian update of residuum in Li
f_update_jacobi_Li: 1 # frequency of updating the Jacobian of residuum in Li
generic:
random_seed: 0 # fixed seeding for pseudo-random number generator, Default 0: use random seed.
random_seed: 0 # fixed seeding for pseudo-random number generator (0: use random seed)

View File

@ -127,16 +127,20 @@ subroutine FEM_mechanical_init(fieldBC,num_mesh)
character(len=*), parameter :: prefix = 'mechFE_'
PetscErrorCode :: err_PETSc
real(pREAL), dimension(3,3) :: devNull
type(tDict), pointer :: num_mech
print'(/,1x,a)', '<<<+- FEM_mech init -+>>>'; flush(IO_STDOUT)
!-----------------------------------------------------------------------------
! read numerical parametes and do sanity checks
num_mech => num_mesh%get_dict('mechanical', defaultVal=emptyDict)
num%p_i = int(num_mesh%get_asInt('p_i',defaultVal = 2),pPETSCINT)
num%itmax = int(num_mesh%get_asInt('N_iter_max',defaultVal=250),pPETSCINT)
num%BBarStabilisation = num_mesh%get_asBool('bbarstabilisation',defaultVal = .false.)
num%eps_struct_atol = num_mesh%get_asReal('eps_abs_div(P)', defaultVal = 1.0e-10_pREAL)
num%eps_struct_rtol = num_mesh%get_asReal('eps_rel_div(P)', defaultVal = 1.0e-4_pREAL)
num%itmax = int(num_mech%get_asInt('N_iter_max',defaultVal=250),pPETSCINT)
num%eps_struct_atol = num_mech%get_asReal('eps_abs_div(P)', defaultVal = 1.0e-10_pREAL)
num%eps_struct_rtol = num_mech%get_asReal('eps_rel_div(P)', defaultVal = 1.0e-4_pREAL)
if (num%itmax <= 1) call IO_error(301,ext_msg='N_iter_max')
if (num%eps_struct_rtol <= 0.0_pREAL) call IO_error(301,ext_msg='eps_rel_div(P)')