flow 1.4.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
mg_advection.Case Class Reference

Public Member Functions

 __init__ (self, n, discs, wall, d=(1.0, 0.3), delta_frac=0.8, cells=0.0)
 flux (self, pe)

Public Attributes

 n
float h = n, 1.0 / n
float delta = delta_frac * 0.5 * cl if np.isfinite(cl) else 1.0
 ax = edge_frac(sdf[:-1, :-1], sdf[:-1, 1:])
 ay = edge_frac(sdf[:-1, :-1], sdf[1:, :-1])
tuple unknown = (self.ax + hi(self.ax, 0) + self.ay + hi(self.ay, 1)) > 0
str W0 = "dir" else np.zeros((n, n))
str singular = "neu"
 dropped = max(np.abs(np.where(gx, 0, Fx)).max(), np.abs(np.where(gy, 0, Fy)).max()) / max(np.abs(Fx).max(), 1e-300)
 divrel = np.abs(div).max() / np.abs(Fx).max()
 Fmax = max(np.abs(Fx).max(), np.abs(Fy).max())
float fx0 = Fy / h**2

Detailed Description

n x n periodic cells on [0,1]^2; discs (cx, cy, R); flow direction d; wall 'dir' or 'neu'.

Definition at line 52 of file mg_advection.py.

Constructor & Destructor Documentation

◆ __init__()

mg_advection.Case.__init__ ( self,
n,
discs,
wall,
d = (1.0, 0.3),
delta_frac = 0.8,
cells = 0.0 )

Definition at line 54 of file mg_advection.py.

Member Function Documentation

◆ flux()

mg_advection.Case.flux ( self,
pe )
per-unit-volume face fluxes scaled to peak cell Peclet pe = max|u| h / D (|u| = |F| / h).

Definition at line 111 of file mg_advection.py.

References Fmax, and fx0.

Member Data Documentation

◆ n

◆ h

◆ delta

float mg_advection.Case.delta = delta_frac * 0.5 * cl if np.isfinite(cl) else 1.0

Definition at line 79 of file mg_advection.py.

◆ ax

mg_advection.Case.ax = edge_frac(sdf[:-1, :-1], sdf[:-1, 1:])

Definition at line 87 of file mg_advection.py.

◆ ay

mg_advection.Case.ay = edge_frac(sdf[:-1, :-1], sdf[1:, :-1])

Definition at line 88 of file mg_advection.py.

◆ unknown

tuple mg_advection.Case.unknown = (self.ax + hi(self.ax, 0) + self.ay + hi(self.ay, 1)) > 0

Definition at line 90 of file mg_advection.py.

◆ W0

str mg_advection.Case.W0 = "dir" else np.zeros((n, n))

Definition at line 97 of file mg_advection.py.

◆ singular

str mg_advection.Case.singular = "neu"

Definition at line 98 of file mg_advection.py.

◆ dropped

mg_advection.Case.dropped = max(np.abs(np.where(gx, 0, Fx)).max(), np.abs(np.where(gy, 0, Fy)).max()) / max(np.abs(Fx).max(), 1e-300)

Definition at line 104 of file mg_advection.py.

◆ divrel

mg_advection.Case.divrel = np.abs(div).max() / np.abs(Fx).max()

Definition at line 107 of file mg_advection.py.

◆ Fmax

mg_advection.Case.Fmax = max(np.abs(Fx).max(), np.abs(Fy).max())

Definition at line 108 of file mg_advection.py.

Referenced by flux().

◆ fx0

float mg_advection.Case.fx0 = Fy / h**2

Definition at line 109 of file mg_advection.py.

Referenced by flux().


The documentation for this class was generated from the following file: