blob & KH tests again!

Turns out I was running my BLOB tests incorrectly by not telling gadget that the box size was not a cube. The periodic box was supposed to be x,y,z=[2000,2000,6000] but was simply registering as [2000,2000,2000]. Initially I didn’t think this would pose a problem since it was a periodic box, but I forgot to take into account the shockwaves propagating back into the initial blob and causing some unwanted disturbances. Anyway, by switching on three parameters in the makefile:

-DLONG_X=1.
-DLONG_Y=1.
-DLONG_Z=3.
I was able to easily fix this problem so the box was properly structured. After a day’s worth of testing I ended up with some nice results:
where we see that both DISPH cases do much better than the vanilla SPH case.
UPDATE(7/26/13)! Movie of a high-res blob test zoomed in on the blob:
In other news I made a longer KH instability movie, this time in 1080p!
these movies were created with ffmpeg, the settings to create a slightly smaller and ‘more compatible’ youtube file are as follows:
ffmpeg -r 12 -i splash_%04d.png -c:v libx264 -crf 1 -pix_fmt
yuv420p -r 30 output.mp4
where the -crf is the constant rate factor; a value of 0 is no compression where a value of 50 is maximum compression. The -pix_fmt command has something to do with downsampling. I got all of this from a forum post.

bash math!

In doing some Kelvin-Helmholtz comparisons I have been trying to cook up a script that can stitch two movies together with ffmpeg. In order to determine how many frames I need I must do a simple subtraction in bash, but how?! Easy apparently…you just:

#!/bin/bash
BEG=10
END=400
NUM=$((END-BEG))
echo $NUM

and it will return the value 390. So how about that ffmpeg script?!

#!/bin/bash

FPS=12

BEG=10
END=50

DIR1=.
DIR2=.

PREFIX1=splash\_%04d.png
PREFIX2=splash\_%04d.png

MOV1=1.mov
MOV2=2.mov
FINAL=SIDEBYSIDE.mov

NUM=$((END-BEG))

if [ $END -gt 0 ]
  then
  PARAM="-vframes $NUM"
  else
  PARAM=""
fi

ffmpeg -start\_number $BEG -r $FPS -i $DIR1/$PREFIX1 $PARAM -vcodec qtrle $MOV1
ffmpeg -start\_number $BEG -r $FPS -i $DIR2/$PREFIX2 $PARAM -vcodec qtrle $MOV2

## SIDE BY SIDE ##
ffmpeg -i $MOV2 -vf "movie=$MOV1 [in1]; [in]pad=iw\*2:ih:iw:0[in0]; [in0][in1] overlay=0:0 [out]" -vcodec qtrle $FINAL
Here’s the end result: