Loading, unloading and reloading: mixed targets#
Note
Read first: Simple RVE-type simulation.
The polycrystal and material of Simple simulation are loaded along \(z\), with the
uniaxial_minimal conditions, in three steps that end at targets of different kinds (see
Deformation History (Steps)):
loading at the strain rate 0.001 /s to the strain 0.01 (
target_strain), in 10 equal increments;unloading at the strain rate -0.001 /s to zero stress (
target_stress 33 0.0), with increments of 0.5 s, shortened down to 0.01 s near the target: as the strain at which the stress vanishes is not known in advance, the step ends at the increment that reaches the stress target within its tolerance;reloading at 0.001 /s to the strain 0.015, in 8 equal increments (
number_of_incrs): its duration is known only when it starts, from the strain step 2 reached.
Each row gives one value per step, - where a keyword does not apply to that step.
Input files#
## FEPX tutorial "Mixed targets": the 20-grain fcc polycrystal of the simple simulation loaded
## along z to 1 % strain, unloaded to zero stress and reloaded to 1.5 % strain, each step ending
## at a target of another kind.
## Material
number_of_phases 1
phase 1
crystal_type FCC
model crystal_plasticity
c11 245.0e3
c12 155.0e3
c44 62.5e3
m 0.05
gammadot_0 1.0
tau_0 210.0
hardening saturation_isotropic
h_0 200.0
tau_s 330.0
n 1.0
## Loading
boundary_conditions uniaxial_minimal
number_of_steps 3
# comp step 1 step 2 step 3
strain_rate 33 1.0e-3 -1.0e-3 1.0e-3
target_strain 33 0.010 - 0.015
target_stress 33 - 0.0 -
number_of_incrs 10 - 8
dtime - 0.5 -
dtime_min - 0.01 -
## Output
print coo
print stress
print strain
print forces
Execution#
$ mpirun -np 4 fepx
======================== F E P X ===========================
Info : A finite element software package for polycrystal plasticity.
Info : Version 3.0.0-dev (git 755da754, 11-06-2026)
Info : Built with: GCC 15.2.0|Open MPI 5.0.10|HDF5 1.14.6
Info : Running on 4 ranks.
Info : <https://fepx.info>
Info : Copyright (C) 1996-2026, and MIT licensed, by the FEPX authors.
Info : ---------------------------------------------------------------
Info : Loading simulation...
Info : [i] Parsing file `simulation.cfg'...
Info : [i] Parsed file `simulation.cfg'.
Info : [i] Parsing file `simulation.msh'...
Info : [i] Parsed file `simulation.msh'.
Info : - Material parameters:
Info : > Number of phases: 1
Info : > Phase 1: fcc, crystal_plasticity
Info : . c11: 2.4500E+05 MPa
Info : . c12: 1.5500E+05 MPa
Info : . c44: 6.2500E+04 MPa
Info : . m: 5.0000E-02
Info : . gammadot_0: 1.0000E+00 1/s
Info : . hardening: saturation_isotropic
Info : . tau_0: 2.1000E+02 MPa
Info : . h_0: 2.0000E+02 MPa
Info : . tau_s: 3.3000E+02 MPa
Info : . n: 1.0000E+00
Info : . saturation_evolution: off (def.)
Info : . cyclic_hardening: off (def.)
Info : . precipitate_strengthening: off (def.)
Info : - Loading: boundary_conditions uniaxial_minimal, 3 steps
Info : > Step 1: t = 0.0000E+00 -> 1.0000E+01 s, 10 increments,
Info : strain 33: 0.0000E+00 -> 1.0000E-02 (rate 1.0000E-03 1/s)
Info : > Step 2: target_stress 33 0.0000E+00 MPa from t =
Info : 1.0000E+01 s, increments 1.0000E-02 to 5.0000E-01 s
Info : - Options other than the defaults: (none)
Info : - Output: coo stress strain forces (format ascii)
Info : - Mesh parameters:
Info : > Node number: 4008
Info : > Elt number: 2453 (10-node tetrahedra)
Info : > Elsets: 20; partitions: 4
Info : - Partitioning: 4 ranks
Info : > Elements per rank: 613 to 614
Info : > Ghost nodes per rank: 146 to 167 (626 in total)
Info : > Neighbors per rank: 3 to 3
Info : [o] Writing results to `simulation.sim'...
Info : Initializing simulation...
Info : - Elastic step of 1.1351E-02 s (step 1)
Info : > Iteration 1 (SA): R = 2.5329E+00 (543 CG iterations)
Info : > Iteration 2 (SA): R = 1.5030E-05 (539 CG iterations)
Info : > Converged in 2 iterations (0.620 s)
Info : Running step 1...
Info : - Increment 1: t = 1.0000E+00 s, dt = 9.8865E-01 s
Info : > Iteration 1 (SA): R = 7.1922E-04 (552 CG iterations)
Info : > Iteration 2 (NR): R = 6.3443E-07 (562 CG iterations)
Info : > Converged in 2 iterations (0.766 s)
[...]
Info : Final step terminated. Simulation completed successfully.
Info : [o] Wrote results to `simulation.sim'.
Info : - Increments: 23
Info : - Global iterations: 93 (43 NR)
Info : - CG iterations: 62590
Info : - Warnings issued: 0
Info : - Wall time per phase:
Info : > Input and setup: 0.050 s
Info : > Initialization: 0.627 s
Info : > Increments: 37.990 s
Info : . Element and material work: 24.404 s
Info : . CG: 13.403 s
Info : . Other: 0.183 s
Info : > Output: 0.270 s
Info : Elapsed time: 38.937 s
========================================================================
simulation.sim
|-- inputs
| |-- simulation.cfg
| `-- simulation.msh
`-- results
|-- elts
| |-- strain
| | |-- strain.step0
| | |-- strain.step1
| | |-- strain.step2
| | `-- strain.step3
| `-- stress
| |-- stress.step0
| |-- stress.step1
| |-- stress.step2
| `-- stress.step3
|-- forces
| |-- x0
| |-- x1
| |-- y0
| |-- y1
| |-- z0
| `-- z1
|-- mesh
| |-- strain
| | |-- strain.step0
| | |-- strain.step1
| | |-- strain.step2
| | `-- strain.step3
| `-- stress
| |-- stress.step0
| |-- stress.step1
| |-- stress.step2
| `-- stress.step3
`-- nodes
`-- coo
|-- coo.step0
|-- coo.step1
|-- coo.step2
`-- coo.step3
Simulation results#
Fig. 34 (left) Volume-averaged stress 33 against strain 33 at the ends of the steps: loaded, unloaded
(a residual strain remains) and reloaded; (right) stress of face z1 (force over
current area) at every increment: the increments shorten as the unloading approaches zero
stress.#
Fig. 35 Stress field \(\sigma_{33}\) after unloading to zero stress (end of step 2; displacements magnified 10 times): the macroscopic stress is zero, but the grains keep residual stresses of both signs.#
The commands:
$ neper -S simulation.sim -resmesh stress,strain
$ neper -V simulation.sim -step 2 -datanodecoo coo -datanodecoofact 10 -showelt1d all \
-dataelt1drad 0.004 -dataelt3dedgerad 0.0015 -dataelt3dedgecol 32:32:32 -cameraangle \
13.5 -imagesize 800:800 -dataeltcol stress33 -dataeltscale \
-200:-150:-100:-50:0:50:100:150:200 -print img_stress33_step2
$ convert "(" img_stress33_step2.png -trim ")" "(" -size 40x1 xc:white ")" "(" -size \
240x -background white -font DejaVu-Serif -pointsize 30 "caption:Stress 33 [MPa]" \
-bordercolor white -border 0x12 "(" img_stress33_step2-scale3d.png -trim ")" \
-gravity west -append ")" -background white -gravity center +append -bordercolor \
white -border 20 -resize 600x600 -strip PNG8:stress33_step2.png
$ python3 tutorial_pages.py plot mixed_targets . simulation.sim