Thursday, 5 June 2014
Friday, 30 May 2014
Colour directories in bash
export LS_COLORS='di=00'
Works!
export LS_COLORS='di=07'
is clear.
Works!
export LS_COLORS='di=07'
is clear.
0 = default colour 1 = bold 4 = underlined 5 = flashing text 6 = no change 7 = reverse field 8 = black 9 = strikethrough 10 - 29= no change 30 = light green 31 = red 32 = green 33 = orange 34 = blue 35 = purple 36 = cyan 37 = grey 38 = underline 39 = no change 40 = black background 41 = red background 42 = green background 43 = orange background 44 = blue background 45 = purple background 46 = cyan background 47 = grey background 90 = dark grey 91 = light red 92 = light green 93 = yellow 94 = light blue 95 = light purple 96 = turquoise 100 = dark grey background 101 = light red background 102 = light green background 103 = yellow background 104 = light blue background 105 = light purple background 106 = turquoise background
Tuesday, 29 April 2014
Wednesday, 16 April 2014
Thursday, 10 April 2014
Amusing kung-fu episodes
Sifu: Use this defence if someone attacks you with a knife like this ...
Student: But what if it was like this instead ...
Sifu: Well we were talking about a certain situation, but in your instance you could ...
Student: What if he had two knives?
Sifu: ...
Student: What if one of the knives was a bunch of flowers and the person had really bad hayfever?
Student: But what if it was like this instead ...
Sifu: Well we were talking about a certain situation, but in your instance you could ...
Student: What if he had two knives?
Sifu: ...
Student: What if one of the knives was a bunch of flowers and the person had really bad hayfever?
Tuesday, 25 March 2014
openFoam wisdom
Specify velocity AND pressure at a boundary and expect continuity errors. Set zero gradient (not non-zero gradient) and velocity.
------------------
Calculate initial k and epsilon values with this script:
#!/bin/sh
echo ' ==========================================='
echo ' give me Uref, Turbulent Intensity and L'
echo ' I will give you TKE and epsilon for inlet'
echo ' ==========================================='
###
Uref=$1
ti=$2
L=$3
tke=$(echo "scale=4;1.5 *($Uref * $ti)^2"|bc -l )
epsilon=$(echo "scale=4;0.09^(3/4)*$tke^(3/2)/$L"|bc -l)
echo 'tke =' $tke
echo 'eps =' $epsilon
(matejfor, http://www.cfd-online.com/Forums/openfoam-solving/57839-simplefoam-time-step-continuity-errors.html)
------------------
------------------
Calculate initial k and epsilon values with this script:
#!/bin/sh
echo ' ==========================================='
echo ' give me Uref, Turbulent Intensity and L'
echo ' I will give you TKE and epsilon for inlet'
echo ' ==========================================='
###
Uref=$1
ti=$2
L=$3
tke=$(echo "scale=4;1.5 *($Uref * $ti)^2"|bc -l )
epsilon=$(echo "scale=4;0.09^(3/4)*$tke^(3/2)/$L"|bc -l)
echo 'tke =' $tke
echo 'eps =' $epsilon
(matejfor, http://www.cfd-online.com/Forums/openfoam-solving/57839-simplefoam-time-step-continuity-errors.html)
------------------
Subscribe to:
Posts (Atom)