Jongsu Liam Kim | Blog

(Note) Tox workflow

What do I need to install

  • tox : virtualenv for testing
  • tox-pyenv : pyenv plugin for tox
  • pytest : testing framework
  • pipreqs : generates requirements.txt

What do I need to do

  1. Checkout cookiecutter

  2. create virtualenv using pyenv

$ pyenv install "some versions" $ pip install tox tox-pyenv $ pyenv local "my_env" "some versions" 
  1. create src...

Navier Stokes Equation Solver for Homogeneous Isotropic Turbulence

(This content is originally written by ‪Kyongmin Yeo’s manual)


The spectral method is solving certain differential equation by some “basis function”, typically sinusoids with Fourier method. With the Navier-Stokes equation, it can remove presssure term in N-S equation and solve viscous term analytically.


  • Removing pressure term is huge performance advantage
  • Accurate result because differential operator doesn’t depends on grid size


  • Only can be applied to periodic domain

Governing Equation

Original Navier-Stokes equation in convection form is

\begin{align} \dfrac{\partial u_i}{\partial t} &= -\dfrac{\nabla p}{\rho} - (u...