Advection (HR)
AdvectionHR provides the high-resolution advection stencil used when fields have to be transported by a prescribed velocity (Velocities) — for example, advecting grain orientations with a fluid flow, or moving a composition field with a solid-body velocity. The scheme is selected by a single keyword; the default is UPWIND.
Key Classes and Concepts
AdvectionHR : public OPObject: owns the scheme choice and the helpers that other modules invoke through their ownAdvectmethods (Orientations::Advect,Composition::Advect,PhaseField::Advect).
Usage
Input
Defined in the @AdvectionHR block.
text
@AdvectionHR
$scheme Advection scheme : UPWIND| Token | Variable | Type | Default |
|---|---|---|---|
$scheme | scheme keyword | string | UPWIND |
The set of accepted values is declared in include/AdvectionHR.h — UPWIND is the default first-order scheme. Higher-resolution alternatives (if present in your build) are selected by name.
Output
No dedicated output. The scheme influences what Velocities-driven modules write to VTK.
Example
cpp
#include "AdvectionHR.h"
#include "Velocities.h"
#include "Orientations.h"
AdvectionHR Adv(OPSettings, InputFile);
Velocities Vel(OPSettings, InputFile);
Orientations OP(OPSettings, InputFile);
for(RTC.tStep = RTC.tStart; RTC.tStep <= RTC.nSteps; RTC.IncrementTimeStep())
{
// ... flow / velocity update ...
OP.Advect(Adv, Vel, Phi, dt, RTC.tStep);
Phi.Advect(Adv, Vel, BC, dt, RTC.tStep);
}Dependencies
- Velocities — supplies the advecting vector field.
- PhaseField, Orientations, Composition — typical targets.
- BoundaryConditions.