Simple RVE-type simulation#

Note

Read first: Simple simulation.

The polycrystal, material and loading of Simple simulation are used. As the domain is a cubic “(representative) volume element”, and the aim is to apply a uniform loading, it is natural to give the loading by a strain rate, a target strain and strain increments instead of velocities, target times and time increments, and to take the boundary conditions from a preset instead of writing them node set by node set (see Boundary Conditions and Deformation History (Steps)).

Strain rate, target strain and the uniaxial_minimal preset#

The conditions of Simple simulation are the uniaxial_minimal preset: face z0 fixed along \(z\), corner x0y0z0 along \(x\) and \(y\), corner x1y0z0 along \(y\), and the loading face z1 moved along \(z\). The simulation is loaded at the strain rate 0.001 /s to the strain 0.01, in increments of 0.001, in one step:

## FEPX tutorial "Simple RVE-type simulation": the simple simulation loaded by a strain rate to
## a strain target with strain increments, the uniaxial_minimal preset.

## 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 1
strain_rate   33 0.001
target_strain 33 0.01
dstrain          0.001

## Output
print coo
print ori
print stress
print strain
print forces

The run (mpirun -np 4 fepx) writes:

========================    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, 1 step
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   :   - Options other than the defaults: (none)
Info   :   - Output: coo ori 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.626 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.782 s)
  [...]
Info   : Final step terminated. Simulation completed successfully.
Info   :   [o] Wrote results to `simulation.sim'.
Info   :   - Increments: 10
Info   :   - Global iterations: 47 (22 NR)
Info   :   - CG iterations: 32537
Info   :   - Warnings issued: 0
Info   :   - Wall time per phase:
Info   :     > Input and setup:                      0.052 s
Info   :     > Initialization:                       0.631 s
Info   :     > Increments:                          20.708 s
Info   :       . Element and material work:         13.298 s
Info   :       . CG:                                 7.332 s
Info   :       . Other:                              0.078 s
Info   :     > Output:                               0.244 s
Info   : Elapsed time:                              21.634 s
========================================================================

and the simulation directory:

simulation.sim
|-- inputs
|   |-- simulation.cfg
|   `-- simulation.msh
`-- results
    |-- elts
    |   |-- ori
    |   |   |-- ori.step0
    |   |   `-- ori.step1
    |   |-- strain
    |   |   |-- strain.step0
    |   |   `-- strain.step1
    |   `-- stress
    |       |-- stress.step0
    |       `-- stress.step1
    |-- forces
    |   |-- x0
    |   |-- x1
    |   |-- y0
    |   |-- y1
    |   |-- z0
    |   `-- z1
    |-- mesh
    |   |-- strain
    |   |   |-- strain.step0
    |   |   `-- strain.step1
    |   `-- stress
    |       |-- stress.step0
    |       `-- stress.step1
    `-- nodes
        `-- coo
            |-- coo.step0
            `-- coo.step1

The results are those of Simple simulation (whose fields are shown there) at 1 % strain:

../../_images/curves8.png

Fig. 8 (left) Volume-averaged stress against strain at the ends of the steps, and (right) stress of face z1 at every increment, of the simple simulation (two steps of 5 increments), of this input (one step of 10 increments), and of the grip variant below.#

Grip conditions (uniaxial_grip)#

The uniaxial_grip preset also fixes faces z0 and z1 along \(x\) and \(y\), as grips would: the loading faces cannot contract, which gives different strain and stress fields, especially near them, and a stiffer response (above). Only the preset changes:

## FEPX tutorial "Simple RVE-type simulation", grip variant: faces z0 and z1 also fixed along
## x and y (the uniaxial_grip preset).

## 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_grip
number_of_steps 1
strain_rate   33 0.001
target_strain 33 0.01
dstrain          0.001

## Output
print coo
print ori
print stress
print strain
print forces
../../_images/strain33.png

Fig. 9 Strain field \(\epsilon_{33}\) at 1 % strain, grip conditions (displacements magnified 10 times; the color scale of Simple simulation).#

../../_images/stress33.png

Fig. 10 Stress field \(\sigma_{33}\) at 1 % strain, grip conditions (displacements magnified 10 times; the color scale of Simple simulation).#

The commands, in the grip simulation’s directory:

$ neper -S simulation.sim -resmesh stress,strain
$ neper -V simulation.sim -step 1 -datanodecoo coo -datanodecoofact 10 -showelt1d all \
    -dataelt1drad 0.004 -dataelt3dedgerad 0.0015 -dataelt3dedgecol 32:32:32 -cameraangle \
    13.5 -imagesize 800:800 -dataeltcol strain33 -dataeltscale \
    0.002:0.004:0.006:0.008:0.010:0.012:0.014:0.016:0.018 -print img_strain33
$ convert "(" img_strain33.png -trim ")" "(" -size 40x1 xc:white ")" "(" -size 240x \
    -background white -font DejaVu-Serif -pointsize 30 "caption:Strain 33" -bordercolor \
    white -border 0x12 "(" img_strain33-scale3d.png -trim ")" -gravity west -append ")" \
    -background white -gravity center +append -bordercolor white -border 20 -resize \
    600x600 -strip PNG8:strain33.png
$ neper -V simulation.sim -step 1 -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:250:300:350:400:450:500:550 -print img_stress33
$ convert "(" img_stress33.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-scale3d.png -trim ")" -gravity west \
    -append ")" -background white -gravity center +append -bordercolor white -border 20 \
    -resize 600x600 -strip PNG8:stress33.png

and for the curves (in this tutorial’s directory, beside the other two):

$ neper -S simulation.sim -resmesh stress,strain
$ python3 tutorial_pages.py plot simple_rve . ../simple_simulation/simulation.sim \
    simulation.sim ../simple_rve_grip/simulation.sim