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

Functions

 arg (name, default, cast=float)
 
 tbf_read (path, shape)
 
 interp_component (src, src_pos, dst_pos)
 
 load_tbf_ic ()
 
 laminar_ic ()
 
 sphere_frac (shape, R, c, sub=16)
 
 main ()
 

Variables

 TBF = str(arg("--tbf", "/home/frankp/Codes/TBFsolver/channel_18/0", str))
 
 NY = int(arg("--ny", 80, int))
 
 NSTEP = int(arg("--steps", 4000, int))
 
str SINGLE = "--single" in sys.argv
 
 OUT = str(arg("--out", "", str))
 
 LX
 
 LY
 
 LZ
 
 RHO_L
 
 RHO_G
 
float MU = 3.33333333333333e-4
 
float SIGMA = 5.0e-3
 
float GCH = 0.1
 
float RET = 127.3
 
float RE = 1.0 / MU
 
tuple TAUW = (RET / RE) ** 2
 
float UTAU = RET * MU
 
float RBUB = 0.125
 
 NBX
 
 NBY
 
 NBZ
 
 S = NY / LY
 
int NX = int(round(LX * S / 16)) * 16
 
int NZ = int(round(LZ * S / 16)) * 16
 
 LXC
 
 LZC
 

Detailed Description

VoF Part III rung W2 gate 4 (WO-W12) — TBFsolver's `channel_18` on the block container.

TBFsolver (Cifani et al., *Computers & Fluids* 2018; `~/Codes/TBFsolver`) ships one case:
a MINIMAL turbulent channel at Re_tau = 127.3 loaded with 18 deformable bubbles.  This is the
transcription, read off `channel_18/specs/*` and the source that consumes them.

THE CASE (every number verified against the Fortran, not the file names):

    geometry   Lx = pi (streamwise, periodic), Ly = 2 (wall-normal, WALLS), Lz = pi/2 (spanwise,
               periodic); half-height h = 1.  TBFsolver's grid is 192 x 160 x 96 (anisotropic:
               dx+ = 2.08, dy+ = 1.59).  flow's cells are cubic, so the transcription is an
               ISOTROPIC grid and the box aspect is rounded to it (below).
    fluids     rho_l = 1, rho_g = 0.1 (ratio 10); mu_l = mu_g = 3.3333e-4 (ratio 1); sigma = 5e-3.
    driving    `flowCtrl 1` + `Ret 127.3`.  In `auxiliaryRoutines::setPressGrad` this is
                   tau_w = (Ret nu_l / h)^2 / nu_l^2 ... = (Ret/Re)^2 with Re = 1/nu_l = 3000,
                   i.e. tau_w = 1.800588e-3, and the applied mean pressure gradient is
                   fs = tau_w - <rho> gCH.  The x-momentum source is then
                       fs + rho gCH = tau_w + (rho - <rho>) gCH,
               so **gCH = 0.1 is a streamwise GRAVITY that contributes only buoyancy** and does
               NOT enter Re_tau: u_tau = Re_tau nu_l / h = 0.0424333 exactly, by construction.
               (`g 0.d0` in the specs is the WALL-NORMAL gravity, and it is off.)  The bubbles are
               therefore driven AGAINST the mean flow: this is a downflow channel.
    bubbles    `initBubbles method 2, nbx 6, nby 1, nbz 3, R 0.125, random_distr .FALSE.` ->
               `vofBlocks::readBubblesArray` puts 18 bubbles on the CENTRELINE y = 1 at
               x0 = (i-1/2) Lx/6, z0 = (k-1/2) Lz/3.  Void fraction 1.49 %.  D/h = 0.25.
    BCs        no-slip on both walls; zero normal gradient for the colour and the pressure.
    IC         `channel_18/0/{ux,uy,uz}` is a converged SINGLE-PHASE turbulent channel snapshot
               (raw Fortran STREAM: one int32 count then the internal field, x fastest, no ghosts,
               staggered sizes 193x160x96 / 192x161x96 / 192x160x97; a 96-byte trailer of stale
               patch records that the reader ignores).  psi and phi0* are identically zero.
               This script INTERPOLATES that snapshot onto its own grid when it is present -- the
               nearest thing to the same initial condition that a different grid admits -- and
               otherwise starts from a perturbed laminar profile and spins up.

DIMENSIONLESS GROUPS: Eo = rho_l gCH D^2 / sigma = 1.25, Mo = gCH mu_l^4/(rho_l^2 sigma^3) =
9.88e-9, density ratio 10, viscosity ratio 1, D+ = 31.8, void fraction 1.49 %.

REFERENCE DATA: **the repository ships none** -- 60 tracked files, no statistics, no profiles, no
post-processing.  The only published figure is qualitative (a streamwise-velocity contour in
`user_guide.pdf`).  So the profiles below are reported as OUR first datum, not as a comparison.

Usage:
  PYTHONPATH=<build> python tests/study/vof_channel_18.py [--ny 80] [--steps N] [--single]
                                                          [--tbf DIR] [--out FILE]

Function Documentation

◆ arg()

vof_channel_18.arg (   name,
  default,
  cast = float 
)

Definition at line 57 of file vof_channel_18.py.

◆ tbf_read()

vof_channel_18.tbf_read (   path,
  shape 
)
One `channel_18/0` binary: int32 count, then count float64s, x fastest, no ghosts.

Definition at line 92 of file vof_channel_18.py.

Referenced by load_tbf_ic().

◆ interp_component()

vof_channel_18.interp_component (   src,
  src_pos,
  dst_pos 
)
Trilinear resample of one staggered component.

`src_pos[d]` and `dst_pos[d]` are the PHYSICAL coordinates of the sample points along axis d,
normalised to [0,1) of the respective box.  x and z wrap (periodic), y clamps (walls).

Definition at line 102 of file vof_channel_18.py.

References slice().

Referenced by load_tbf_ic().

◆ load_tbf_ic()

vof_channel_18.load_tbf_ic ( )
TBFsolver's turbulent snapshot, resampled onto our grid, in CELL units (u' = S u).

Definition at line 131 of file vof_channel_18.py.

References interp_component(), and tbf_read().

Referenced by main().

◆ laminar_ic()

vof_channel_18.laminar_ic ( )
Perturbed parabolic fallback (mean flow set to the shipped snapshot's bulk, U_b = 0.6113).

Definition at line 157 of file vof_channel_18.py.

Referenced by main().

◆ sphere_frac()

vof_channel_18.sphere_frac (   shape,
  R,
  c,
  sub = 16 
)

Definition at line 172 of file vof_channel_18.py.

References mean().

Referenced by main().

◆ main()

vof_channel_18.main ( )

Definition at line 186 of file vof_channel_18.py.

References laminar_ic(), load_tbf_ic(), main(), mean(), and sphere_frac().

Referenced by main().

Variable Documentation

◆ TBF

vof_channel_18.TBF = str(arg("--tbf", "/home/frankp/Codes/TBFsolver/channel_18/0", str))

Definition at line 63 of file vof_channel_18.py.

◆ NY

vof_channel_18.NY = int(arg("--ny", 80, int))

Definition at line 64 of file vof_channel_18.py.

◆ NSTEP

vof_channel_18.NSTEP = int(arg("--steps", 4000, int))

Definition at line 65 of file vof_channel_18.py.

◆ SINGLE

str vof_channel_18.SINGLE = "--single" in sys.argv

Definition at line 66 of file vof_channel_18.py.

◆ OUT

vof_channel_18.OUT = str(arg("--out", "", str))

Definition at line 67 of file vof_channel_18.py.

◆ LX

vof_channel_18.LX

Definition at line 70 of file vof_channel_18.py.

◆ LY

vof_channel_18.LY

Definition at line 70 of file vof_channel_18.py.

◆ LZ

vof_channel_18.LZ

Definition at line 70 of file vof_channel_18.py.

◆ RHO_L

vof_channel_18.RHO_L

Definition at line 71 of file vof_channel_18.py.

◆ RHO_G

vof_channel_18.RHO_G

Definition at line 71 of file vof_channel_18.py.

◆ MU

float vof_channel_18.MU = 3.33333333333333e-4

Definition at line 72 of file vof_channel_18.py.

◆ SIGMA

float vof_channel_18.SIGMA = 5.0e-3

Definition at line 73 of file vof_channel_18.py.

◆ GCH

float vof_channel_18.GCH = 0.1

Definition at line 74 of file vof_channel_18.py.

◆ RET

float vof_channel_18.RET = 127.3

Definition at line 75 of file vof_channel_18.py.

◆ RE

float vof_channel_18.RE = 1.0 / MU

Definition at line 76 of file vof_channel_18.py.

◆ TAUW

tuple vof_channel_18.TAUW = (RET / RE) ** 2

Definition at line 77 of file vof_channel_18.py.

◆ UTAU

float vof_channel_18.UTAU = RET * MU

Definition at line 78 of file vof_channel_18.py.

◆ RBUB

float vof_channel_18.RBUB = 0.125

Definition at line 79 of file vof_channel_18.py.

◆ NBX

vof_channel_18.NBX

Definition at line 80 of file vof_channel_18.py.

◆ NBY

vof_channel_18.NBY

Definition at line 80 of file vof_channel_18.py.

◆ NBZ

vof_channel_18.NBZ

Definition at line 80 of file vof_channel_18.py.

◆ S

vof_channel_18.S = NY / LY

Definition at line 86 of file vof_channel_18.py.

◆ NX

int vof_channel_18.NX = int(round(LX * S / 16)) * 16

Definition at line 87 of file vof_channel_18.py.

◆ NZ

int vof_channel_18.NZ = int(round(LZ * S / 16)) * 16

Definition at line 88 of file vof_channel_18.py.

◆ LXC

vof_channel_18.LXC

Definition at line 89 of file vof_channel_18.py.

◆ LZC

vof_channel_18.LZC

Definition at line 89 of file vof_channel_18.py.