In [1]:
using ConstLab
using Plots
using Voigt
plotly();

In [2]:
include("mises_viscoplast.jl");

Parameters


In [3]:
E = 200.0 * 10^9
mp = ViscoPlastMP(
    E = E,
    ν =  0.3,
    σy = E / 1e3,
    H = 0.1 * E,
    n = 1.5,
    σc =  0.1 * 200*10^9,
    t★ = 1.0
);

Material Status


In [4]:
ms = ViscoPlastMS()


Out[4]:
ViscoPlastMS
  ₙεₚ: [0.0,0.0,0.0,0.0,0.0,0.0]
  ₙσ: [0.0,0.0,0.0,0.0,0.0,0.0]
  ₙκ: 0.0
  ₙμ: 0.0
  loading: false

Loadcase: Uniaxial Strain


In [5]:
α = 25.0
tend = α * mp.t★
nts = 100
ts = collect(linspace(0, tend, nts))
ε_max = 0.005
εs_pstrain, σs_pstrain, ε_control_pstrain = loadcase(:uniaxial_strain, ε_max, ts);

Driver


In [8]:
@time εs_res_pstrain, σs_res_pstrain, matstats = driver(stress, ATS, ms, mp, ts, εs_pstrain, 
σs_pstrain, ε_control_pstrain);


  0.005820 seconds (52.80 k allocations: 1.850 MB)

Loadcase: Uniaxial Stress


In [13]:
εs_pstress, σs_pstress, ε_control_pstress = loadcase(:uniaxial_stress, ε_max, ts);
@time εs_res_pstress, σs_res_pstress, matstats = driver(stress, ATS, ms, mp, ts, εs_pstress, 
                                                  σs_pstress, ε_control_pstress, ftol = 1e-5);


  0.063812 seconds (285.12 k allocations: 10.589 MB, 11.89% gc time)

Plotting


In [14]:
vm(x) = vnorm(dev(x))


Out[14]:
vm (generic function with 1 method)

In [15]:
p = plot(vec(εs_res_pstrain[1,:]), 
Float64[vm(σs_res_pstrain[:,i]) for i = 1:nts],
label="Plane strain");
plot!(p, vec(εs_res_pstress[1,:]), 
         Float64[vm(σs_res_pstress[:,i]) for i = 1:nts],
label="Plane stress");


[Plots.jl] Initializing backend: plotly