Skip to content

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 own Advect methods (Orientations::Advect, Composition::Advect, PhaseField::Advect).

Usage

Input

Defined in the @AdvectionHR block.

text
@AdvectionHR

$scheme    Advection scheme    : UPWIND
TokenVariableTypeDefault
$schemescheme keywordstringUPWIND

The set of accepted values is declared in include/AdvectionHR.hUPWIND 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

Released under the GNU GPLv3 License.