18 November 2010

Imminent (but probably dizzy) bundle o' joy

My wife amazes me most days. Today especially.

The bump's our son. He should be arriving in the next three to seven weeks.

12 November 2010

GNU Parallel

I discovered GNU Parallel today.  Phenomenal.  Especially for simple post processing on multicore systems.  Watch the video-- it is quite good.  Here are three sample commands taken from a bash script where $1 is set to be a particular prefix...

parallel --eta -j +0 ./gnuplot.sh -g -F {} $1.r???? ::: `seq 1 8`
Runs a custom gnuplot-based shell script eight times against a file glob.  Each time provide a different argument in the  set {1,2,...,7,8}.  The results are stored as $1.f1.gif, $1.f2.gif, etc.
ls -1 $1.r???? | parallel --eta -j +0 'montage -geometry 1280x960 -tile 4x2 {}.f?.gif {}.miff'
Create a tiled montage of the eight output files mentioned above and store the result in $1.miff.
ls -1 $1.r???? | parallel --eta -j +0 'convert {}.miff {}.gif'
Convert the resulting MIFFs into GIFs.

I win.  On my system, 8 - 0.

15 October 2010

Fortran generic interface mixed with iso_c_binding

I'm going crazy trying to figure out some Fortran generic interface funkiness. The compiler's complaining that a function call doesn't match a generic interface despite the fact that only one module procedure statement is in the interface block and the same damned code compiles when I write the concrete procedure name instead of the generic name.

Just so I've got it later, this happens to work:

module testing

  use, intrinsic :: iso_c_binding, only: c_float, c_double
  private :: c_float, c_double

  interface test
    module procedure test1
    module procedure test2
  end interface

contains

  real(c_float) function test1 (x)
    real(c_float), intent(in) :: x(*)
    test1 = 2 * x(1)
  end function test1

  real(c_double) function test2 (x)
    real(c_double), intent(in) :: x(*)
    test2 = 2 * x(1)
  end function test2

end module testing

program main
  use testing
  implicit none
  real(4) :: s(1)
  real(8) :: d(1)
  s = 2.0
  d = 2d0
  write (*,*) test(s)
  write (*,*) test(d)
end program main
This snippet, however, is not the thing that's breaking...

17 September 2010

APS DFD 2010 abstract

From the APS DFD 2010 schedule:

Session AW: Instability: Richtmyer-Meshkov/Rayleigh-Taylor I


8:00 AM–10:10 AM, Sunday, November 21, 2010
Hyatt Regency Long Beach Room: Regency C

Chair: Arindam Banerjee, Missouri University of Science & Technology

Abstract: AW.00010 : Comparisons of a Reynolds-Averaged Navier--Stokes Model with Self-Similar Solutions for Large Atwood Number Rayleigh--Taylor Mixing

9:57 AM–10:10 AM
Preview Abstract

Authors:

  Rhys Ulerich
    (University of Texas at Austin)
 
  Oleg Schilling
    (Lawrence Livermore National Laboratory 

A new high-order, multicomponent, weighted essentially nonoscillatory (WENO) implementation of a three- and four- equation Reynolds-averaged Navier-Stokes (RANS) model incorporating both mechanical and scalar turbulence is used to simulate intermediate-to-large Atwood number Rayleigh-Taylor turbulent mixing. The predicted RANS mixing layer evolution is compared with the analytical self-similar solutions of the transport equations. The terms in the transport equation budgets are compared in detail to their self-similar profiles across the mixing layer. Additionally, the sensitivity of the RANS solutions to variations in the initial conditions and in the model coefficients is explored. The implications of these results for advanced modeling of Rayleigh-Taylor turbulent mixing are discussed.