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

Functions

 tg_fields (N, nz, U0, amp)
 
 run (SolverCls, N, nz=4, U0=1.0, rho=1.0, nu=0.05, dt=0.5, steps=100)
 
 main ()
 

Detailed Description

Phase-3 verification (collocated grid): 2-D Taylor-Green vortex in a triply-periodic box, the canonical
test of the approximate (MAC) projection. The exact incompressible Navier-Stokes solution is

    u =  U0 sin(kx) cos(ky) e^{-2 nu k^2 t},   v = -U0 cos(kx) sin(ky) e^{-2 nu k^2 t},   w = 0,

with the nonlinear term exactly balanced by the pressure gradient. Advection is ON, so the projection has
to remove the divergence the discrete advection injects each step. We check (a) the projected face field is
divergence-free (max_open_divergence -> solver tol) and (b) the velocity matches the exact decayed field,
the L2 error shrinking with resolution. Grid spacing = 1; the vortex wavelength is the box length N (k=2pi/N).

Function Documentation

◆ tg_fields()

verify_colocated_taylor_green.tg_fields (   N,
  nz,
  U0,
  amp 
)

Definition at line 21 of file verify_colocated_taylor_green.py.

Referenced by run().

◆ run()

verify_colocated_taylor_green.run (   SolverCls,
  N,
  nz = 4,
  U0 = 1.0,
  rho = 1.0,
  nu = 0.05,
  dt = 0.5,
  steps = 100 
)

Definition at line 33 of file verify_colocated_taylor_green.py.

References tg_fields().

Referenced by main().

◆ main()

verify_colocated_taylor_green.main ( )

Definition at line 65 of file verify_colocated_taylor_green.py.

References main(), and run().

Referenced by main().