Incompressible fluid model (WK04)

This program simulates cold pools and gravity currents in a two-dimensional, non-divergent fluid (Weisman and Klemp 2004).

See the detail including the formulation in the manual documentation.

To evaluate the spacial derivation, a finite difference method is used.

Time integration is performed for vorticity and buoyancy, and horizontal wind velocities are diagnosed throughout a stream function which is given by a non-divergent relation.

Files

solver.f90 -> main program.

Running the program

Depend

  • STPK library (math library for time integration)
  • NetCDF library (data format library for output data)
  • gtool5 library (wrapper library for NetCDF library)

In order to draw the result, you can use any drawing tools supporing the NetCDF format.

Edit Mkinclude

  • Edit Mkinclude file in the parent directory, depending your system environment.

Make the executable program

$ make      # WK04 (main program) is made.

Edit namelist file

namelist.nml : a configuration file to integrate. it is used in WK04 program.

nx = 960    ! X-coordinate grid number
ny = 80    ! Y-coordinate grid number
nt = 10000 ! calculating time step
xmin = -12.0  ! X-coordinate original point
ymin = 0.0  ! Y-coordinate original point
dx = 0.025    ! X-coordinate grid interval [m]
dy = 0.025    ! Y-coordinate grid interval [m]
dt = 0.001  ! time interval [s]
dmpstp = 100  ! dumping time step
            ! dumping time interval is equal to "dmpstp * dt"
finame = "" ! initial data file name.
            ! if there is no, automatically, 
            ! being made by the program.
foname = "result.nc"      ! result data
inner_file = 'colum.txt'  ! inner boundary file
time_flag = '1'  ! time scheme :
                 ! [1] = 4th order's Runge-Kutta
                 ! [2] = Leap Frog
                 ! [3] = 1th Explicit Euler
undef = -999.0   ! undefined value
init_type = 'psi'  ! the tpe of initial value.
                   ! 'psi' = strem line, 'omg' = vorticity.
ubar = 0.5         ! mean flow [m/s]
eps = 1.0e-3       ! convergent condition for poisson solver
nu = 0.002         ! diffusion coefficient

Running

$ export OMP_NUM_THREADS=[number]  # (if any,) you can use OpenMP.
$ ./WK04 < namelist.nml          # starting time integration.

The result of time integration is output in a file which is set in "foname" variable in namelist.nml

  • demo animation
    • Color and contour denote buoyancy and horizontal vorticity, respectively.
    • The configuration shown in the above is used in this calculation..


Return