Example Simulations

Several example simulations come pre-packaged to get you started with running simulations. These examples are reference cases to show how a simulation should be built and how FEPX can interface with Neper in order to prepare mesh files as well as post-process a simulation directory. All examples contain the necessary configuration (simulation.config) and mesh (simulation.msh) files, along with a shell script to generate the mesh file directly from Neper. In order to run the provided shell scripts, you must have a configured installation of Neper present on your system. In the following, visualizations of the undeformed and deformed mesh are generated with Neper while graphs are generated with Gnuplot.

All examples can be run either in serial or parallel (Running a Simulation), but the included scripts are pre-set to run in parallel on 4 cores, and parallel execution with OpenMPI via mpirun is assumed.

A polycrystal containing 50 grains is generated via Voronoi tessellation for all examples. Each cell in the tessellation represents a discrete grain in the domain and all grains are volumetrically discretized into finite elements. Visualizations of the tessellated domain (morphology) and the associated finite element mesh are shown below. Length units are assumed to be [mm], thus, all pressure units assumed to be [MPa] for the simulation (including input parameters).

50 grain polycrystal used in all examples, colored by grain id, and (right) its finite element mesh.

Uniaxial Control (examples/1_uniaxial)

This example covers the uniaxial tensile deformation of an FCC polycrystal by strain targeting to 2% axial strain. Material parameters are of a generic a copper alloy, and are provided in the below tables. Two steps are defined with a variable number of increments for each step. Grip boundary conditions are applied to the sample with the primary loading face set as z1 loaded in the +z direction. Elemental stress and elastic strain tensors are output, along with the nodal coordinates and surface-integrated forces. Illustrations of the stress and elastic strain fields, as well as the macroscopic stress-strain curve are shown below.

Single crystal elastic constants.

Phase

Type

$$C_{11}$$ [MPa]

$$C_{12}$$ [MPa]

$$C_{44}$$ [MPa]

$$\alpha$$

FCC

$$245.0 \times 10^3$$

$$155.0 \times 10^3$$

$$62.5 \times 10^3$$

Initial slip system strenghts and other plasticity parameters.

Phase

$$m$$ [-]

$$\dot{\gamma_0}$$ [1/s]

$$h_0$$ [MPa]

$$g_0$$ [MPa]

$$g_{s0}$$ [MPa]

$$n$$ [-]

$$\alpha$$

0.05

1.0

200.0

210.0

330,0

1.0

Deformed sample at 2% axial strain (deformation field is exaggerated 10x for illustrative purposes), colored by (left) stress ($$\sigma_{33}$$), and (right) elastic strain ($$\epsilon_{33}$$).

Macroscopic stress-strain curve recovered from the surface-integrated forces in post.force.z1. Markers denote values output at each increment.

Multiaxial Control with Constant Strain Rate (examples/2_triaxCSR)

This example covers the biaxial deformation of an HCP polycrystal at a constant strain rate. Loads are applied normal to the surface, maintaining proportional macroscopic load ratios of $$-1$$:$$0$$:$$1$$ for the $$x$$:$$y$$:$$z$$ directions, respectively. Load tolerance options are prescribed and latent hardening is enabled, as well as saturation strength evolution. The primary loading direction is set to be in the $$x$$ direction, and the strain rate is doubled on the second step. Elemental values for the equivalent plastic strain and plastic work are output, along with the nodal coordinates and surface-integrated forces. Material parameters are those for the $$\alpha$$ phase of Ti-6Al-4V and are provided in the below tables. The latent parameters are input values to the hardening interaction matrix [CARSON17]. Illustrations of the results are provided in the below figures.

Single crystal elastic constants.

Phase

Type

$$C_{11}$$ [MPa]

$$C_{12}$$ [MPa]

$$C_{13}$$ [MPa]

$$C_{44}$$ [MPa]

$$\alpha$$

HCP

$$169.66 \times 10^3$$

$$88.66 \times 10^3$$

$$61.66 \times 10^3$$

$$42.50 \times 10^3$$

Plasticity parameters.

Phase

$$m$$ [-]

$$\dot{\gamma_{0}}$$ [1/s]

$$h_{0}$$ [MPa]

$$g_{s0}$$ [MPa]

$$m^\prime$$ [-]

$$\dot{\gamma_{s}}$$ [1/s]

$$n$$ [-]

$$c/a$$ [-]

$$\alpha$$

0.01

1.0

190.0

530.0

1.1

1.0

1.0

1.587

Initial slip system strengths and hardening parameters.

Phase

$$g_0$$ (basal) [MPa]

$$g_0$$ (prismatic) [MPa]

$$g_0$$ (pyramidal) [MPa]

$$h_{diag}$$ [-]

$$h_{1}-h_{7}$$ [-]

$$\alpha$$

390.0

468.0

663.0

1.0

1.4

Deformed sample at the end of the second load step (deformation field is exaggerated 10x for illustrative purposes), colored by (left) plastic work ($$W^{p}$$) and (right) equivalent plastic strain ($$\bar\epsilon^{P}$$). Note that, unlike the deformed sample in Uniaxial Control (examples/1_uniaxial), a multiaxial simulation will maintain the orthogonal, planar surfaces throughout the simulation.

Evolution of the macroscopic normal strains. Note the strain rate increase corresponding to the strain-rate jump defined for step 2.

Multiaxial Control with Constant Load Rate (examples/3_triaxCLR)

This example covers the triaxial deformation of a dual phase FCC/BCC polycrystal (phase map shown below) at a constant load rate followed by a dwell episode and subsequent unloading. Loads are applied normal to the surface, maintaining proportional macroscopic load ratios of $$-0.375$$:$$-0.625$$:$$1$$ for the $$x$$:$$y$$:$$z$$ directions, respectively. Load tolerance options are prescribed. The primary loading direction is set to be in the $$z$$ direction, and a dwell episode is initiated on the second step. Elemental critical resolved shear stresses and equivalent strains are output, along with the nodal coordinates and surface-integrated forces. Material parameters are those for the austenitic ($$\gamma$$) and ferritic ($$\alpha$$) phases of an LDX-2101 steel, and are provided in the tables below. Illustrations of the results are provided in the figures below.

Single crystal elastic constants.

Phase

Type

$$C_{11}$$ [MPa]

$$C_{12}$$ [MPa]

$$C_{44}$$ [MPa]

$$\gamma$$

FCC

$$204.6 \times 10^3$$

$$137.7 \times 10^3$$

$$126.2 \times 10^3$$

$$\alpha$$

BCC

$$236.9 \times 10^3$$

$$140.6 \times 10^3$$

$$116.0 \times 10^3$$

Initial slip system strengths and other plasticity parameters.

Phase

$$m$$ [-]

$$\dot{\gamma_{0}}$$ [1/s]

$$h_{0}$$ [MPa]

$$g_{0}$$ [MPa]

$$g_{s0}$$ [MPa]

$$n$$ [-]

$$\gamma,\alpha$$

0.02

1.0

391.9

200.0

335.0

1.0

(left) Grain and phase assignment distribution in the virtual sample. Red-colored grains are $$\gamma$$-phase and green-colored grains are $$\alpha$$-phase. (right) Elastically unloaded sample colored by critical resolved shear stress.

(left) Evolution of the macroscopic normal strains, and (right) evolution of the macroscopic stress and strain on the $$z$$ surface. Note that the load rate in the $$z$$ direction is always held constant during the simulation (except during the dwell episode) while the other two are automatically modified to maintain load proportionality throughout the simulation.

Restarting a Simulation with Appended Load Steps (examples/4_restart)

An example use case for the restart capabilities are to append additional loading steps to a completed simulation. This example covers the cyclic triaxial deformation of an FCC polycrystal at a constant strain rate. Each restart simulation adds an addition load-unload cycle. Loads are applied normal to the surface, maintaining proportional macroscopic load ratios of $$0$$:$$0$$:$$1$$ for the $$x$$:$$y$$:$$z$$ directions, respectively. Load tolerance options are prescribed and cyclic hardening is activated. The primary loading direction is set to be in the $$z$$ direction. Elemental equivalent plastic deformation rate, slip system shears, slip system shear rates, nodal coordinates, and restart files are output. Restart files are only printed on the first cycle. Material parameters are those for a AL6XN steel and are provided in the tables below. Illustrations of the results are provided in the figures below.

The included shell script will run the initial simulation in examples/4_restart/cycle1 which runs 2 load steps (a single load-unload cycle) and prints the files necessary to restart the simulation from the final state (using print option print restart). After successful completion of the first cycle, the mesh file and restart files are copied into the secondary directory (examples/4_restart/cycle2) and the simulation is performed again for another 2 load steps (a second load-unload cycle). The configuration file for the second cycle (simulation_cycle2.config) contains the following input to allow for simulating additional load steps to those already completed:

restart on


along with the additional load steps (as described in the Deformation History section). The restarted simulation will continue with the load steps as defined in simulation_cycle2.config. Restart control information will print to the console upon the execution of the second cycle to briefly assess the state of the sample when the simulation is restarted. Material parameters are defined as:

Single crystal elastic constants.

Phase

Type

$$C_{11}$$ [MPa]

$$C_{12}$$ [MPa]

$$C_{44}$$ [MPa]

$$\gamma$$

FCC

$$204.6 \times 10^3$$

$$137.7 \times 10^3$$

$$126.2 \times 10^3$$

Initial slip system strengths and other plasticity parameters.

Phase

$$m$$ [-]

$$\dot{\gamma_{0}}$$ [1/s]

$$h_{0}$$ [MPa]

$$g_{0}$$ [MPa]

$$g_{s0}$$ [MPa]

$$n$$ [-]

$$\alpha$$

0.02

1.0

375.0

160.0

1000.0

1.0

Cyclic hardening parameters.

Phase

$$a$$ [-]

$$c$$ [-]

$$\alpha$$

0.05

3.50

Sample after the second cycle is completed, (left) colored by accumulated slip shear on the $$(1 \bar 1 1)[0 1 1]$$ system and (right) colored by accumulated slip shear on the $$(1 \bar 1 1)[1 0 \bar 1]$$ system.

Running a Simulation with External Definition Files (examples/5_external)

Certain simulation input may be supplied from external files in order to allow for a static configuration and mesh file to be used for multiple simulations while certain microstructure information is varied. This example covers the uniaxial loading and unloading (via load targeting) of a dual phase FCC/BCC polycrystal including in-grain orientation distributions. Two steps are defined with a standard time-step value of 0.1s and a minimum time-step value of 0.01s. Minimal boundary conditions are applied to the sample with the primary loading face set as x1 loaded in the +x direction. Elemental orientations and grain/phase assignments are supplied from the external files simulation.ori and simulation.phase, respectively. Elemental equivalent deformation rate, work, orientations, surface-integrated forces, and nodal coordinates are output. Fiber-averaging processing is performed via Neper. Material parameters are those for the austenitic ($$\gamma$$) and ferritic ($$\alpha$$) phases of a LDX-2101 steel and were previously provided in Multiaxial Control with Constant Load Rate (examples/3_triaxCLR). Illustrations of the results are provided below.

Phases are assigned to grains in simulation.phase based on grain ID, resulting in a 50%/50% phase distribution, by:

$Groups elset 50 1 1 2 1 ... 26 2 ... 50 2$EndGroups


Orientations are assigned to individual elements in the mesh by:

$ElementOrientations 5455 rodrigues:active 1 -0.251740631650 -0.214936324918 0.002481866070 2 -0.263893837934 -0.212836283407 0.021747296015 ... 5454 -0.062896691423 0.070800028157 0.312930553247 5455 -0.055849086418 0.072826013322 0.294773397825$EndElementOrientations


Note that even though $ElsetOrientations are also present in simulation.ori as generated via Neper, the presence of $ElementOrientations will always override any other orientations present in simulation.ori or in the mesh file (simulation.msh).

The definitions of the crystallographic fibers for the fiber averaging are defined in simulation.fib by:

1 1 1 -1.000000  0.000000  0.000000 1 5
1 1 1 -0.993884 -0.110432  0.000000 1 5
...
2 2 0  0.993884  0.110432  0.000000 1 5
2 2 0  1.000000  0.000000  0.000000 1 5


Three unique fibers (hkl triplets) are defined in the file. The associated sample directions (uvw triplets) define unique points on a coarse mesh of a pole figure. The selection of sample directions in this manner allows for the fiber averaged output data to be visualized as a pole figure as seen below.

Undeformed sample colored by orientation. Per-element orientations are assigned to the sample allowing for the prescription of initial misorientation within grains. Per-element orientations are generated from a 3-variate normal distribution with an average misorientation angle (with respect to a grain’s average orientation) of 5 degrees.

Deformed sample after the (left) first step and (right) second step are completed (deformation field is exaggerated 50x for illustrative purposes). The left figure is colored by equivalent deformation rate and the right figure is colored by work.

Evolution of the macroscopic normal stress. Note the increased point densities near to the load direction change exhibiting the simulation time-step value decreasing to accurately reach the load targets.

A lattice strain pole figure depicting the fiber-averaged elastic lattice strain for the $${200}$$ planes of the FCC phase (i.e., phase 1) at the end of step 1. Refinement of the pole figure would benefit from an increase in the number of grains in the simulated domain, as well as the inclusion of more unique fibers on the mesh of the pole figure.