File:Modeabso25T.png

Assembling of the principal mode of a wave guided between the absorbing walls. The graphics correspond to the damping parameter $\alpha=0.25$,

In the central part, mode
 * $ f=\cos(pz)$

in the lateral part,
 * $ f= r \exp\!\Big( - q \big(|x|-d\big) \Big)$

where $d$ is half-width of waveguide.

Parameters $p$, $q$ and $r$ expressed through functions ArcCosq=acosq and ArcCosqq as follows:
 * $ pd = \text{acosq}(\alpha) \approx  1.30652013112871   -0.20108562381528 \, \mathrm i$
 * $ qd = \text{acosqq}(\alpha) \approx  2.63604614403057   -2.93518290714528 \,  \mathrm i$
 * $ ~ r = \cos(pd) \approx 0.26650956316919  +  0.19541505906974\,  \mathrm i$

C++ generator of curves
// Files ado.cin and acosc.cin should be loaded in the working directory for the compilation of the C++ code below.

using namespace std; typedef complex z_type; //#include "acip.cin" // old name and old, poor implementation
 * 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);}

main{ int j,k,m,n; DB x,y, p,q, t; z_type z,c,d; DB Sazae= 2.798386045783887; // H DB Tarao= -0.33650841691839534; // J DB gamma=.25; z_type pd= acosq(gamma); z_type qd= pd*tan(pd); z_type r = cos(pd); 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("modeabso25.eps","w");ado(o,652,224); fprintf(o,"210 114 translate\n 100 100 scale\n"); for(m=-2;m<5;m++){M(m,-1)L(m,1)} for(n=-1;n<2;n++){M(-2,n)L(4.4,n)} fprintf(o,"2 setlinecap .003 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"); fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o); system("epstopdf modeabso25.eps"); system(   "open modeabso25.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 modeabso25.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 1280pt % \paperheight 436pt % \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}(840,214) % \sx{2}{ \begin{picture}(600,214) % \put(4,6){\ing{modeabso25}} % \put(215,211){\sx{1.6}{$y$}} % \put(215,114){\sx{1.6}{\bf 0}} % \put(206, 15){\sx{1.6}{\bf -1}} % \put(103,104){\sx{1.6}{\bf -1}} % \put(310,104){\sx{1.6}{\bf 1}} % \put(410,104){\sx{1.6}{\bf 2}} % \put(510,104){\sx{1.6}{\bf 3}} % \put(610,104){\sx{1.6}{\bf 4}} % \put(629,104){\sx{1.6}{$x\!/\!d$}} % %\put(790,105){\sx{1.7}{$x$}} % \put(281,198){\sx{1.3}{\rot{0}$y\!=\!\Re\!\Big(r \exp\!\big(q(|x|\!-\!d)\big)\Big)$\ero}} % \put(400,148){\sx{1.3}{\rot{0}$y\!=\!\Im\!\Big(\!\cos(px)\Big)$\ero}} % \put(400, 42){\sx{1.3}{\rot{0}$y\!=\!\Re\!\Big(\!\cos(px)\Big)$\ero}} % \put(242, 24){\sx{1.3}{\rot{0}$y\!=\!\Im\!\Big(r \exp\!\big(q(|x|\!-\!d)\big)\Big)$\ero}} % %\put(618, 65){\sx{2.52}{\rot{4}$y\!=\!\Im(\mathrm{acosq}(x))$\ero}} % \end{picture} % } % \end{document} %

% Copyleft 2012 by Dmitrii Kouznetov