File:Modeab02T.png
Principal mode $f$ of wave guided between the absorbing walls with damping parameter $\alpha=1/50$.
The thin black curve shows $|f(x)|$
The thick green curve shows $\arg(f)$
In the central part, $|x|\!<\!d~$, $~f(x)\!=\!\cos(px)$
Outside, $~f(x)=r \exp\Big( q \big(|x|-d\big)\Big)$
Parameters are:
- $ pd \approx 1.54859380700524 \, -\, 0.02159861746934\, \mathrm i $
- $ qd \approx \!\! 35.33791574606151 -\!35.37182445894684\, \mathrm i $
- $ r \approx 0.02220587422227 \,+\, 0.02159497306720\, \mathrm i $
C++ generator of curves
//Files ado.cin and acosc.cin should be loaded to the working directory in order to compile the C++ code below.
#include <math.h> #include <stdio.h> #include <stdlib.h> #define DB double #define DO(x,y) for(x=0;x<y;x++) using namespace std; #include <complex> typedef complex<double> z_type; #define Re(x) x.real() #define Im(x) x.imag() #define I z_type(0.,1.) #include "ado.cin" //#include "acip.cin"
#include "acosc.cin"
z_type acosq(z_type z){ z_type c=z*exp(I*M_PI/4.); c=acosc(c); return c;}
z_type acosqq(z_type z){ z_type c=z*exp(I*M_PI/4.); c=acosc(c); return c*tan(c);}
DB Sazae= 2.798386045783887; // H DB Tarao= -0.33650841691839534; // J DB alpha=.02; z_type pd= acosq(alpha); z_type qd= pd*tan(pd); z_type r = cos(pd);
z_type mode(DB x){ x=fabs(x); if( x < 1 ) return cos(pd*x); x-=1.; return r* exp(- qd * x); }
#define M(x,y) fprintf(o,"%6.4f %6.4f M\n",0.+x,0.+y); #define L(x,y) fprintf(o,"%6.4f %6.4f L\n",0.+x,0.+y); #define S(x,y) fprintf(o,"S\n",); main(){ int j,k,m,n; DB x,y, p,q, t; z_type z,c,d; printf("%19.14lf %19.14lf\n",Re(pd),Im(pd)); printf("%19.14lf %19.14lf\n",Re(qd),Im(qd)); printf("%19.14lf %19.14lf\n",Re(r),Im(r)); FILE *o;o=fopen("modeab02.eps","w");ado(o,412,140); fprintf(o,"210 14 translate\n 100 100 scale\n"); for(m=-2;m<3;m++){M(m,0)L(m,1)} for(n=0;n<2;n++){M(-2,n)L(2,n)} fprintf(o,"2 setlinecap .002 W 0 0 0 RGB S\n"); /* DO(m,630){x=-2.01+.01*m; z=pd*x; y=Re(cos(z)); if(m==0)M(x,y)else L(x,y) } fprintf(o,"1 setlinejoin 1 setlinecap .01 W 0 0 .8 RGB S\n"); DO(m,642){x=-2.01+.01*m; z=pd*x; y=Im(cos(z)); if(m==0)M(x,y)else L(x,y) } fprintf(o,"1 setlinejoin 1 setlinecap .01 W .8 0 0 RGB S\n"); DO(m,190){x=-.13-.01*m; z=qd*(fabs(x)-1.); z_type t;t=r*exp(-z);y=Re(t); if(m==0)M(x,y)else L(x,y)} DO(m,390){x= .13+.01*m; z=qd*(fabs(x)-1.); z_type t;t=r*exp(-z);y=Re(t); if(m==0)M(x,y)else L(x,y)} // y=Re(r*exp(-z)); // for some reasons the C++ dislikes this fprintf(o,"1 setlinejoin 1 setlinecap .01 W 0 .7 0 RGB S\n"); DO(m,190){x=-.46-.01*m; z=qd*(fabs(x)-1.); z_type t;t=r*exp(-z);y=Im(t); if(m==0)M(x,y)else L(x,y)} DO(m,390){x= .46+.01*m; z=qd*(fabs(x)-1.); z_type t;t=r*exp(-z);y=Im(t); if(m==0)M(x,y)else L(x,y)} fprintf(o,"1 setlinejoin 1 setlinecap .01 W .7 0 .7 RGB S\n"); */ DO(m,402){x=-2.01+.01*m; z=mode(x); y=abs(z); if(m==0)M(x,y) else L(x,y) } fprintf(o,".005 W 0 0 0 RGB S\n"); DO(m,102){x= .01*m; z=mode(x); DB y=arg(z); if(y<0) y+=2*M_PI; if(m==0)M(x,y) else L(x,y) } DO(m,102){x=-.01*m; z=mode(x); DB y=arg(z); if(y<0) y+=2*M_PI; if(m==0)M(x,y) else L(x,y) } fprintf(o,".01 W 0 .8 0 RGB S\n"); fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o); system("epstopdf modeab02.eps"); system( "open modeab02.pdf"); getchar(); system("killall Preview");//for mac }
Latex generator of labels
% File modeab02.pdf should be generated with the code above in order to compile the Latex document below.
%<br> % Copyleft 2012 by Dmitrii Kouznetsov %<br> \documentclass[12pt]{article} %<br> \usepackage{geometry} %<br> \usepackage{graphicx} %<br> \usepackage{rotating} %<br> %\paperwidth 1612pt %<br> \paperwidth 808pt %<br> \paperheight 250pt %<br> \topmargin -90pt %<br> \oddsidemargin -106pt %<br> \textwidth 900pt %<br> \textheight 900pt %<br> \pagestyle {empty} %<br> \newcommand \sx {\scalebox} %<br> \newcommand \rot {\begin{rotate}} %<br> \newcommand \ero {\end{rotate}} %<br> \newcommand \ing {\includegraphics} %<br> \begin{document} %<br> \parindent 0pt \sx{2}{ \begin{picture}(420,116) %<br> \put(4,4){\ing{modeab02}} %<br> \put(215,112){\sx{1.6}{\bf 1}} %<br> \put(216, 13){\sx{1.6}{\bf 0}} %<br> \put(103,4){\sx{1.6}{\bf -1}} %<br> \put(310,4){\sx{1.6}{\bf 1}} %<br> \put(390,4){\sx{1.6}{$x\!/\!d$}} %<br> \put(314,100){\sx{1.6}{$\arg\!\big(f(x)\big)$}}%<br> \put(318,24){\sx{1.6}{$|f(x)|$}}%<br> \end{picture} %<br> } %<br> \end{document} %
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 17:50, 20 June 2013 | 1,678 × 519 (66 KB) | Maintenance script (talk | contribs) | Importing image file |
- You cannot overwrite this file.
File usage
There are no pages that link to this file.