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

Classes

class  Ann
 

Functions

 upwind_matrix (G, valid, idx, implicit_face)
 
 run (ND, scheme, cfl=0.5, off=(0.37, 0.71))
 

Variables

 R
 
 A
 
 o = run(ND, scheme)
 
 flush
 

Detailed Description

2-D prototype, round 6: explicit advection with kappa storage on cut cells (small-cell problem).

Flow: solid-body rotation psi = r^2/2 in the annulus a < r < R (a = 0.4, R = 1), both circles
immersed. Face fluxes are EXACT integrals of the stream function over the OPEN part of each face,
so the discrete aperture-weighted divergence vanishes in every cut cell (as for flow's projected
MAC flux). A Gaussian blob next to the outer wall is carried once round (T = 2 pi); the exact
answer is the initial field.  dt = CFL * h / max|u| with the FULL-cell CFL 0.5.

Schemes (first-order upwind fluxes throughout, to isolate the storage / small-cell question):
  unit   : (c^{n+1}-c^n) h^2/dt = -sum F c_up     (flow today: conserves sum c, not sum kappa c)
  kappa  : kappa h^2 (c^{n+1}-c^n)/dt = -sum F c_up   (explicit; unstable for small kappa?)
  mb     : kappa storage; faces touching a cell with kappa < 1/2 use IMPLICIT upwind values, all
           other faces explicit (May & Berger-style explicit-implicit split; conservative because
           each face flux is shared by its two cells); one sparse solve per step
  impl   : kappa storage, all faces implicit (reference for stability)
Reported: max/min of c (overshoot = instability or max-principle violation), relative drift of
the physical mass sum kappa c, L1 error vs the exact (initial) field over the fluid volume.

Function Documentation

◆ upwind_matrix()

advect.upwind_matrix (   G,
  valid,
  idx,
  implicit_face 
)
Matrix U with (U c)_i = sum over faces of F_out * c_upwind (net outflow), restricted to faces
selected by implicit_face(face) True/False; returns (U_sel) as sparse.

Definition at line 65 of file advect.py.

Referenced by run().

◆ run()

advect.run (   ND,
  scheme,
  cfl = 0.5,
  off = (0.37, 0.71) 
)

Definition at line 84 of file advect.py.

References upwind_matrix().

Variable Documentation

◆ R

advect.R

Definition at line 21 of file advect.py.

◆ A

advect.A

Definition at line 21 of file advect.py.

◆ o

advect.o = run(ND, scheme)

Definition at line 124 of file advect.py.

◆ flush

advect.flush

Definition at line 126 of file advect.py.