Skip to content

Moving Frame

MovingFrame enables directional-solidification-style setups in which the simulation domain shifts along a chosen axis to track a moving feature — a solidification front, a dendrite tip, or a steady-state thermal profile. Shifting is triggered when the chosen trigger phase crosses a user-specified grid position in the chosen direction. All Storage3D fields (phase-field, composition, temperature, velocity…) are shifted together so the simulation state remains consistent after each frame move.

Key Classes and Concepts

  • MovingFrame : public OPObject: decides when to shift the domain and drives the shift of every registered storage.

Usage

Input

Defined in the @MovingFrame block.

text
@MovingFrame

$TriggerPhaseIndex  Phase whose front triggers the shift : 1
$TriggerPosition    Grid position (in the MovingDirection axis) : 80
$MovingDirection    Axis to shift along (No / X / Y / Z)        : X
TokenVariableTypeDefault
$TriggerPhaseIndextrigger_phase_idxint-1 (disabled)
$TriggerPositiontrigger_positionint-1 (disabled)
$MovingDirectionmoving_directionstringNo

Setting $MovingDirection = No disables the moving frame.

Output

No dedicated output. The shift operation modifies the positions of every storage it shifts; downstream VTK output reflects the shifted domain as normal.

Example

cpp
#include "MovingFrame.h"

MovingFrame MF(OPSettings, InputFile);

for(RTC.tStep = RTC.tStart; RTC.tStep <= RTC.nSteps; RTC.IncrementTimeStep())
{
    // ... solver updates ...

    MF.Shift(Phi, Cx, Tx, BC);   // shifts every storage when the trigger fires
}

Dependencies

Released under the GNU GPLv3 License.