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.

using namespace std; typedef complex z_type; //#include "acip.cin"
 * 1) include 
 * 2) include 
 * 3) include 
 * 4) define DB double
 * 5) define DO(x,y) for(x=0;x<y;x++)
 * 1) include
 * 1) define Re(x) x.real
 * 2) define Im(x) x.imag
 * 3) define I z_type(0.,1.)
 * 4) include "ado.cin"


 * 1) 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); }

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 }
 * 1) define M(x,y) fprintf(o,"%6.4f %6.4f M\n",0.+x,0.+y);
 * 2) define L(x,y) fprintf(o,"%6.4f %6.4f L\n",0.+x,0.+y);
 * 3) define S(x,y) fprintf(o,"S\n",);

Latex generator of labels
% File modeab02.pdf should be generated with the code above in order to compile the Latex document below.

% % Copyleft 2012 by Dmitrii Kouznetsov % \documentclass[12pt]{article} % \usepackage{geometry} % \usepackage{graphicx} % \usepackage{rotating} % %\paperwidth 1612pt % \paperwidth 808pt % \paperheight 250pt % \topmargin -90pt % \oddsidemargin -106pt % \textwidth 900pt % \textheight 900pt % \pagestyle {empty} % \newcommand \sx {\scalebox} % \newcommand \rot {\begin{rotate}} % \newcommand \ero {\end{rotate}} % \newcommand \ing {\includegraphics} % \begin{document} % \parindent 0pt \sx{2}{ \begin{picture}(420,116) % \put(4,4){\ing{modeab02}} % \put(215,112){\sx{1.6}{\bf 1}} % \put(216, 13){\sx{1.6}{\bf 0}} % \put(103,4){\sx{1.6}{\bf -1}} % \put(310,4){\sx{1.6}{\bf 1}} % \put(390,4){\sx{1.6}{$x\!/\!d$}} % \put(314,100){\sx{1.6}{$\arg\!\big(f(x)\big)$}}% \put(318,24){\sx{1.6}{$|f(x)|$}}% \end{picture} % } % \end{document} %