Skip to content

Elasticity Solver (Spectral)

ElasticitySolverSpectral is the FFT-based spectral solver for the mechanical-equilibrium problem in OpenPhase. It iterates on the deformation gradient until the residual stress satisfies the convergence criteria the user sets, then writes the resulting stress and strain back into ElasticProperties. The continuum derivation (Piola-Kirchhoff, homogeneous / inhomogeneous split, external-BC handling) is in Mechanics; this page documents the solver's input parameters and execution contract.

Key Classes and Concepts

  • ElasticitySolverSpectral : public OPObject: the solver. Allocates the real-space RHS and Fourier-space displacement buffers, creates FFTW plans on initialization, and exposes Solve(EP, BC, dt).

Convergence parameters

The solver converges when both strain and stress residuals fall below their tolerances or the iteration cap is reached.

TokenMeaning
$StrainAccuracyResidual strain tolerance.
$StressAccuracyResidual stress tolerance.
$MAXIterationsMaximum number of iterations per call.
$IncrementScalingScales the per-iteration update to the deformation gradient; reduce to damp oscillations.
$VerboseIterationsEcho the residuals at each iteration.
$DiscreteDerivativesUse discrete (stencil-based) derivatives instead of spectral when evaluating gradients.

All defaults come from the in-class member initialisers in include/ElasticitySolverSpectral.h; every field is optional.

Usage

Input

Defined in the @ElasticitySolverSpectral block.

text
@ElasticitySolverSpectral

$StrainAccuracy       Residual strain tolerance              : 1.0e-6
$StressAccuracy       Residual stress tolerance              : 1.0e-3
$MAXIterations        Maximum iterations per call            : 50
$IncrementScaling     Damping factor on the update           : 1.0
$VerboseIterations    Echo per-iteration residual            : No
$DiscreteDerivatives  Use discrete gradient stencils         : No

Output

No dedicated file. The solver mutates the stress / strain fields held by ElasticProperties; those fields are written by ElasticProperties::WriteVTK.

Example

cpp
#include "ElasticProperties.h"
#include "ElasticitySolverSpectral.h"

ElasticProperties        EP(OPSettings, InputFile);
ElasticitySolverSpectral ES(OPSettings, InputFile);

for(RTC.tStep = RTC.tStart; RTC.tStep <= RTC.nSteps; RTC.IncrementTimeStep())
{
    // ... phase-field update (may change the effective stiffness)...

    ES.Solve(EP, BC, RTC.dt);

    if (RTC.WriteVTK()) EP.WriteVTK(OPSettings, RTC.tStep);
}

See also: examples

In OpenPhase-main/examples/:

  • Superalloys — superalloy microstructure with elasticity coupling.
  • Pearlite — pearlite formation with mechanical coupling.
  • PrecipitationNiTi — precipitation kinetics with transformation stretches.
  • The full polycrystalline-plasticity-with-damage example on damage.md drives ElasticitySolverSpectral alongside MechanicalLoads and ElasticProperties.

Dependencies

Notes on applicability

The spectral solver assumes periodic boundary conditions in the Fourier sense. Non-periodic applied conditions are handled through the homogeneous / inhomogeneous split described in Mechanics → External boundary conditions. Simple shear that requires a non-symmetric deformation tensor cannot be represented (only pure shear combined with volumetric change is supported).

Released under the GNU GPLv3 License.