added phi_min back to example; more consistency in code syntax
This commit is contained in:
parent
925da8aad4
commit
af955df891
|
@ -10,6 +10,7 @@ solver:
|
|||
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 # residual integrity
|
||||
|
||||
thermal:
|
||||
N_iter_max: 100 # maximum iteration number
|
||||
|
@ -42,7 +43,7 @@ solver:
|
|||
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
|
||||
bbarstabilization: false
|
||||
|
||||
mechanical:
|
||||
N_iter_max: 250 # Maximum iteration number
|
||||
|
|
|
@ -78,7 +78,7 @@ subroutine discretization_Marc_init
|
|||
num_solver => config_numerics%get_dict('solver',defaultVal=emptyDict)
|
||||
num_commercialFEM => num_solver%get_dict('Marc',defaultVal=emptyDict)
|
||||
mesh_unitlength = num_commercialFEM%get_asReal('unit_length',defaultVal=1.0_pREAL) ! set physical extent of a length unit in mesh
|
||||
if (mesh_unitlength <= 0.0_pREAL) call IO_error(301,'unitlength')
|
||||
if (mesh_unitlength <= 0.0_pREAL) call IO_error(301,'unit_length')
|
||||
|
||||
call inputRead(elem,node0_elem,connectivity_elem,materialAt)
|
||||
nElems = size(connectivity_elem,2)
|
||||
|
|
|
@ -47,7 +47,7 @@ module mesh_mechanical_FEM
|
|||
p_i, & !< integration order (quadrature rule)
|
||||
itmax
|
||||
logical :: &
|
||||
BBarStabilisation
|
||||
BBarStabilization
|
||||
real(pREAL) :: &
|
||||
eps_struct_atol, & !< absolute tolerance for mechanical equilibrium
|
||||
eps_struct_rtol !< relative tolerance for mechanical equilibrium
|
||||
|
@ -136,7 +136,7 @@ subroutine FEM_mechanical_init(fieldBC,num_mesh)
|
|||
num_mech => num_mesh%get_dict('mechanical', defaultVal=emptyDict)
|
||||
|
||||
num%p_i = int(num_mesh%get_asInt('p_i',defaultVal=2),pPETSCINT)
|
||||
num%BBarStabilisation = num_mesh%get_asBool('bbarstabilisation',defaultVal = .false.)
|
||||
num%BBarStabilization = num_mesh%get_asBool('bbarstabilization',defaultVal=.false.)
|
||||
|
||||
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)
|
||||
|
@ -439,7 +439,7 @@ subroutine FEM_mechanical_formResidual(dm_local,xx_local,f_local,dummy,err_PETSc
|
|||
end do
|
||||
homogenization_F(1:dimPlex,1:dimPlex,m) = reshape(matmul(BMat,x_scal),shape=[dimPlex,dimPlex], order=[2,1])
|
||||
end do
|
||||
if (num%BBarStabilisation) then
|
||||
if (num%BBarStabilization) then
|
||||
detFAvg = math_det33(sum(homogenization_F(1:3,1:3,cell*nQuadrature+1:(cell+1)*nQuadrature),dim=3)/real(nQuadrature,pREAL))
|
||||
do qPt = 0, nQuadrature-1
|
||||
m = cell*nQuadrature + qPt+1
|
||||
|
@ -590,7 +590,7 @@ subroutine FEM_mechanical_formJacobian(dm_local,xx_local,Jac_pre,Jac,dummy,err_P
|
|||
MatA = matmul(reshape(reshape(homogenization_dPdF(1:dimPlex,1:dimPlex,1:dimPlex,1:dimPlex,m), &
|
||||
shape=[dimPlex,dimPlex,dimPlex,dimPlex], order=[2,1,4,3]), &
|
||||
shape=[dimPlex*dimPlex,dimPlex*dimPlex]),BMat)*qWeights(qPt+1_pPETSCINT)
|
||||
if (num%BBarStabilisation) then
|
||||
if (num%BBarStabilization) then
|
||||
F(1:dimPlex,1:dimPlex) = reshape(matmul(BMat,x_scal),shape=[dimPlex,dimPlex])
|
||||
FInv = math_inv33(F)
|
||||
K_eA = K_eA + matmul(transpose(BMat),MatA)*math_det33(FInv)**(1.0_pREAL/real(dimPlex,pREAL))
|
||||
|
@ -606,7 +606,7 @@ subroutine FEM_mechanical_formJacobian(dm_local,xx_local,Jac_pre,Jac,dummy,err_P
|
|||
K_eA = K_eA + matmul(transpose(BMat),MatA)
|
||||
end if
|
||||
end do
|
||||
if (num%BBarStabilisation) then
|
||||
if (num%BBarStabilization) then
|
||||
FInv = math_inv33(FAvg)
|
||||
K_e = K_eA*math_det33(FAvg/real(nQuadrature,pREAL))**(1.0_pREAL/real(dimPlex,pREAL)) + &
|
||||
(matmul(matmul(transpose(BMatAvg), &
|
||||
|
|
Loading…
Reference in New Issue