Nicholson Canyon Simulation
From Gerris
(Difference between revisions)
| Revision as of 23:02, 4 August 2011 EmilyMLane (Talk | contribs) (→Creating Solid Block) ← Previous diff |
Revision as of 04:05, 9 August 2011 EmilyMLane (Talk | contribs) (→Creating Solid Block) Next diff → |
||
| Line 3: | Line 3: | ||
| <source lang=bash> | <source lang=bash> | ||
| # Generating points using .awk file | # Generating points using .awk file | ||
| - | awk -f nic holson.awk > points.tmp | + | awk -f nicholson.awk > points.tmp |
| # Delaunay triangulation and transformation using gts tools | # Delaunay triangulation and transformation using gts tools | ||
| ( wc points.tmp | awk '{print $1" 0 0"}'; cat points.tmp ) | gtsdelaunay -d | gtstransform --rx=-90 > nichol_test.gts | ( wc points.tmp | awk '{print $1" 0 0"}'; cat points.tmp ) | gtsdelaunay -d | gtstransform --rx=-90 > nichol_test.gts | ||
Revision as of 04:05, 9 August 2011
Creating Solid Block
# Generating points using .awk file
awk -f nicholson.awk > points.tmp
# Delaunay triangulation and transformation using gts tools
( wc points.tmp | awk '{print $1" 0 0"}'; cat points.tmp ) | gtsdelaunay -d | gtstransform --rx=-90 > nichol_test.gts
# Shifting points to the domain boundary
sed -e "s/ -0.0168/0/g" < nichol_test.gts > nichol_testout.gts
The .awk file used to generate the points is
BEGIN {
a=0.272
b=1.7
alpha=atan2(a,b);
h=a*cos(alpha);
l1=b*cos(alpha);
l2=a*sin(alpha);
for (k=0; k <= 100; k++) {
for (i=-1; i <= 100; i++) { printf("%5.4f %5.4f %5.4f\n",l1*i/100, -
0.85+1.7*k/100 , h*i/100) }
for (i=1; i <= 101; i++) { printf("%5.4f %5.4f %5.4f\n",l1+l2*i/100,
-0.85+1.7*k/100, h*(1-i/100)) }
}
dx=1.0e-4
k=0.
j=-1.
for (i=-1; i <= 100; i++) { printf("%5.4f %5.4f %5.4f\n",l1*i/100, -0.
85+1.7*k/100-dx,h*j/100) }
for (i=1; i <= 101; i++) { printf("%5.4f %5.4f %5.4f\n",l1+l2*i/100, -
0.85+1.7*k/100-dx,h*j/100) }
k=100.
for (i=-1; i <= 100; i++) { printf("%5.4f %5.4f %5.4f\n",l1*i/100, -0.
85+1.7*k/100+dx,h*j/100) }
for (i=1; i <= 101; i++) { printf("%5.4f %5.4f %5.4f\n",l1+l2*i/100, -
0.85+1.7*k/100+dx,h*j/100) }
}

