Effect of flow on the acoustic resonances of an open-ended duct
J. Acoust. Soc. Am. Volume 58, Issue 4, pp. 788-793 (October 1975)
Issue Date: October 1975
Acoustic waves in ducts with sinusoidally perturbed walls and mean flow
Nayfeh, A. H.
Acoustical Society of America, Journal, vol. 57, May 1975, p. 1036-1039.
Title:
Standing acoustic waves in a low Mach number shear flow
Authors:
Wang, Meng; Kassoy, David R.
@ARTICLE{art:Yeh64,
author = "Y. Yeh and H. Z. Cummins",
title = "Localised flow measurements with an He-Ne laser spectrometer",
journal = "Applied Physics Letters",
year = "1964",
volume = "4",
pages = "176",
note = "I can't get this one online",
}
Tuesday, 31 March 2009
DIsplay elements / polar setup, PAFEC
Copy the Python code into an interpreter, execute it. Copy the output to a NODES
section. First the display, then, an uncoupled BE, over a circular region, raised slightly from
z=0.
c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c DISPLAY
c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c Python script for node generation.
c from math import *
c def n():
c r, o, n0 = 0.025, [0, 0, 2E-3], 100 # radius, origin, 0th node.
c for i in xrange(360 + 1):
c x = o[0] + r * cos(0.5 * i * 2 * pi / 360)
c y = o[1] + 0
c z = o[2] + r * sin(0.5 * i * 2 * pi / 360)
c print n0 + i, x, y, z
c print n0 + i + 1, o[0] + r / 2, o[1], o[2]
c print n0 + i + 2, o[0] + r / 2, o[1], o[2] + r / 2
c print n0 + i + 3, o[0] + 0 / 2, o[1], o[2] + r / 2
c print n0 + i + 4, o[0] - r / 2, o[1], o[2] + r / 2
c print n0 + i + 5, o[0] - r / 2, o[1], o[2]
c print n0 + i + 6, o[0], o[1], o[2]
c print
c for i in xrange(360 + 1):
c x = o[0] + 0
c y = o[1] + r * cos(0.5 * i * 2 * pi / 360)
c z = o[2] + r * sin(0.5 * i * 2 * pi / 360)
c print 400 + n0 + i, x, y, z
c print 400 + n0 + i + 1, o[0], o[1] + r / 2, o[2]
c print 400 + n0 + i + 2, o[0], o[1] + r / 2, o[2] + r / 2
c print 400 + n0 + i + 3, o[0], o[1] + 0 / 2, o[2] + r / 2
c print 400 + n0 + i + 4, o[0], o[1] - r / 2, o[2] + r / 2
c print 400 + n0 + i + 5, o[0], o[1] - r / 2, o[2]
c print 400 + n0 + i + 6, o[0], o[1], o[2]
c print
c for i in xrange(360 + 1):
c x = o[0] + r * cos(0.5 * i * 2 * pi / 360)
c y = o[1] + r * sin(0.5 * i * 2 * pi / 360)
c z = o[2] + 0
c print 800 + n0 + i, x, y, z
c print 800 + n0 + i + 1, o[0] + r / 2, o[1], o[2]
c print 800 + n0 + i + 2, o[0] + r / 2, o[1] + r / 2, o[2]
c print 800 + n0 + i + 3, o[0] + 0 / 2, o[1] + r / 2, o[2]
c print 800 + n0 + i + 4, o[0] - r / 2, o[1] + r / 2, o[2]
c print 800 + n0 + i + 5, o[0] - r / 2, o[1], o[2]
c print 800 + n0 + i + 6, o[0], o[1], o[2]
PAFBLOCKS
BLOCK GROUP ELEMENT.TYPE PROP N1 N2 TOPO
1 1 24720 11 <'dm'> <'dm'> 462 190 461 100 0 0 145
2 1 24720 11 <'dm'> <'dm'> 280 190 463 462 235
3 1 24720 11 <'dm'> <'dm'> 370 280 464 463 325
4 1 24720 11 <'dm'> <'dm'> 370 464 460 465 0 415
5 1 24720 11 <'dm'> <'dm'> 463 462 466 461
6 1 24720 11 <'dm'> <'dm'> 464 463 465 466
7 2 24720 11 <'dm'> <'dm'> <462+400> <190+400> <461+400> <100+400> 0 0 <145+400>
8 2 24720 11 <'dm'> <'dm'> <280+400> <190+400> <463+400> <462+400> <235+400>
9 2 24720 11 <'dm'> <'dm'> <370+400> <280+400> <464+400> <463+400> <325+400>
10 2 24720 11 <'dm'> <'dm'> <370+400> <464+400> <460+400> <465+400> 0 <415+400>
11 2 24720 11 <'dm'> <'dm'> <463+400> <462+400> <466+400> <461+400>
12 2 24720 11 <'dm'> <'dm'> <464+400> <463+400> <465+400> <466+400>
c 13 3 24720 11 <'xm'> <'xm'> <462+800> <190+800> <461+800> <100+800> 0 0 <145+800>
c 14 3 24720 11 <'xm'> <'xm'> <280+800> <190+800> <463+800> <462+800> <235+800>
c 15 3 24720 11 <'xm'> <'xm'> <370+800> <280+800> <464+800> <463+800> <325+800>
c 16 3 24720 11 <'xm'> <'xm'> <370+800> <464+800> <460+800> <465+800> 0 <415+800>
c 17 3 24720 11 <'xm'> <'xm'> <463+800> <462+800> <466+800> <461+800>
c 18 3 24720 11 <'xm'> <'xm'> <464+800> <463+800> <465+800> <466+800>
c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c BE
c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c r, z0 = 4.75E-3, 1E-3
c def n2():
c for i in xrange(17):
c print i+1, r * cos (i/16. * 2 * pi), r * sin (i/16. * 2 * pi), z0
c print 17, r/2, 0, z0
c print 18, r/2, r/2, z0
c print 19, 0, r/2, z0
c print 20, -r/2, r/2, z0
c print 21, -r/2, 0, z0
c print 22, -r/2, -r/2, z0
c print 23, 0, -r/2, z0
c print 24, r/2, -r/2, z0
c print 25, 0, 0, z0
c for i in xrange(31, 46 + 1):
c print i, r * cos ((i - 31) / 16. * 2 * pi), r * sin ((i - 31) / 16. * 2 * pi), 0
PAFBLOCKS
BOUNDARY.ELEMENT = 1000
GROUP ELEMENT.TYPE PROP N1 N2 TOPO
c top face
4 24620 11 <'xm'> <'xm'> 18 3 17 1 0 0 2
4 24620 11 <'xm'> <'xm'> 5 3 19 18 4
4 24620 11 <'xm'> <'xm'> 7 5 20 19 6
4 24620 11 <'xm'> <'xm'> 7 20 9 21 0 8
4 24620 11 <'xm'> <'xm'> 9 21 11 22 0 10
4 24620 11 <'xm'> <'xm'> 22 23 11 13 0 0 0 12
4 24620 11 <'xm'> <'xm'> 23 24 13 15 0 0 0 14
4 24620 11 <'xm'> <'xm'> 17 1 24 15 0 0 16
4 24620 11 <'xm'> <'xm'> 19 18 25 17
4 24620 11 <'xm'> <'xm'> 20 19 21 25
4 24620 11 <'xm'> <'xm'> 21 25 22 23
4 24620 11 <'xm'> <'xm'> 25 17 23 24
c side face
4 24620 11 <'xm'> 1 1 3 31 33 2 0 0 32
4 24620 11 <'xm'> 1 <1+1*2> <3+1*2> <31+1*2> <33+1*2> <2+1*2> 0 0 <32+1*2>
4 24620 11 <'xm'> 1 <1+2*2> <3+2*2> <31+2*2> <33+2*2> <2+2*2> 0 0 <32+2*2>
4 24620 11 <'xm'> 1 <1+3*2> <3+3*2> <31+3*2> <33+3*2> <2+3*2> 0 0 <32+3*2>
4 24620 11 <'xm'> 1 <1+4*2> <3+4*2> <31+4*2> <33+4*2> <2+4*2> 0 0 <32+4*2>
4 24620 11 <'xm'> 1 <1+5*2> <3+5*2> <31+5*2> <33+5*2> <2+5*2> 0 0 <32+5*2>
4 24620 11 <'xm'> 1 <1+6*2> <3+6*2> <31+6*2> <33+6*2> <2+6*2> 0 0 <32+6*2>
4 24620 11 <'xm'> 1 <1+7*2> 1 <31+7*2> 31 <2+7*2> 0 0 <32+7*2>
An alternative approach is to get PAFEC to generate the
nodes, and use triangles.
c polar extraction. Define three nodes, for arc definition. 1 node per dgree.
NODES
NODE AXIS X Y
300 3 0.018 0 c on axis.
345 3 0.018 45
390 3 0.018 90 c 90 degrees off axis
391 3 0.000 0 c on axis, 0 radius, for display elements.
ARC.NODES
LIST.OF.NODES.ON.ARC
300 301 302 303 304 305 306 307 308 309
* 310 311 312 313 314 315 316 317 318 319
* 320 321 322 323 324 325 326 327 328 329
* 330 331 332 333 334 335 336 337 338 339
* 340 341 342 343 344 345 346 347 348 349
* 350 351 352 353 354 355 356 357 358 359
* 360 361 362 363 364 365 366 367 368 369
* 370 371 372 373 374 375 376 377 378 379
* 380 381 382 383 384 385 386 387 388 389
* 390
c observation elements.
PAFBLOCKS
BLOCK TYPE GROUP ELEMENT PROP N1 N2 N3 TOPO
56 2 7 24710 13 15 15 15 391 300 390 0 345
Monday, 30 March 2009
translating nodes in PAFEC
Given a data file, with nodes defined:
a = file('ct1b.DAT')
b = a.readlines()
c = b[36:500] # only node entries
d = [i.strip('\n').split(' ') for i in c]
e = []
for i in d:
tmp = [float(j) for j in i]
e.append(tmp)
f = array(e)
f[:, 2] = f[:, 2] + 0.001 # apply offset
for i in f:
print str(i).strip('[]') # copy and paste.
Thursday, 26 March 2009
Formatting in this blog
Leading spaces tend to be lost. Add < p r e > to the start, and < / p r e > to the end, to preserve them.
Python scripts called from $
An example:
import sys
if __name__ == '__main__':
# Executed, only if called from command line.
args = sys.argv
if len(args) == 1:
print 'No argument specified. call as filename.py'
exit()
else:
print 'Argument(s) provided: ', args
Tuesday, 24 March 2009
PGFplots error bars.
Building Engrid on Ubuntu Hardy
from https://sourceforge.net/mailarchive/forum.php?forum_name=engrid-users&max_rows=100&style=nested&viewmonth=200903&viewday=3
First, make sure you have the build dependencies:
/================
sudo apt-get install libvtk5 libvtk5-dev libvtk5-qt4 libvtk5-qt4-dev
libqt4-dev
================
/
Second, if you have qt3 dev files installed too, there might be a
conflict with qmake-qt3. So just run one of the following commands:
(I used the second command on my laptop. I'm not sure if the first one
works, but it should based on what I've read.)
/================
update-alternatives --install /usr/bin/qmake qmake "/usr/bin/qmake-qt4"
"50" --slave /usr/share/man/man1/qmake.1.gz qmake.1.gz
"/usr/share/man/man1/qmake-qt4.1.gz"
================
/or
/================
ln -sf /usr/bin/qmake-qt4 /usr/bin/qmake
================
/
To make sure the rest will work, check that /usr/bin/qmake is a link to
/usr/bin/qmake-qt4:
/================
[29][~]$ ls -l /usr/bin/qmake
lrwxrwxrwx 1 root root 18 Mar 3 12:04 /usr/bin/qmake -> /usr/bin/qmake-qt4
================
/
Check out the CVS:
/================
cvs -d:pserver:anonymous@en...:/cvsroot/engrid login
cvs -d:pserver:anonymous@en...:/cvsroot/engrid co src
cd src
================
/
Then you'll need to set up the environment before running qmake:
/================
export VTKLIBDIR=/usr/lib/
export VTKINCDIR=/usr/include/vtk-5.0/
export LD_LIBRARY_PATH=$VTKLIBDIR:$LD_LIBRARY_PATH
================
/I wrote a convenience script for this, which you can use instead if you
wish:
/================
source ./setup_paths.sh ubuntu
================
/
And finally, build netgen and engrid:
/================
./build-nglib.sh
qmake
make
================
/
Following an email from Oliver Gloth, I needed to re-compile. I did this,
as:
-----------------------
export VTKLIBDIR=/usr/lib/
export VTKINCDIR=/usr/include/vtk-5.0/
export LD_LIBRARY_PATH=$VTKLIBDIR:$LD_LIBRARY_PATH
and in ~/downloads/newengrid/src/
make clean
qmake
make
First, make sure you have the build dependencies:
/================
sudo apt-get install libvtk5 libvtk5-dev libvtk5-qt4 libvtk5-qt4-dev
libqt4-dev
================
/
Second, if you have qt3 dev files installed too, there might be a
conflict with qmake-qt3. So just run one of the following commands:
(I used the second command on my laptop. I'm not sure if the first one
works, but it should based on what I've read.)
/================
update-alternatives --install /usr/bin/qmake qmake "/usr/bin/qmake-qt4"
"50" --slave /usr/share/man/man1/qmake.1.gz qmake.1.gz
"/usr/share/man/man1/qmake-qt4.1.gz"
================
/or
/================
ln -sf /usr/bin/qmake-qt4 /usr/bin/qmake
================
/
To make sure the rest will work, check that /usr/bin/qmake is a link to
/usr/bin/qmake-qt4:
/================
[29][~]$ ls -l /usr/bin/qmake
lrwxrwxrwx 1 root root 18 Mar 3 12:04 /usr/bin/qmake -> /usr/bin/qmake-qt4
================
/
Check out the CVS:
/================
cvs -d:pserver:anonymous@en...:/cvsroot/engrid login
cvs -d:pserver:anonymous@en...:/cvsroot/engrid co src
cd src
================
/
Then you'll need to set up the environment before running qmake:
/================
export VTKLIBDIR=/usr/lib/
export VTKINCDIR=/usr/include/vtk-5.0/
export LD_LIBRARY_PATH=$VTKLIBDIR:$LD_LIBRARY_PATH
================
/I wrote a convenience script for this, which you can use instead if you
wish:
/================
source ./setup_paths.sh ubuntu
================
/
And finally, build netgen and engrid:
/================
./build-nglib.sh
qmake
make
================
/
Following an email from Oliver Gloth, I needed to re-compile. I did this,
as:
-----------------------
export VTKLIBDIR=/usr/lib/
export VTKINCDIR=/usr/include/vtk-5.0/
export LD_LIBRARY_PATH=$VTKLIBDIR:$LD_LIBRARY_PATH
and in ~/downloads/newengrid/src/
make clean
qmake
make
Sunday, 22 March 2009
To get:
@ARTICLE{art:Schewe,
AUTHOR = "G. Schewe",
TITLE = "On the force oscillations acting on a circular cylinder in
crossflow from subcritical up to transcritical Reynolds numbers",
YEAR = "1983",
JOURNAL = "J. Fluid Mech",
VOLUME = "133",
PAGES = "265--285",
NOTES = "From art:Travin. Domain length. Couldn't get this, paper copy?",
}
AUTHOR = "G. Schewe",
TITLE = "On the force oscillations acting on a circular cylinder in
crossflow from subcritical up to transcritical Reynolds numbers",
YEAR = "1983",
JOURNAL = "J. Fluid Mech",
VOLUME = "133",
PAGES = "265--285",
NOTES = "From art:Travin. Domain length. Couldn't get this, paper copy?",
}
Monday, 16 March 2009
String table to list
a = file('filename')
b = a.readlines()
c = b[3:86] # extract relevant rows
# list of lists, assuming space separated values, stripping
# empty strings.
d = [[j for j in i.split(' ') if j != ''] for i in c] # lists of strings
d = [[float(j) for j in i.split(' ') if j != ''] for i in c] # lists of floats
d can be converted to an array, if desired. :)
b = a.readlines()
c = b[3:86] # extract relevant rows
# list of lists, assuming space separated values, stripping
# empty strings.
d = [[j for j in i.split(' ') if j != ''] for i in c] # lists of strings
d = [[float(j) for j in i.split(' ') if j != ''] for i in c] # lists of floats
d can be converted to an array, if desired. :)
Wednesday, 11 March 2009
list - continuous file cat
#!/bin/bash
# Display the file provided as filename, every second.
while [ 1 ]
do
clear
cat $1
sleep 1
done
# Display the file provided as filename, every second.
while [ 1 ]
do
clear
cat $1
sleep 1
done
Wednesday, 4 March 2009
Superimposed plots.
I was so amazed by this accident, I noted it:
\begin{figure}[htbp]\begin{center} % pressure vs x.
\mbox{
%\hspace{-1.5cm}
\tikzstyle{every axis legend}+= [at={(0.98,0.02)},anchor=south east] % im is 0,0 to 1,1
\begin{tikzpicture}
\begin{semilogyaxis}[width=\hplotw,height=\ploth,
ymin = 30, ymax = 300000,
xlabel={$x/l$}, ylabel={$|p|$},grid=major]
% Peak search, so use last entry:
% m95acoub3 = mfile.File('m95acoub3.res'); m95acoub3.load()
% m95acoub5 = mfile.File('m95acoub5.res'); m95acoub5.load()
% r1 = m95acoub3.calc_PvX(findex=[-2 + -1*1j], y = -0.005, z = 0)
% r2 = m95acoub5.calc_PvX(findex=[-2 + -1*1j], y = 0, z = 0)
% tmp = reference.dumptex(r1[0] / 0.05, abs(r1[1]))
% tmp = reference.dumptex(r2[0] / 0.05, abs(r2[1]))
% 0 flow:
\addplot[color = black] plot coordinates {(-5.00000e-01,4.68522e+03) (-4.87180e-01,6.14709e+03) (-4.74360e-01,7.63048e+03) (-4.61540e-01,9.06362e+03) (-4.48720e-01,1.04245e+04) (-4.35900e-01,1.17104e+04) (-4.23080e-01,1.29284e+04) (-4.10260e-01,1.40937e+04) (-3.97440e-01,1.52292e+04) (-3.84620e-01,1.63611e+04) (-3.71800e-01,1.75145e+04) (-3.58980e-01,1.87069e+04) (-3.46160e-01,1.99447e+04) (-3.33340e-01,2.12216e+04) (-3.20520e-01,2.25230e+04) (-3.07700e-01,2.38275e+04) (-2.94880e-01,2.51120e+04) (-2.82060e-01,2.63557e+04) (-2.69240e-01,2.75383e+04) (-2.56420e-01,2.86456e+04) (-2.43580e-01,2.96665e+04) (-2.30760e-01,3.05936e+04) (-2.17940e-01,3.14303e+04) (-2.05120e-01,3.21815e+04) (-1.92300e-01,3.28633e+04) (-1.79480e-01,3.34925e+04) (-1.66660e-01,3.40869e+04) (-1.53840e-01,3.46601e+04) (-1.41020e-01,3.52191e+04) (-1.28200e-01,3.57652e+04) (-1.15380e-01,3.62941e+04) (-1.02560e-01,3.67997e+04) (-8.97400e-02,3.72757e+04) (-7.69200e-02,3.77161e+04) (-6.41000e-02,3.81118e+04) (-5.12800e-02,3.84556e+04) (-3.84600e-02,3.87364e+04) (-2.56400e-02,3.89444e+04) (-1.28200e-02,3.90741e+04) (0.00000e+00,3.91589e+04) (1.28200e-02,3.90741e+04) (2.56400e-02,3.89444e+04) (3.84600e-02,3.87364e+04) (5.12800e-02,3.84556e+04) (6.41000e-02,3.81118e+04) (7.69200e-02,3.77161e+04) (8.97400e-02,3.72757e+04) (1.02560e-01,3.67997e+04) (1.15380e-01,3.62941e+04) (1.28200e-01,3.57652e+04) (1.41020e-01,3.52191e+04) (1.53840e-01,3.46601e+04) (1.66660e-01,3.40869e+04) (1.79480e-01,3.34925e+04) (1.92300e-01,3.28633e+04) (2.05120e-01,3.21815e+04) (2.17940e-01,3.14303e+04) (2.30760e-01,3.05936e+04) (2.43580e-01,2.96665e+04) (2.56420e-01,2.86456e+04) (2.69240e-01,2.75383e+04) (2.82060e-01,2.63557e+04) (2.94880e-01,2.51120e+04) (3.07700e-01,2.38275e+04) (3.20520e-01,2.25230e+04) (3.33340e-01,2.12216e+04) (3.46160e-01,1.99447e+04) (3.58980e-01,1.87069e+04) (3.71800e-01,1.75145e+04) (3.84620e-01,1.63611e+04) (3.97440e-01,1.52292e+04) (4.10260e-01,1.40937e+04) (4.23080e-01,1.29284e+04) (4.35900e-01,1.17104e+04) (4.48720e-01,1.04245e+04) (4.61540e-01,9.06362e+03) (4.74360e-01,7.63048e+03) (4.87180e-01,6.14709e+03) (5.00000e-01,4.68522e+03)};
\addplot[color = red] plot coordinates {(-5.00000e-01,3.32899e+02) (-4.87180e-01,3.99514e+02) (-4.74360e-01,4.43786e+02) (-4.61540e-01,4.56559e+02) (-4.48720e-01,4.35594e+02) (-4.35900e-01,3.85809e+02) (-4.23080e-01,3.19156e+02) (-4.10260e-01,2.58352e+02) (-3.97440e-01,2.36882e+02) (-3.84620e-01,2.68063e+02) (-3.71800e-01,3.22661e+02) (-3.58980e-01,3.67617e+02) (-3.46160e-01,3.83471e+02) (-3.33340e-01,3.60929e+02) (-3.20520e-01,2.98806e+02) (-3.07700e-01,2.07038e+02) (-2.94880e-01,1.35031e+02) (-2.82060e-01,2.02836e+02) (-2.69240e-01,3.54802e+02) (-2.56420e-01,5.19014e+02) (-2.43580e-01,6.72321e+02) (-2.30760e-01,8.02972e+02) (-2.17940e-01,9.05292e+02) (-2.05120e-01,9.78824e+02) (-1.92300e-01,1.02744e+03) (-1.79480e-01,1.05767e+03) (-1.66660e-01,1.07661e+03) (-1.53840e-01,1.09065e+03) (-1.41020e-01,1.10627e+03) (-1.28200e-01,1.13312e+03) (-1.15380e-01,1.18722e+03) (-1.02560e-01,1.28987e+03) (-8.97400e-02,1.45928e+03) (-7.69200e-02,1.70049e+03) (-6.41000e-02,2.00269e+03) (-5.12800e-02,2.34454e+03) (-3.84600e-02,2.70219e+03) (-2.56400e-02,3.06038e+03) (-1.28200e-02,3.41724e+03) (0.00000e+00,4.35428e+03) (1.28200e-02,3.46603e+03) (2.56400e-02,3.23861e+03) (3.84600e-02,3.04073e+03) (5.12800e-02,2.82875e+03) (6.41000e-02,2.58640e+03) (7.69200e-02,2.31553e+03) (8.97400e-02,2.02851e+03) (1.02560e-01,1.74376e+03) (1.15380e-01,1.47984e+03) (1.28200e-01,1.25361e+03) (1.41020e-01,1.08218e+03) (1.53840e-01,9.89661e+02) (1.66660e-01,1.00326e+03) (1.79480e-01,1.12870e+03) (1.92300e-01,1.33752e+03) (2.05120e-01,1.58679e+03) (2.17940e-01,1.83747e+03) (2.30760e-01,2.06103e+03) (2.43580e-01,2.23955e+03) (2.56420e-01,2.36536e+03) (2.69240e-01,2.43945e+03) (2.82060e-01,2.46702e+03) (2.94880e-01,2.45381e+03) (3.07700e-01,2.40274e+03) (3.20520e-01,2.31495e+03) (3.33340e-01,2.19285e+03) (3.46160e-01,2.04782e+03) (3.58980e-01,1.90509e+03) (3.71800e-01,1.80440e+03) (3.84620e-01,1.78480e+03) (3.97440e-01,1.85723e+03) (4.10260e-01,1.99089e+03) (4.23080e-01,2.13114e+03) (4.35900e-01,2.22497e+03) (4.48720e-01,2.23423e+03) (4.61540e-01,2.13874e+03) (4.74360e-01,1.93600e+03) (4.87180e-01,1.64131e+03) (5.00000e-01,1.30148e+03)};
\legend{non-flared\\flared\\}
\end{semilogyaxis} %\end{tikzpicture}% }
% \tikzstyle{every axis legend}+= [at={(0.02,0.02)},anchor=north west] % im is 0,0 to 1,1
% \begin{tikzpicture}
\begin{axis}[
axis x line=middle,
axis y line=right,
width=\hplotw,height=\ploth,
xlabel={$x/l$},
ylabel={$\theta$},grid=major,
ytick ={-3.14, -1.57, 1.57, 3.14},
yticklabels={$-\pi$, $-\frac{\pi}{2}$, $\frac{\pi}{2}$ , $\pi$},
ymin=-3.14, ymax=3.14]
% use code above, but with reference.ang() instead of abs()
% tmp = reference.dumptex(r1[0] / 0.05, reference.ang(r1[1]))
% tmp = reference.dumptex(r2[0] / 0.05, reference.ang(r2[1]))
\addplot[color = black] plot coordinates {(-5.00000e-01,-2.35766e+00) (-4.87180e-01,-2.06355e+00) (-4.74360e-01,-1.96624e+00) (-4.61540e-01,-1.91584e+00) (-4.48720e-01,-1.88530e+00) (-4.35900e-01,-1.86182e+00) (-4.23080e-01,-1.83907e+00) (-4.10260e-01,-1.81398e+00) (-3.97440e-01,-1.78565e+00) (-3.84620e-01,-1.75475e+00) (-3.71800e-01,-1.72302e+00) (-3.58980e-01,-1.69275e+00) (-3.46160e-01,-1.66619e+00) (-3.33340e-01,-1.64511e+00) (-3.20520e-01,-1.63043e+00) (-3.07700e-01,-1.62221e+00) (-2.94880e-01,-1.61967e+00) (-2.82060e-01,-1.62138e+00) (-2.69240e-01,-1.62554e+00) (-2.56420e-01,-1.63023e+00) (-2.43580e-01,-1.63363e+00) (-2.30760e-01,-1.63427e+00) (-2.17940e-01,-1.63116e+00) (-2.05120e-01,-1.62398e+00) (-1.92300e-01,-1.61300e+00) (-1.79480e-01,-1.59916e+00) (-1.66660e-01,-1.58387e+00) (-1.53840e-01,-1.56879e+00) (-1.41020e-01,-1.55562e+00) (-1.28200e-01,-1.54576e+00) (-1.15380e-01,-1.54012e+00) (-1.02560e-01,-1.53894e+00) (-8.97400e-02,-1.54179e+00) (-7.69200e-02,-1.54763e+00) (-6.41000e-02,-1.55491e+00) (-5.12800e-02,-1.56180e+00) (-3.84600e-02,-1.56638e+00) (-2.56400e-02,-1.56653e+00) (-1.28200e-02,-1.56033e+00) (0.00000e+00,-1.52345e+00) (1.28200e-02,-1.56033e+00) (2.56400e-02,-1.56653e+00) (3.84600e-02,-1.56638e+00) (5.12800e-02,-1.56180e+00) (6.41000e-02,-1.55491e+00) (7.69200e-02,-1.54763e+00) (8.97400e-02,-1.54179e+00) (1.02560e-01,-1.53894e+00) (1.15380e-01,-1.54012e+00) (1.28200e-01,-1.54576e+00) (1.41020e-01,-1.55562e+00) (1.53840e-01,-1.56879e+00) (1.66660e-01,-1.58387e+00) (1.79480e-01,-1.59916e+00) (1.92300e-01,-1.61300e+00) (2.05120e-01,-1.62398e+00) (2.17940e-01,-1.63116e+00) (2.30760e-01,-1.63427e+00) (2.43580e-01,-1.63363e+00) (2.56420e-01,-1.63023e+00) (2.69240e-01,-1.62554e+00) (2.82060e-01,-1.62138e+00) (2.94880e-01,-1.61967e+00) (3.07700e-01,-1.62221e+00) (3.20520e-01,-1.63043e+00) (3.33340e-01,-1.64511e+00) (3.46160e-01,-1.66619e+00) (3.58980e-01,-1.69275e+00) (3.71800e-01,-1.72302e+00) (3.84620e-01,-1.75475e+00) (3.97440e-01,-1.78565e+00) (4.10260e-01,-1.81398e+00) (4.23080e-01,-1.83907e+00) (4.35900e-01,-1.86182e+00) (4.48720e-01,-1.88530e+00) (4.61540e-01,-1.91584e+00) (4.74360e-01,-1.96624e+00) (4.87180e-01,-2.06355e+00) (5.00000e-01,-2.35766e+00)};
\addplot[color = red] plot coordinates {(-5.00000e-01,-2.39191e+00) (-4.87180e-01,-1.97905e+00) (-4.74360e-01,-1.76609e+00) (-4.61540e-01,-1.59365e+00) (-4.48720e-01,-1.42560e+00) (-4.35900e-01,-1.22937e+00) (-4.23080e-01,-9.60545e-01) (-4.10260e-01,-5.52966e-01) (-3.97440e-01,3.70743e-03) (-3.84620e-01,5.21654e-01) (-3.71800e-01,8.75260e-01) (-3.58980e-01,1.11347e+00) (-3.46160e-01,1.29731e+00) (-3.33340e-01,1.46845e+00) (-3.20520e-01,1.67124e+00) (-3.07700e-01,2.01168e+00) (-2.94880e-01,2.86206e+00) (-2.82060e-01,-2.38036e+00) (-2.69240e-01,-1.95842e+00) (-2.56420e-01,-1.74308e+00) (-2.43580e-01,-1.58899e+00) (-2.30760e-01,-1.45615e+00) (-2.17940e-01,-1.33003e+00) (-2.05120e-01,-1.20522e+00) (-1.92300e-01,-1.08143e+00) (-1.79480e-01,-9.62879e-01) (-1.66660e-01,-8.57926e-01) (-1.53840e-01,-7.78091e-01) (-1.41020e-01,-7.35771e-01) (-1.28200e-01,-7.40577e-01) (-1.15380e-01,-7.93814e-01) (-1.02560e-01,-8.82979e-01) (-8.97400e-02,-9.83297e-01) (-7.69200e-02,-1.07004e+00) (-6.41000e-02,-1.12958e+00) (-5.12800e-02,-1.15916e+00) (-3.84600e-02,-1.16048e+00) (-2.56400e-02,-1.13204e+00) (-1.28200e-02,-1.07213e+00) (0.00000e+00,-8.08752e-01) (1.28200e-02,-1.18037e+00) (2.56400e-02,-1.35573e+00) (3.84600e-02,-1.49900e+00) (5.12800e-02,-1.61245e+00) (6.41000e-02,-1.70161e+00) (7.69200e-02,-1.76987e+00) (8.97400e-02,-1.82208e+00) (1.02560e-01,-1.86644e+00) (1.15380e-01,-1.91748e+00) (1.28200e-01,-1.99847e+00) (1.41020e-01,-2.13984e+00) (1.53840e-01,-2.36301e+00) (1.66660e-01,-2.64648e+00) (1.79480e-01,-2.92612e+00) (1.92300e-01,3.12351e+00) (2.05120e-01,2.93364e+00) (2.17940e-01,2.76916e+00) (2.30760e-01,2.61402e+00) (2.43580e-01,2.45740e+00) (2.56420e-01,2.29278e+00) (2.69240e-01,2.11678e+00) (2.82060e-01,1.92846e+00) (2.94880e-01,1.72840e+00) (3.07700e-01,1.51731e+00) (3.20520e-01,1.29426e+00) (3.33340e-01,1.05504e+00) (3.46160e-01,7.91544e-01) (3.58980e-01,4.94245e-01) (3.71800e-01,1.60178e-01) (3.84620e-01,-1.94055e-01) (3.97440e-01,-5.32686e-01) (4.10260e-01,-8.25365e-01) (4.23080e-01,-1.06481e+00) (4.35900e-01,-1.26019e+00) (4.48720e-01,-1.42583e+00) (4.61540e-01,-1.57719e+00) (4.74360e-01,-1.73328e+00) (4.87180e-01,-1.92784e+00) (5.00000e-01,-2.31238e+00) };
% share the legend with the previous plot.
%\legend{non-flared\\flared\\}
\end{axis} \end{tikzpicture}
}
\caption{blah blah}
\label{fig:m95acou4b_pvx} \end{center} \end{figure}
Dual axis:
\begin{figure}[htbp]\begin{center}
%$ phd
%import mfile
%a = mfile.catFile('axibal8f.n100pre', f0=30000, f1 = 40000, n = 200) # pre.
%b = mfile.catFile('axibal8g.n100pre', f0=30000, f1 = 40000, n = 200) # pre.
%c = mfile.catFile('axibal8h.n100pre', f0=30000, f1 = 40000, n = 200) # pre.
%plot (a.f, 20 * log10(1./ 20E-6 * abs(a.h[:, 1] + 1j * a.h[:, 2])))
%plot (b.f, 20 * log10(1./ 20E-6 * abs(b.h[:, 1] + 1j * b.h[:, 2])))
%plot (c.f, 20 * log10(1./ 20E-6 * abs(c.h[:, 1] + 1j * c.h[:, 2])))
%tmp = reference.dumptex(a.f, 20 * log10(1./ 20E-6 * abs(a.h[:, 1] + 1j * a.h[:, 2])))
%tmp = reference.dumptex(b.f, 20 * log10(1./ 20E-6 * abs(b.h[:, 1] + 1j * b.h[:, 2])))
%tmp = reference.dumptex(c.f, 20 * log10(1./ 20E-6 * abs(c.h[:, 1] + 1j * c.h[:, 2])))
\mbox{
\hspace{-1cm}
\subfigure[SPL midway between duct centre and duct exit, for different
boundary conditions.] {
\tikzstyle{every axis legend}+= [at={(0.98,0.02)},anchor=south east] % im is 0,0 to 1,1
\begin{tikzpicture}
% second axis. Do NOT USE scale only axis; it changes the x-axis scaling.
\begin{axis}[width=\hplotw,height=\ploth,
separate axis lines,
every outer x axis line/.append style={white}, % YES! no more messy axes
grid=major,
xmin = 30000, xmax=36000, ymin = 75, ymax = 125,
axis y line = none, axis x line = top, %y = 1.565cm
xlabel = $f/f_{0}$,
%xlabel style = {xshift = -10pt, yshift = -200pt},
xtick ={34400},
xticklabels={ $1$ }
]
\end{axis}
\begin{axis}[width=\hplotw,height=\ploth,
xmin = 30000, xmax=36000, ymin = 75, ymax = 125,
xlabel={$f\,(Hz)$}, ylabel={SPL, $1\,V$, node 100}, grid=major]
\addplot[color = blue] plot coordinates {(3.00000e+04,8.16458e+01) (3.00500e+04,8.16237e+01) (3.01000e+04,8.15471e+01) (3.01500e+04,8.14818e+01) (3.02000e+04,8.15464e+01) (3.02500e+04,8.17223e+01) (3.03000e+04,8.19624e+01) (3.03500e+04,8.22124e+01) (3.04000e+04,8.24467e+01) (3.04500e+04,8.26550e+01) (3.05000e+04,8.28321e+01) (3.05500e+04,8.29803e+01) (3.06000e+04,8.31159e+01) (3.06500e+04,8.33246e+01) (3.07000e+04,8.41081e+01) (3.07500e+04,8.73834e+01) (3.08000e+04,8.78410e+01) (3.08500e+04,8.62150e+01) (3.09000e+04,8.54417e+01) (3.09500e+04,8.50057e+01) (3.10000e+04,8.46768e+01) (3.10500e+04,8.43373e+01) (3.11000e+04,8.39853e+01) (3.11500e+04,8.34931e+01) (3.12000e+04,8.27632e+01) (3.12500e+04,8.15285e+01) (3.13000e+04,7.90764e+01) (3.13500e+04,7.90075e+01) (3.14000e+04,9.80799e+01) (3.14500e+04,9.49825e+01) (3.15000e+04,9.12996e+01) (3.15500e+04,8.98744e+01) (3.16000e+04,8.91425e+01) (3.16500e+04,8.87113e+01) (3.17000e+04,8.84340e+01) (3.17500e+04,8.82469e+01) (3.18000e+04,8.81319e+01) (3.18500e+04,8.81045e+01) (3.19000e+04,8.81842e+01) (3.19500e+04,8.83483e+01) (3.20000e+04,8.85389e+01) (3.20500e+04,8.87148e+01) (3.21000e+04,8.88605e+01) (3.21500e+04,8.89807e+01) (3.22000e+04,8.90576e+01) (3.22500e+04,8.90137e+01) (3.23000e+04,8.84688e+01) (3.23500e+04,8.94283e+01) (3.24000e+04,8.96744e+01) (3.24500e+04,8.98130e+01) (3.25000e+04,8.99482e+01) (3.25500e+04,9.00935e+01) (3.26000e+04,9.02567e+01) (3.26500e+04,9.04471e+01) (3.27000e+04,9.06757e+01) (3.27500e+04,9.09537e+01) (3.28000e+04,9.12862e+01) (3.28500e+04,9.16551e+01) (3.29000e+04,9.20049e+01) (3.29500e+04,9.22538e+01) (3.30000e+04,9.23359e+01) (3.30500e+04,9.22364e+01) (3.31000e+04,9.19829e+01) (3.31500e+04,9.16198e+01) (3.32000e+04,9.11927e+01) (3.32500e+04,9.07430e+01) (3.33000e+04,9.03041e+01) (3.33500e+04,8.98974e+01) (3.34000e+04,8.94658e+01) (3.34500e+04,8.91212e+01) (3.35000e+04,8.88071e+01) (3.35500e+04,8.85331e+01) (3.36000e+04,8.83818e+01) (3.36500e+04,8.86569e+01) (3.37000e+04,9.00487e+01) (3.37500e+04,9.29449e+01) (3.38000e+04,9.61772e+01) (3.38500e+04,9.80586e+01) (3.39000e+04,9.86011e+01) (3.39500e+04,9.87158e+01) (3.40000e+04,9.88505e+01) (3.40500e+04,9.90692e+01) (3.41000e+04,9.92993e+01) (3.41500e+04,9.94409e+01) (3.42000e+04,9.95139e+01) (3.42500e+04,9.96600e+01) (3.43000e+04,9.99961e+01) (3.43500e+04,1.00558e+02) (3.44000e+04,1.01338e+02) (3.44500e+04,1.02347e+02) (3.45000e+04,1.03564e+02) (3.45500e+04,1.05161e+02) (3.46000e+04,1.05987e+02) (3.46500e+04,1.07820e+02) (3.47000e+04,1.11206e+02) (3.47500e+04,1.14916e+02) (3.48000e+04,1.15706e+02) (3.48500e+04,1.12591e+02) (3.49000e+04,1.09531e+02) (3.49500e+04,1.07248e+02) (3.50000e+04,1.05567e+02) (3.50500e+04,1.04320e+02) (3.51000e+04,1.03394e+02) (3.51500e+04,1.02704e+02) (3.52000e+04,1.02202e+02) (3.52500e+04,1.01845e+02) (3.53000e+04,1.01604e+02) (3.53500e+04,1.01458e+02) (3.54000e+04,1.01391e+02) (3.54500e+04,1.01390e+02) (3.55000e+04,1.01449e+02) (3.55500e+04,1.01562e+02) (3.56000e+04,1.01717e+02) (3.56500e+04,1.01946e+02) (3.57000e+04,1.02260e+02) (3.57500e+04,1.02727e+02) (3.58000e+04,1.03522e+02) (3.58500e+04,1.05173e+02) (3.59000e+04,1.10286e+02) (3.59500e+04,9.96446e+01) (3.60000e+04,1.07120e+02) (3.60500e+04,1.08194e+02) (3.61000e+04,1.08349e+02) (3.61500e+04,1.08400e+02) (3.62000e+04,1.08421e+02) (3.62500e+04,1.08353e+02) (3.63000e+04,1.08128e+02) (3.63500e+04,1.07713e+02) (3.64000e+04,1.07111e+02) (3.64500e+04,1.06357e+02) (3.65000e+04,1.05499e+02) (3.65500e+04,1.04590e+02) (3.66000e+04,1.03670e+02) (3.66500e+04,1.02770e+02) (3.67000e+04,1.02038e+02) (3.67500e+04,1.01246e+02) (3.68000e+04,1.00520e+02) (3.68500e+04,9.98677e+01) (3.69000e+04,9.92952e+01) (3.69500e+04,9.88131e+01) (3.70000e+04,9.84387e+01) (3.70500e+04,9.82052e+01) (3.71000e+04,9.81734e+01) (3.71500e+04,9.84498e+01) (3.72000e+04,9.92163e+01) (3.72500e+04,1.00655e+02) (3.73000e+04,1.01671e+02) (3.73500e+04,9.82344e+01) (3.74000e+04,9.38082e+01) (3.74500e+04,9.20443e+01) (3.75000e+04,9.24560e+01) (3.75500e+04,9.38404e+01) (3.76000e+04,9.56495e+01) (3.76500e+04,9.77052e+01) (3.77000e+04,9.98974e+01) (3.77500e+04,1.02071e+02) (3.78000e+04,1.04039e+02) (3.78500e+04,1.05575e+02) (3.79000e+04,1.06686e+02) (3.79500e+04,1.07504e+02) (3.80000e+04,1.08192e+02) (3.80500e+04,1.08868e+02) (3.81000e+04,1.09598e+02) (3.81500e+04,1.10423e+02) (3.82000e+04,1.11368e+02) (3.82500e+04,1.12464e+02) (3.83000e+04,1.13752e+02) (3.83500e+04,1.15302e+02) (3.84000e+04,1.17232e+02) (3.84500e+04,1.19748e+02) (3.85000e+04,1.23088e+02) (3.85500e+04,1.27522e+02) (3.86000e+04,1.35797e+02) (3.86500e+04,1.27411e+02) (3.87000e+04,1.22159e+02) (3.87500e+04,1.18706e+02) (3.88000e+04,1.16133e+02) (3.88500e+04,1.14052e+02) (3.89000e+04,1.12292e+02) (3.89500e+04,1.10775e+02) (3.90000e+04,1.09488e+02) (3.90500e+04,1.08432e+02) (3.91000e+04,1.07610e+02) (3.91500e+04,1.07025e+02) (3.92000e+04,1.06663e+02) (3.92500e+04,1.06491e+02) (3.93000e+04,1.06449e+02) (3.93500e+04,1.06470e+02) (3.94000e+04,1.06498e+02) (3.94500e+04,1.06504e+02) (3.95000e+04,1.06482e+02) (3.95500e+04,1.06443e+02) (3.96000e+04,1.06405e+02) (3.96500e+04,1.06382e+02) (3.97000e+04,1.06387e+02) (3.97500e+04,1.06416e+02) (3.98000e+04,1.06453e+02) (3.98500e+04,1.06457e+02) (3.99000e+04,1.06360e+02) (3.99500e+04,1.06084e+02) (4.00000e+04,1.05546e+02)};
\addplot[color = red] plot coordinates {(3.00000e+04,8.25468e+01) (3.00500e+04,8.27367e+01) (3.01000e+04,8.29124e+01) (3.01500e+04,8.30746e+01) (3.02000e+04,8.32243e+01) (3.02500e+04,8.33623e+01) (3.03000e+04,8.34897e+01) (3.03500e+04,8.36071e+01) (3.04000e+04,8.37157e+01) (3.04500e+04,8.38163e+01) (3.05000e+04,8.39098e+01) (3.05500e+04,8.39969e+01) (3.06000e+04,8.40785e+01) (3.06500e+04,8.41553e+01) (3.07000e+04,8.42280e+01) (3.07500e+04,8.42973e+01) (3.08000e+04,8.43637e+01) (3.08500e+04,8.44278e+01) (3.09000e+04,8.44902e+01) (3.09500e+04,8.45513e+01) (3.10000e+04,8.46116e+01) (3.10500e+04,8.46714e+01) (3.11000e+04,8.47313e+01) (3.11500e+04,8.47914e+01) (3.12000e+04,8.48522e+01) (3.12500e+04,8.49139e+01) (3.13000e+04,8.49768e+01) (3.13500e+04,8.50411e+01) (3.14000e+04,8.51072e+01) (3.14500e+04,8.51751e+01) (3.15000e+04,8.52452e+01) (3.15500e+04,8.53175e+01) (3.16000e+04,8.53923e+01) (3.16500e+04,8.54697e+01) (3.17000e+04,8.55499e+01) (3.17500e+04,8.56329e+01) (3.18000e+04,8.57190e+01) (3.18500e+04,8.58083e+01) (3.19000e+04,8.59009e+01) (3.19500e+04,8.59968e+01) (3.20000e+04,8.60962e+01) (3.20500e+04,8.61992e+01) (3.21000e+04,8.63059e+01) (3.21500e+04,8.64164e+01) (3.22000e+04,8.65308e+01) (3.22500e+04,8.66492e+01) (3.23000e+04,8.67716e+01) (3.23500e+04,8.68981e+01) (3.24000e+04,8.70289e+01) (3.24500e+04,8.71640e+01) (3.25000e+04,8.73036e+01) (3.25500e+04,8.74477e+01) (3.26000e+04,8.75964e+01) (3.26500e+04,8.77499e+01) (3.27000e+04,8.79082e+01) (3.27500e+04,8.80715e+01) (3.28000e+04,8.82399e+01) (3.28500e+04,8.84135e+01) (3.29000e+04,8.85925e+01) (3.29500e+04,8.87771e+01) (3.30000e+04,8.89674e+01) (3.30500e+04,8.91637e+01) (3.31000e+04,8.93660e+01) (3.31500e+04,8.95748e+01) (3.32000e+04,8.97902e+01) (3.32500e+04,9.00126e+01) (3.33000e+04,9.02423e+01) (3.33500e+04,9.04798e+01) (3.34000e+04,9.07254e+01) (3.34500e+04,9.09797e+01) (3.35000e+04,9.12434e+01) (3.35500e+04,9.15170e+01) (3.36000e+04,9.18016e+01) (3.36500e+04,9.20981e+01) (3.37000e+04,9.24076e+01) (3.37500e+04,9.27317e+01) (3.38000e+04,9.30721e+01) (3.38500e+04,9.34308e+01) (3.39000e+04,9.38104e+01) (3.39500e+04,9.42141e+01) (3.40000e+04,9.46459e+01) (3.40500e+04,9.51107e+01) (3.41000e+04,9.56148e+01) (3.41500e+04,9.61661e+01) (3.42000e+04,9.67748e+01) (3.42500e+04,9.74543e+01) (3.43000e+04,9.82220e+01) (3.43500e+04,9.91014e+01) (3.44000e+04,1.00124e+02) (3.44500e+04,1.01334e+02) (3.45000e+04,1.02747e+02) (3.45500e+04,1.04665e+02) (3.46000e+04,1.07019e+02) (3.46500e+04,1.10232e+02) (3.47000e+04,1.14870e+02) (3.47500e+04,1.19573e+02) (3.48000e+04,1.15903e+02) (3.48500e+04,1.11611e+02) (3.49000e+04,1.08808e+02) (3.49500e+04,1.06910e+02) (3.50000e+04,1.05579e+02) (3.50500e+04,1.04632e+02) (3.51000e+04,1.03961e+02) (3.51500e+04,1.03496e+02) (3.52000e+04,1.03188e+02) (3.52500e+04,1.03005e+02) (3.53000e+04,1.02923e+02) (3.53500e+04,1.02924e+02) (3.54000e+04,1.02996e+02) (3.54500e+04,1.03130e+02) (3.55000e+04,1.03323e+02) (3.55500e+04,1.03571e+02) (3.56000e+04,1.03878e+02) (3.56500e+04,1.04249e+02) (3.57000e+04,1.04699e+02) (3.57500e+04,1.05260e+02) (3.58000e+04,1.06009e+02) (3.58500e+04,1.07220e+02) (3.59000e+04,1.11047e+02) (3.59500e+04,9.80319e+01) (3.60000e+04,1.04730e+02) (3.60500e+04,1.06237e+02) (3.61000e+04,1.07117e+02) (3.61500e+04,1.07630e+02) (3.62000e+04,1.07719e+02) (3.62500e+04,1.07298e+02) (3.63000e+04,1.06382e+02) (3.63500e+04,1.05100e+02) (3.64000e+04,1.03624e+02) (3.64500e+04,1.02092e+02) (3.65000e+04,1.00604e+02) (3.65500e+04,9.92324e+01) (3.66000e+04,9.80360e+01) (3.66500e+04,9.70657e+01) (3.67000e+04,9.63560e+01) (3.67500e+04,9.59150e+01) (3.68000e+04,9.57213e+01) (3.68500e+04,9.57318e+01) (3.69000e+04,9.58956e+01) (3.69500e+04,9.61660e+01) (3.70000e+04,9.65059e+01) (3.70500e+04,9.68891e+01) (3.71000e+04,9.72980e+01) (3.71500e+04,9.77219e+01) (3.72000e+04,9.81542e+01) (3.72500e+04,9.85915e+01) (3.73000e+04,9.90324e+01) (3.73500e+04,9.94768e+01) (3.74000e+04,9.99251e+01) (3.74500e+04,1.00378e+02) (3.75000e+04,1.00838e+02) (3.75500e+04,1.01307e+02) (3.76000e+04,1.01786e+02) (3.76500e+04,1.02277e+02) (3.77000e+04,1.02784e+02) (3.77500e+04,1.03308e+02) (3.78000e+04,1.03854e+02) (3.78500e+04,1.04424e+02) (3.79000e+04,1.05024e+02) (3.79500e+04,1.05658e+02) (3.80000e+04,1.06332e+02) (3.80500e+04,1.07056e+02) (3.81000e+04,1.07839e+02) (3.81500e+04,1.08696e+02) (3.82000e+04,1.09646e+02) (3.82500e+04,1.10718e+02) (3.83000e+04,1.11955e+02) (3.83500e+04,1.13422e+02) (3.84000e+04,1.15231e+02) (3.84500e+04,1.17571e+02) (3.85000e+04,1.20798e+02) (3.85500e+04,1.25316e+02) (3.86000e+04,1.32412e+02) (3.86500e+04,1.25218e+02) (3.87000e+04,1.20853e+02) (3.87500e+04,1.18104e+02) (3.88000e+04,1.16204e+02) (3.88500e+04,1.14783e+02) (3.89000e+04,1.13646e+02) (3.89500e+04,1.12685e+02) (3.90000e+04,1.11840e+02) (3.90500e+04,1.11079e+02) (3.91000e+04,1.10381e+02) (3.91500e+04,1.09737e+02) (3.92000e+04,1.09139e+02) (3.92500e+04,1.08581e+02) (3.93000e+04,1.08059e+02) (3.93500e+04,1.07571e+02) (3.94000e+04,1.07113e+02) (3.94500e+04,1.06684e+02) (3.95000e+04,1.06279e+02) (3.95500e+04,1.05899e+02) (3.96000e+04,1.05541e+02) (3.96500e+04,1.05203e+02) (3.97000e+04,1.04884e+02) (3.97500e+04,1.04582e+02) (3.98000e+04,1.04296e+02) (3.98500e+04,1.04026e+02) (3.99000e+04,1.03769e+02) (3.99500e+04,1.03525e+02) (4.00000e+04,1.03294e+02)};
\addplot[color = black] plot coordinates {(3.00000e+04,8.31253e+01) (3.00500e+04,8.32589e+01) (3.01000e+04,8.33906e+01) (3.01500e+04,8.35206e+01) (3.02000e+04,8.36495e+01) (3.02500e+04,8.37774e+01) (3.03000e+04,8.39045e+01) (3.03500e+04,8.40312e+01) (3.04000e+04,8.41573e+01) (3.04500e+04,8.42831e+01) (3.05000e+04,8.44087e+01) (3.05500e+04,8.45340e+01) (3.06000e+04,8.46590e+01) (3.06500e+04,8.47836e+01) (3.07000e+04,8.49076e+01) (3.07500e+04,8.50310e+01) (3.08000e+04,8.51535e+01) (3.08500e+04,8.52747e+01) (3.09000e+04,8.53946e+01) (3.09500e+04,8.55125e+01) (3.10000e+04,8.56281e+01) (3.10500e+04,8.57411e+01) (3.11000e+04,8.58508e+01) (3.11500e+04,8.59567e+01) (3.12000e+04,8.60582e+01) (3.12500e+04,8.61547e+01) (3.13000e+04,8.62455e+01) (3.13500e+04,8.63301e+01) (3.14000e+04,8.64077e+01) (3.14500e+04,8.64777e+01) (3.15000e+04,8.65395e+01) (3.15500e+04,8.65928e+01) (3.16000e+04,8.66367e+01) (3.16500e+04,8.66714e+01) (3.17000e+04,8.66966e+01) (3.17500e+04,8.67122e+01) (3.18000e+04,8.67189e+01) (3.18500e+04,8.67168e+01) (3.19000e+04,8.67069e+01) (3.19500e+04,8.66900e+01) (3.20000e+04,8.66677e+01) (3.20500e+04,8.66413e+01) (3.21000e+04,8.66130e+01) (3.21500e+04,8.65841e+01) (3.22000e+04,8.65570e+01) (3.22500e+04,8.65341e+01) (3.23000e+04,8.65171e+01) (3.23500e+04,8.65086e+01) (3.24000e+04,8.65101e+01) (3.24500e+04,8.65238e+01) (3.25000e+04,8.65506e+01) (3.25500e+04,8.65924e+01) (3.26000e+04,8.66501e+01) (3.26500e+04,8.67234e+01) (3.27000e+04,8.68132e+01) (3.27500e+04,8.69188e+01) (3.28000e+04,8.70404e+01) (3.28500e+04,8.71769e+01) (3.29000e+04,8.73278e+01) (3.29500e+04,8.74919e+01) (3.30000e+04,8.76681e+01) (3.30500e+04,8.78557e+01) (3.31000e+04,8.80537e+01) (3.31500e+04,8.82612e+01) (3.32000e+04,8.84774e+01) (3.32500e+04,8.87014e+01) (3.33000e+04,8.89341e+01) (3.33500e+04,8.91748e+01) (3.34000e+04,8.94221e+01) (3.34500e+04,8.96785e+01) (3.35000e+04,8.99434e+01) (3.35500e+04,9.02170e+01) (3.36000e+04,9.05023e+01) (3.36500e+04,9.07988e+01) (3.37000e+04,9.11072e+01) (3.37500e+04,9.14378e+01) (3.38000e+04,9.17857e+01) (3.38500e+04,9.21519e+01) (3.39000e+04,9.25510e+01) (3.39500e+04,9.29747e+01) (3.40000e+04,9.34373e+01) (3.40500e+04,9.39422e+01) (3.41000e+04,9.44977e+01) (3.41500e+04,9.51128e+01) (3.42000e+04,9.57988e+01) (3.42500e+04,9.65694e+01) (3.43000e+04,9.74422e+01) (3.43500e+04,9.84393e+01) (3.44000e+04,9.95903e+01) (3.44500e+04,1.00935e+02) (3.45000e+04,1.02488e+02) (3.45500e+04,1.04545e+02) (3.46000e+04,1.07043e+02) (3.46500e+04,1.10448e+02) (3.47000e+04,1.15660e+02) (3.47500e+04,1.23654e+02) (3.48000e+04,1.17959e+02) (3.48500e+04,1.12552e+02) (3.49000e+04,1.09363e+02) (3.49500e+04,1.07223e+02) (3.50000e+04,1.05686e+02) (3.50500e+04,1.04544e+02) (3.51000e+04,1.03685e+02) (3.51500e+04,1.03039e+02) (3.52000e+04,1.02565e+02) (3.52500e+04,1.02232e+02) (3.53000e+04,1.02019e+02) (3.53500e+04,1.01912e+02) (3.54000e+04,1.01902e+02) (3.54500e+04,1.01982e+02) (3.55000e+04,1.02150e+02) (3.55500e+04,1.02408e+02) (3.56000e+04,1.02758e+02) (3.56500e+04,1.03212e+02) (3.57000e+04,1.03789e+02) (3.57500e+04,1.04526e+02) (3.58000e+04,1.05513e+02) (3.58500e+04,1.07041e+02) (3.59000e+04,1.11331e+02) (3.59500e+04,9.84875e+01) (3.60000e+04,1.06023e+02) (3.60500e+04,1.08421e+02) (3.61000e+04,1.10412e+02) (3.61500e+04,1.12159e+02) (3.62000e+04,1.13176e+02) (3.62500e+04,1.12870e+02) (3.63000e+04,1.11487e+02) (3.63500e+04,1.09762e+02) (3.64000e+04,1.08116e+02) (3.64500e+04,1.06676e+02) (3.65000e+04,1.05458e+02) (3.65500e+04,1.04448e+02) (3.66000e+04,1.03623e+02) (3.66500e+04,1.02966e+02) (3.67000e+04,1.02458e+02) (3.67500e+04,1.02085e+02) (3.68000e+04,1.01831e+02) (3.68500e+04,1.01684e+02) (3.69000e+04,1.01631e+02) (3.69500e+04,1.01658e+02) (3.70000e+04,1.01758e+02) (3.70500e+04,1.01919e+02) (3.71000e+04,1.02123e+02) (3.71500e+04,1.02388e+02) (3.72000e+04,1.02685e+02) (3.72500e+04,1.03012e+02) (3.73000e+04,1.03369e+02) (3.73500e+04,1.03752e+02) (3.74000e+04,1.04156e+02) (3.74500e+04,1.04581e+02) (3.75000e+04,1.05025e+02) (3.75500e+04,1.05486e+02) (3.76000e+04,1.05965e+02) (3.76500e+04,1.06461e+02) (3.77000e+04,1.06976e+02) (3.77500e+04,1.07511e+02) (3.78000e+04,1.08068e+02) (3.78500e+04,1.08650e+02) (3.79000e+04,1.09261e+02) (3.79500e+04,1.09905e+02) (3.80000e+04,1.10588e+02) (3.80500e+04,1.11319e+02) (3.81000e+04,1.12107e+02) (3.81500e+04,1.12965e+02) (3.82000e+04,1.13911e+02) (3.82500e+04,1.14970e+02) (3.83000e+04,1.16176e+02) (3.83500e+04,1.17581e+02) (3.84000e+04,1.19269e+02) (3.84500e+04,1.21379e+02) (3.85000e+04,1.24153e+02) (3.85500e+04,1.27844e+02) (3.86000e+04,1.36276e+02) (3.86500e+04,1.31359e+02) (3.87000e+04,1.26214e+02) (3.87500e+04,1.22794e+02) (3.88000e+04,1.20337e+02) (3.88500e+04,1.18423e+02) (3.89000e+04,1.16846e+02) (3.89500e+04,1.15496e+02) (3.90000e+04,1.14313e+02) (3.90500e+04,1.13258e+02) (3.91000e+04,1.12304e+02) (3.91500e+04,1.11437e+02) (3.92000e+04,1.10642e+02) (3.92500e+04,1.09909e+02) (3.93000e+04,1.09230e+02) (3.93500e+04,1.08599e+02) (3.94000e+04,1.08009e+02) (3.94500e+04,1.07457e+02) (3.95000e+04,1.06940e+02) (3.95500e+04,1.06454e+02) (3.96000e+04,1.05996e+02) (3.96500e+04,1.05566e+02) (3.97000e+04,1.05160e+02) (3.97500e+04,1.04777e+02) (3.98000e+04,1.04416e+02) (3.98500e+04,1.04075e+02) (3.99000e+04,1.03754e+02) (3.99500e+04,1.03451e+02) (4.00000e+04,1.03167e+02)};
\legend{BE\\Quiet\\Wave env.\\}
\end{axis}
\end{tikzpicture} } }
\caption{Zoomed version of ....}
\label{fig:axibal8a_spl} \end{center} \end{figure}
Monday, 2 March 2009
Permanent ubuntu shares
from http://www.ubuntugeek.com/nfs-server-and-client-configuration-in-ubuntu.html
-------------------------------------------
On all machines:
sudo apt-get install portmap nfs-common nfs-kernel-server
----------------
On the exporting machine(s):
Edit /etc/exports. Specify local folders to export. Eg.
/home/mymachine/data/d4 192.168.1.1/24(rw,async) 213.334.248.237(rw,async)
opens the directories to all local machines, and the address 213.334 etc.
After change:
sudo /etc/init.d/nfs-kernel-server restart
----------------
On the mounting machines: On the fly:
On the mounting machines: With fstab:
Add lines:
server.mydomain.com:/files /files nfs rsize=8192,wsize=8192,timeo=14,intr
---------------
Firewall ports:
Open 32771, 111 and 2049
-------------------------------------------
On all machines:
sudo apt-get install portmap nfs-common nfs-kernel-server
----------------
On the exporting machine(s):
Edit /etc/exports. Specify local folders to export. Eg.
/home/mymachine/data/d4 192.168.1.1/24(rw,async) 213.334.248.237(rw,async)
opens the directories to all local machines, and the address 213.334 etc.
After change:
sudo /etc/init.d/nfs-kernel-server restart
----------------
On the mounting machines: On the fly:
sudo mount server.mydomain.com:/files /files
Possible restart required:
sudo /etc/init.d/portmap restart
sudo /etc/init.d/nfs-common restart
---------------On the mounting machines: With fstab:
Add lines:
server.mydomain.com:/files /files nfs rsize=8192,wsize=8192,timeo=14,intr
---------------
Firewall ports:
Open 32771, 111 and 2049
sshfs
sudo apt-get install sshfs
Add users to the fuse group:
sudo adduser username fuse (i found this not to be required)
mount the remote file systems:
sshfs loginname@ipaddress:/pathtoremotedir /pathtolocalmountpoint
These are temporary. When the ssh tunnel fails, the access is lost. After a period
of inactivity, the connection is dropped.
Add users to the fuse group:
sudo adduser username fuse (i found this not to be required)
mount the remote file systems:
sshfs loginname@ipaddress:/pathtoremotedir /pathtolocalmountpoint
These are temporary. When the ssh tunnel fails, the access is lost. After a period
of inactivity, the connection is dropped.
[NO-NAME] ORTE_ERROR_LOG: Not found in file runtime/orte_init_stage1.c at line 182
OpenMPI failure (fixed)
$ mpiexec -n 4 fe2.py
[host-desktop1:09127] [NO-NAME] ORTE_ERROR_LOG: Not found in file runtime/orte_init_stage1.c at line 182
--------------------------------------------------------------------------
It looks like orte_init failed for some reason; your parallel process is
likely to abort. There are many reasons that a parallel process can
fail during orte_init; some of which are due to configuration or
environment problems. This failure appears to be an internal failure;
here's some additional information (which may only be relevant to an
Open MPI developer):
orte_rml_base_select failed
--> Returned value -13 instead of ORTE_SUCCESS
--------------------------------------------------------------------------
[host-desktop1:09127] [NO-NAME] ORTE_ERROR_LOG: Not found in file runtime/orte_system_init.c at line 42
[host-desktop1:09127] [NO-NAME] ORTE_ERROR_LOG: Not found in file runtime/orte_init.c at line 52
--------------------------------------------------------------------------
Open RTE was unable to initialize properly. The error occured while
attempting to orte_init(). Returned value -13 instead of ORTE_SUCCESS.
--------------------------------------------------------------------------
Reinstall, from a fresh build.
cd downloads
wget http://www.open-mpi.org/software/ompi/v1.3/downloads/openmpi-1.3.tar.gz
tar xzf openmpi-1.3.tar.gz
Reading the README showed, PATH and LD_LIBRARY_PATH need a specific entry. ompi_info, a program residing in/bin reports the MPI status, but it's location is of more interest.
whereis ompi_info
ompi_info: /usr/bin/ompi_info /usr/share/man/man1/ompi_info.1.gz
So /usr/bin needs to be in PATH, and /usr/lib needs to be in LD_LIBRARY_PATH.
Checking .bashrc showed LD_LIBRARY_PATH was wiped on its instantiation. The first line was changed from
LD_LIBRARY_PATH=blahbah
to
LD_LIBRARY_PATH=blahbah:$LD_LIBRARY_PATH
and things started working again.
$ mpiexec -n 4 fe2.py
[host-desktop1:09127] [NO-NAME] ORTE_ERROR_LOG: Not found in file runtime/orte_init_stage1.c at line 182
--------------------------------------------------------------------------
It looks like orte_init failed for some reason; your parallel process is
likely to abort. There are many reasons that a parallel process can
fail during orte_init; some of which are due to configuration or
environment problems. This failure appears to be an internal failure;
here's some additional information (which may only be relevant to an
Open MPI developer):
orte_rml_base_select failed
--> Returned value -13 instead of ORTE_SUCCESS
--------------------------------------------------------------------------
[host-desktop1:09127] [NO-NAME] ORTE_ERROR_LOG: Not found in file runtime/orte_system_init.c at line 42
[host-desktop1:09127] [NO-NAME] ORTE_ERROR_LOG: Not found in file runtime/orte_init.c at line 52
--------------------------------------------------------------------------
Open RTE was unable to initialize properly. The error occured while
attempting to orte_init(). Returned value -13 instead of ORTE_SUCCESS.
--------------------------------------------------------------------------
Reinstall, from a fresh build.
cd downloads
wget http://www.open-mpi.org/software/ompi/v1.3/downloads/openmpi-1.3.tar.gz
tar xzf openmpi-1.3.tar.gz
Reading the README showed, PATH and LD_LIBRARY_PATH need a specific entry. ompi_info, a program residing in
whereis ompi_info
ompi_info: /usr/bin/ompi_info /usr/share/man/man1/ompi_info.1.gz
So /usr/bin needs to be in PATH, and /usr/lib needs to be in LD_LIBRARY_PATH.
Checking .bashrc showed LD_LIBRARY_PATH was wiped on its instantiation. The first line was changed from
LD_LIBRARY_PATH=blahbah
to
LD_LIBRARY_PATH=blahbah:$LD_LIBRARY_PATH
and things started working again.
Sunday, 1 March 2009
ipython
Ipython's not behaving as expected; this is hardy. I think i installed it
early on, with
sudo apt-get install ipython
on running it, arange doesn't work. I can't install pylab etc. Start again.
$ sudo aptitude install bzr
$ bzr branch lp:ipython
Read the installation instructions and found:
$ sudo easy_install ipython[kernel,security,test]
this bloody failed, too. Try:
$ sudo easy_install ipython
seems ok.
*UPDATE*
This same command, seems to safely update ipython, too! The change from 0.8.1 to 0.9.1 was seamless. Numpy, scipy and my modules import fine. ipcluster didn't work, though: twisted
was required.
$ sudo easy_install twisted
amazing. It worked. Now foolscap is missing.
$ sudo easy_install foolscap
Unbelievable. It worked, and
$ ipcluster -n 4
works, too.
Update, May 2013:
now works!
early on, with
sudo apt-get install ipython
on running it, arange doesn't work. I can't install pylab etc. Start again.
$ sudo aptitude install bzr
$ bzr branch lp:ipython
Read the installation instructions and found:
$ sudo easy_install ipython[kernel,security,test]
this bloody failed, too. Try:
$ sudo easy_install ipython
seems ok.
*UPDATE*
This same command, seems to safely update ipython, too! The change from 0.8.1 to 0.9.1 was seamless. Numpy, scipy and my modules import fine. ipcluster didn't work, though: twisted
was required.
$ sudo easy_install twisted
amazing. It worked. Now foolscap is missing.
$ sudo easy_install foolscap
Unbelievable. It worked, and
$ ipcluster -n 4
works, too.
Update, May 2013:
sudo apt-get install ipython-notebook python-matplotlib \
python-scipy python-pandas python-sympy python-nose
now works!
Subscribe to:
Posts (Atom)