flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
colocated_advection.hpp File Reference

flow — collocated (cell-centered) momentum advection (Koren TVD + FOU). More...

#include <Kokkos_Core.hpp>
#include <Kokkos_MathematicalFunctions.hpp>
#include "staggered_advection.hpp"

Go to the source code of this file.

Namespaces

namespace  cadv
 

Functions

template<class A >
double cadv::adv_vel (int, int fd, int x, int y, int z, A U, A V, A W, bool uf)
 
template<class A >
double cadv::advect (int comp, int x, int y, int z, A U, A V, A W, A PHI, bool uf)
 
template<class A >
double cadv::advect_sou (int comp, int x, int y, int z, A U, A V, A W, A PHI, bool uf)
 
template<class A >
void cadv::fou_operator (int comp, int x, int y, int z, A U, A V, A W, double dt, double &cC, double &cxm, double &cxp, double &cym, double &cyp, double &czm, double &czp, bool uf)
 
template<class A >
double cadv::advect_fou (int comp, int x, int y, int z, A U, A V, A W, A PHI, bool uf)
 

Detailed Description

flow — collocated (cell-centered) momentum advection (Koren TVD + FOU).

The collocated counterpart of staggered_advection.hpp. All three velocity components live at the cell center, so a single cell is the control volume for every component and the advecting normal velocity at a face is the cell->face average of that face's normal component — independent of which component is being advected (contrast sadv::adv_vel, which interpolates onto a staggered control volume). The flux reconstruction (Koren limiter / FOU) is otherwise identical, so this header reuses sadv::koren / tvd / fou_flux / ViewAcc and only re-expresses adv_vel + the conservative operators.

ADVECTING FIELD (uf argument of every operator below, plumbed from Solver::ufAdvVelocity()): the natural advecting field is the PROJECTED, discretely divergence-free MAC face velocity uf_/vf_/wf_ that the approximate projection produced last step — the field the projection just made solenoidal IS the conservative advective flux (Almgren–Bell–Colella; doc/flow_colocated_plan.md §1 step 3). That is the production choice (uf == true). The phase-2 form, the plain cell->face average 1/2(U(i)+U(i+1)) of the stored cell velocities, survives as uf == false: it is what the solver uses before the first projection has built a face field, and the developer-tier ablation diagnostics.set_uf_advection(False) (see doc/uf_advection.md).

Definition in file colocated_advection.hpp.