Mechanical Loads
MechanicalLoads schedules time-varying mechanical loads on top of the static boundary conditions supplied by ElasticProperties. Each entry in the list is one load step: a set of applied stresses / strains / strain rates on the six Voigt axes, an ON trigger, an OFF trigger, and a repeat count. Use it for cyclic loading, time-staged tests, or chained experiments within a single simulation.
Key Classes and Concepts
MechanicalLoads : public OPObject: owns the ordered list ofMechanicalLoadStructurerecords read from the input file.MechanicalLoadStructure: one load step. Records the per-axis applied values and masks, its ON/OFF triggers, and repeat count.EventTriggers: enum used for both ON and OFF triggers. Accepted values:USER,TIME,TIMESTEP,STRESS,STRAIN.
Axis components
When TriggerON = STRESS or STRAIN, the trigger must also name which tensor component to monitor via $ONindex_<n>. The same applies to $OFFindex_<n>. Accepted strings:
$ONindex_<n> value | Voigt index |
|---|---|
XX | 0 |
YY | 1 |
ZZ | 2 |
YZ / ZY | 3 |
XZ / ZX | 4 |
XY / YX | 5 |
Per-axis loading within a load step
The same six-axis grid used by ElasticProperties is re-used here, with a trailing _<n> to name the load step:
| Token | Voigt axis |
|---|---|
$BCX_<n> | |
$BCY_<n> | |
$BCZ_<n> | |
$BCYZ_<n> | |
$BCXZ_<n> | |
$BCXY_<n> |
Each axis accepts STRAIN, STRAINRATE, or STRESS; the corresponding value is supplied as $BCValueX_<n> … $BCValueXY_<n>.
Usage
Input
@MechanicalLoads
# Load step 0: apply a 1% tensile strain along Y when t > 0 and hold {#load-step-0-apply-a-1-tensile-strain-along-y-when-t-0-and-hold}
$Load_0 Enable load 0 : Yes
$TriggerON_0 ON trigger : TIME
$TriggerONvalue_0 Activate at simulation time : 0.0
$TriggerOFF_0 OFF trigger : TIME
$TriggerOFFvalue_0 Deactivate at simulation time : 10.0
$Repeat_0 Repeat count : 1
$BCY_0 Y-axis loading mode : STRAIN
$BCValueY_0 Y-axis applied strain : 0.01
# Load step 1: release when σ_yy drops below threshold {#load-step-1-release-when-_yy-drops-below-threshold}
$Load_1 Enable load 1 : Yes
$TriggerON_1 ON trigger : STRESS
$ONindex_1 Monitored stress component : YY
$TriggerONvalue_1 Activate when σ_yy exceeds : 5.0e8
$TriggerOFF_1 OFF trigger : USER
$Repeat_1 Repeat count : 1
$BCY_1 Y-axis loading mode : STRAINRATE
$BCValueY_1 Y-axis strain rate : -1.0e-3$TriggerONvalue_<n> is required unless the ON trigger is USER. $ONindex_<n> / $OFFindex_<n> are required only when the corresponding trigger is STRESS or STRAIN.
Output
MechanicalLoads does not produce its own output file; the loads it activates are applied to ElasticProperties, whose stress / strain fields carry the result.
Example
#include "MechanicalLoads.h"
MechanicalLoads ML(OPSettings, InputFile);
ElasticProperties EP(OPSettings, InputFile);
ElasticitySolverSpectral ES(OPSettings, InputFile);
for(RTC.tStep = RTC.tStart; RTC.tStep <= RTC.nSteps; RTC.IncrementTimeStep())
{
ML.Apply(EP, RTC); // activate / deactivate loads, then push into EP
ES.Solve(EP, BC, RTC.dt);
}Dependencies
- ElasticProperties — where per-axis applied values end up.
- ElasticitySolverSpectral — consumes the updated state.
- RunTimeControl — triggers
TIMEandTIMESTEPreference its time and step counters.