Skip to content

Commit

Permalink
#123 using sqrt(potential) as overstress
Browse files Browse the repository at this point in the history
  • Loading branch information
pou036 committed Jun 20, 2018
1 parent 73423ed commit 9cac796
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 43 deletions.
1 change: 0 additions & 1 deletion include/materials/RedbackMechMaterialLne.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class RedbackMechMaterialLne : public RedbackMechMaterial
virtual Real getFlowIncrement(Real, Real, Real, Real, Real, Real) override;
virtual void get_py_qy(Real, Real, Real &, Real &, Real, bool &, Real &) override;
virtual void form_damage_kernels(Real) override;
void getDerivativeFlowIncrement(Real &, Real &, const RankTwoTensor &, Real, Real, Real, Real, Real, Real);
};

#endif // REDBACKMECHMATERIALLNE_H
33 changes: 3 additions & 30 deletions src/materials/RedbackMechMaterialLne.C
Original file line number Diff line number Diff line change
Expand Up @@ -87,33 +87,6 @@ RedbackMechMaterialLne::getFlowIncrement(
return _ref_pe_rate * _dt * std::pow(s / sigma_0, _exponent) * _exponential;
}

void
RedbackMechMaterialLne::getDerivativeFlowIncrement(Real & dfi_dp,
Real & dfi_dq,
const RankTwoTensor & /*sig*/,
Real p,
Real q,
Real pc,
Real /*q_yield_stress*/,
Real /*p_yield_stress*/,
Real s)
{
Real sigma_0 = std::fabs(pc - _p_t);

// Compute numerically derivatives of s with respect to p and q
Real p_y2, q_y2, s2, ds_dp, ds_dq;
bool is_plastic;
Real delta_p = sigma_0 / 1000.; // TODO: this value influences the convergence and should be dynamic!
Real delta_q = _M * delta_p;
get_py_qy(p + delta_p, q, p_y2, q_y2, -pc, is_plastic, s2);
ds_dp = (s2 - s) / delta_p;
get_py_qy(p, q + delta_q, p_y2, q_y2, -pc, is_plastic, s2);
ds_dq = (s2 - s) / delta_q;
Real tmp = _ref_pe_rate * _dt * _exponent * _exponential * std::pow(s / sigma_0, _exponent - 1) / sigma_0;
dfi_dp = tmp * ds_dp;
dfi_dq = tmp * ds_dq;
}

void
RedbackMechMaterialLne::getJac(const RankTwoTensor & sig,
const RankFourTensor & E_ijkl,
Expand Down Expand Up @@ -170,8 +143,8 @@ RedbackMechMaterialLne::getJac(const RankTwoTensor & sig,
dfi_ds = _exponent * _ref_pe_rate * _dt * std::pow(s / sigma_0, _exponent-1) * _exponential / sigma_0;

// derivatives of flow increment with respect to p and q
dfi_dp = dfi_ds * std::pow(_M_f, 2) * h * X;
dfi_dseqv = dfi_ds * 2 * sig_eqv;
dfi_dp = dfi_ds * std::pow(_M_f, 2) * h * X / (2 * s);
dfi_dseqv = dfi_ds * sig_eqv / s;

f1 = (Y - 1.0) / norm;
f2 = 3.0 / norm;
Expand Down Expand Up @@ -210,7 +183,7 @@ RedbackMechMaterialLne::get_py_qy(
is_plastic = (potential > 0);

// use potential for overstress
s = potential;
s = std::sqrt(potential);
// yield point actually irrelevant!
p_y = 1e99;
q_y = 1e99;
Expand Down
8 changes: 2 additions & 6 deletions tests/benchmark_3_M/bench_Lne.i
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,10 @@
[eqv_plastic_strain_rate]
order = CONSTANT
family = MONOMIAL
block = '0'
[]
[Mod_Gruntfest_number]
order = CONSTANT
family = MONOMIAL
block = '0 1'
[]
[plastic_volumetric_strain]
order = CONSTANT
Expand All @@ -186,12 +184,10 @@
[mean_stress]
order = CONSTANT
family = MONOMIAL
block = '0'
[]
[returnmap_iter]
order = CONSTANT
family = MONOMIAL
block = '0'
[]
[total_porosity]
order = FIRST
Expand Down Expand Up @@ -347,6 +343,8 @@

[Executioner]
# Preconditioned JFNK (default)
# petsc_options_iname = '-pc_type -pc_hypre_type -snes_linesearch_type -ksp_gmres_restart'
# petsc_options_value = 'hypre boomeramg cp 201'
type = Transient
start_time = 0.0
end_time = 0.006
Expand All @@ -355,8 +353,6 @@
l_max_its = 200
nl_max_its = 10
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -snes_linesearch_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg cp 201'
nl_abs_tol = 1e-10 # 1e-10 to begin with
reset_dt = true
line_search = basic
Expand Down
12 changes: 6 additions & 6 deletions tests/benchmark_3_M/gold/bench_Lne_out.csv
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
time,eqv_plastic_strain_rate,max_returnmap_iter,mean_stress,mises_strain,mises_stress,plastic_volumetric_strain
0,0,0,0,0,0,0
0.001,0.028629157619691,2.5,-0.17859948910417,0.00036787944117144,0.29523979785722,1.066672981115e-05
0.002,0.14098963167227,3,-0.3177205300469,0.00036787944117144,0.49861752840918,2.880731325028e-05
0.003,0.24400603493792,3.5,-0.41195422416808,0.00036787944117144,0.61857382307785,4.1005067198006e-05
0.004,0.31331794045741,3.75,-0.47193413993035,0.00036787944117144,0.68483781911848,4.5426973735366e-05
0.005,0.35477076606155,4,-0.50927459792852,0.00036787944117144,0.7206264329876,4.3683013138673e-05
0.006,0.37845375746288,4,-0.53249926173661,0.00036787944117144,0.73991765623407,3.7688623828489e-05
0.001,0.1060669294748,2.5,-0.16636574288352,0.00036787944117144,0.24834042897467,5.2047918852415e-05
0.002,0.23342559641361,3.5,-0.27597618620864,0.00036787944117144,0.3947073074006,9.8638195525807e-05
0.003,0.31112780429574,3,-0.34664254198654,0.00036787944117144,0.47897361151358,0.00013383323291223
0.004,0.35617031097491,3,-0.39179972075719,0.00036787944117144,0.52848398798822,0.00015959310420521
0.005,0.38295074230399,3,-0.420618561244,0.00036787944117144,0.55799406288187,0.00017881427145916
0.006,0.39909656653373,3,-0.43904406162704,0.00036787944117144,0.57579312558425,0.00019369939288095

0 comments on commit 9cac796

Please sign in to comment.