Content uploaded by Christos D. Papageorgiou
Author content
All content in this area was uploaded by Christos D. Papageorgiou on May 25, 2022
Content may be subject to copyright.
Transmission Line and Resonance technique in cylindrical
fibers of non circular cores
E. Georgantzos* C.D. Papageorgiou** and A. C. Boucouvalas *
Email: acb@uop.gr
*University of Peloponnese, Department of Telecommunications and
Informatics
**National technical University of Athens, Department of Electrical
Engineering
Abstract
1.1The transmission lines of a circular cylindrical layer
According to the conventional method of study circular cylindrical optical
fibers with the transmission line theory, the cylindical fiber is divided in
successive thin cylindrical layers. These layers can be extended outside of
the cladding in order to take into consideration the effect of the air (n=1).
Each thin cylindrical layer should have thickness Δr proportional to each
average ‘r’. This means that if :
r=r2−r1
and
r=r
1
+r
2
2
r2−r1
r2+r1
=c
2
¿>
{
1+c
2
1−c
2
r1=r2(out )
1−c
2
1+c
2
r2=r1(¿)
(1)
The refractive index n(r,
φ
) of the fiber with a non circular core in general
can be described as a function of ‘r and
φ
’. Each cylindrical layer of an
average radius
r
is considered to have refractive index ‘n (
φ
)’ value for
r=r
1
+r
2
2
.
For any such circular cylindrical layer Maxwell equations (for a constant
wavelength i.e. constant frequency ‘
ω
’) can be written a
{
∇X
⃗
E=− j ω μ
0
⃗
H
∇X
⃗
H=j ω ε
0
n(φ)
2
⃗
E
(2)
Taking into consideration that
ω μ0=k0z0
ω ε0=k0
z0
Where :
k
0
=ω
c, z
0
=120 π
¿replacing z0
⃗
H wit h
⃗
H
¿order for
⃗
E∧
⃗
H¿h ave t h e same units ∈MKSA (V/m)
Maxwell eauations
become:
{
∇X
⃗
E=− j k0
⃗
H
∇X
⃗
H=j k0n(φ)2
⃗
E
(3)
In circular cylindrical geometry of coordinates (r,
φ
, z) we have the
following set of three partial differential equations.
The first vector Maxwell equation of (3) becomes :
{
1
r
∂ E z
∂ φ −∂ Eφ
∂ z =− j k0Hr
∂ Er
∂ z −∂ E z
∂r =− j k0Hφ
1
r
∂
(
ℜφ
)
∂ r −1
r
∂ Er
∂ φ =− j k0Hz
(4)
Considering a Fourier Transform along ‘z’ and ‘φ’ with wave numbers ‘β’
and ‘
’
l '
, where
l
is integer because along ‘φ’ we have Fourier series of
period 2π, the set (4) becomes:
{
jl
r´
Ez−j β ´
Eφ=− j k0´
Hr
j β ´
Er−∂´
Ez
∂ r =− j k0´
Hφ
1
r
∂
(
r´
Eφ
)
∂ r −jl
r´
Er=− jk 0´
Hz
(5)
Where
´
E
r
,´
E
φ
,´
E
z
,´
H
r
,´
H
φ
,´
H
z
are the F.T s of the respective components.
Furthermore replacing
β
and
r
by their reduced variables according to
the following relations :
{
β
k0
=¿β
r k0=¿r
The set (5) becomes :
{
jl
r´
Ez−j β ´
Eφ=− j´
Hr
j β ´
Er−∂´
Ez
∂ r =− j´
Hφ
1
r
∂
(
r´
Eφ
)
∂ r −jl
r´
Er=− j´
Hz
(6)
Following a similar approach the second Maxwell vector equation (3) can
be written as :
{
jl
r´
Hz−j β ´
Hφ=j n(l)2⊗´
Er
j β ´
Hr−∂´
Hz
∂r =j n (l)2⊗´
Eφ
1
r
∂
(
r´
Hφ
)
∂ r −jl
r´
Hr=j n(l)2⊗´
Ez
(7)
The symbol ⊗ means convolution between the two functions of the
variable φ.
The function
n(φ)2
is a sum of a steady component
n2
and a periodic
function of φ of period 2π thus can be written as a Fourier series
n(φ)2=n2+∑
−∞
+∞
Nkexp (jkφ)
Taking into consideration that the convolution of an exponential function
exp (jkφ)
with any function
A(φ)
of a Fourier Transform
A(l)
is equal to
A(l+k)
, i.e. the convolution it generates “harmonics” .
The function
n(φ)2
is in general a sum of step functions alternating
between the values
n1
2∧n2
2
, where
n1∧n2
are refractive indexes of core and
gladding. Taking into consideration that in optical fibers the refractive
indexes of core and gladding are very close, i.e.
(n¿¿1−n
2
)/n
1
≪1¿
, the
harmonic factors Nk of the function
n(φ)2
are negligible in comparison to
its steady component
n2
and can be omitted.
For example the harmonics are maximizing for equal alternation steps. In
this case the first harmonic is equal to
Α1=2
(
n1
2−n2
2
)
π,
while the steady
component
n2
is equal to
(n¿¿1
2
+n
2
2
)/2¿
thus
Α1/n2
≃2(n¿¿1−n
2
)/n
1
/π≪1¿
.
Thus for optical fibers we can always assume that:
n(l)2
≃
n2
And the system (7) will become equivalent to the following system (8):
{
jl
r´
Hz−j β ´
Hφ=j n2´
Er
j β ´
Hr−∂´
Hz
∂r =jn2´
Eφ
1
r
∂
(
r´
Hφ
)
∂ r −jl
r´
Hr=j n2´
Ez
(8)
Furthermore following a cumbersome analysis, it can be proved that the
system of equations (6) and (8) can be transformed in a set of four
differential equations (9)
relating the equivalent “voltage’ and “current” functions
VM, IM, V E, I E
.
Defined as follows :
V
M
=l´
H
φ
+βr ´
H
z
jF
I
M
=r´
H
r
j=β r ´
Ε
φ
−l´
Ε
z
j
VE=l´
Εφ+βr ´
Ez
F
I
E
=n
2
r´
E
r
=l´
H
z
−βr ´
H
φ
Where :
F=
(
β r
)
2
+l
2
r
{
∂ V M
∂ r =−γ2
jF IM−jM IE
∂ IM
∂ r =− jF V M
∂ V E
∂ r =−γ2
j n2FIE−jM IM
∂ I E
∂ r =− jn2F V E
(9)
Where:
γ
2
=l
2
r
2
+β
2
−n
2
M=2l β
[
(
β r
)
2+l2
]
F
At this point it is noticed that
V
M
, I
M
, V
E
, I
E
are continuous functions at the
boundaries because the tangential components of electric and magnetic
fields
⃗
Hφ
⃗
Hz
and
⃗
Eφ
⃗
Ez
on the cylindrical surface are continuous functions
passing the boundaries’ of the cylindrical layer.
Using the previous relations, the Fourier Transforms of the Electro-
Magnetic field components along (
r,
l
, β
) can be expressed as functions
of their equivalent “voltages” and “currents” functions as follows:
´
H
r
=j I
M
r,´
E
r
=I
E
n
2
r
´
H
φ
=jlV
M
/r−β
FI
E
´
E
φ
=l V
E
/r+jβ
FI
Μ
´
H
z
=l
Fr I
E
+j β V
M
´
Ε
z
=− jl
Fr I
M
+β V
E
It is evident that the equations (9) are representing two interlinked
electric transmission lines.
1.2Decoupling the interlinked equations
In this paper, a rigorous, mathematical method is presented for the
decoupling of the equation (9) based on the eigenvalue theory.
Because the pre-described set of equations (9) constitutes a
homogeneous set of ordinary differential equations of
r
and considering
that the all vectors [
VM, IM, V E, I E
] can become exponential functions of
r
given by
V
M
=V
M
e
ξ r
, I
M
=I
M
e
ξr
, V
E
=V
E
e
ξ r
, I
E
=I
E
e
ξr
, where
VM, IM, V E, I E
are constants i.e. not functions of
r .
Thus the system (8) can be transformed in an algebraic set of the
following four equations
{
ξ V M=−γ2
jF IM−jM I E
ξ IM=− jF V M
ξ V E=−γ2
jn2FIE−jM I M
ξ IE=− j n2F V E
(10)
Replacing
I
M
=−jF
ξV
M
,
I
E
=−j n
2
F
ξV
E
, we obtain a set of two
homogeneous equations
¿
or
¿
Thus
{
(
ξ2−γ2
)
VM+n2MF V E=0
MF V Μ+
(
ξ2−γ2
)
VΕ=0
The equation deriving by equating the determinant of the set equal to
zero gives the eigenvalues of the system of differential equations as
follows
(
ξ
2
−γ
2
)
2
−n
2
M
2
F
2
=0
or
ξ2=γ2±nMF
Hence the system has two eigenvalues and two mutually excluded or
“normal” eigenvectors.
The eigenvectors will be found by replacing
ξ2
by its value.
Thus for
ξ
2
=γ
2
−nMF
,
n
2
MF V
E
−nMF V
M
=0=¿V
M
=n V
E
and the
eigenvector is
V
S
=V
M
+nV
E
While for
ξ2=γ2+nMF
,
V
M
=−n V
E
and the eigenvector becomes
V
d
=V
M
−n V
E
.
Their respective “current” eigenvectors are related as follows
IM
IE
=VM
n2VE
=1
n
,
IM=IE
n
Thus
I
s
=I
M
+I
E
n
,
I
d
=I
M
−I
E
n
Because the function
M=2l β
[
(
β r
)
2+l2
]
F
It is proportional to ‘
l
’ it can be noticed that the set
(
V
s
, I
s
)
, for
l=−l
becomes equal to the set
(
V
d
, I
d
)
.
Thus we can consider as a unique solution, the set
(
V
s
, I
s
)
and the integer
‘
l
’ varying
¿−∞¿+∞
, and of course :
{
∂V s
∂ r =−ξ2
jF Is
∂ I s
∂ r =− jF Is
(11)
Furthermore
Vs, Is
should be continuous functions at their boundaries
although n(r) is varying from layer to layer. This is achieved if we
consider
Vs=VM+nV E=2VM
and
I
s
=I
M
+I
E
n=2I
M
, which are continuous
functions of r by definition.
Thus:
{
∂V
M
∂r =−ξ
2
jF I
M
∂ I
M
∂ r =− jF I
M
(12)
Another option for achieving continuity is to consider the functions
V
ss
=V
M
n+V
E
and
Iss=n I M+IE
. In this case
Vss=2VE
and
Iss=2IE
that are
also continuous. Thus
{
∂ V
E
∂ r =−ξ
2
j n
2
FI
E
∂ I
E
∂ r =− jF n
2
I
E
(13)
Thus the set of two interlinked transmission lines (9) is equivalent to two
independent transmission lines (12) and (13).
The two waves represented by the equations of transmission lines (12)
and (13), are normal because the first is related to Magnetic field and the
second to Electric field that are geometrically normal for transmitted EM
waves. This property is inherent of EM waves in optical fibers related to
birefringence phenomena.
1.3 The equivalent T-circuit of the cylindrical layer
Taking into consideration the transmission line theory, it can be proved
that each layer of infinitesimal thickness δr is equivalent to a T-circuit, as
shown in figure (1) for
(
Vs, Is
)
Fig 1
Where :
{
Z
B
=s
jF tanh
[
(
ξδ r
)
2
]
Z
p
=ξ
jF sinh
(
ξδ r
)
For
ξ r ≪1
the impedances can be approximated by the relations (12).
{
Z
B
=
ξ
2
(
δ r
2
)
jF
Z
p
=1
jF δ r
(14)
If
ξ2>0
, both
Z
B
, Z
p
are “capacitive” reactances, for
ξ2<0
however
ZB
becomes “inductive” reactance.
For
(
Vss , Iss
)
the approximate respective impedances of the T-circuit are
given by (13)
{
Z'
B=
ξ2
(
δ r
2
)
j n2F
Z'
p=1
j n2F δ r
(15)
1.4 The Overall Transmission Line of the Fibre
As previously stated the functions
(
VM, I M
)
of each layer are continuous at
the cylindrical boundaries of the layer, thus if we divide the fiber
(including a sufficient air layer) in successive thin layers and replace
them by their equivalent T-circuits, an overall lossless transmission line is
formed with only reactive elements.
For given ‘
l
’, the ‘
β
’’ values that lead to the resonance of the overall
transmission line are the eigenvalues of the whole optical fiber.
When a transmission line is in resonance at any point
r0
of the line, the
sum of reactive impedances arising from the successive T-circuits on the
left and right sides of
r0
should be equal to zero, thus the equation giving
the eigenvalues of the transmission line is the following :
{
´
ZL .r 0+´
ZR .r0=0
(16)
The equation (16) provides the eigenvalues ‘
β
‘ for a given ‘
l
’ , where
´
ZL. r0,´
ZR .r0
are the overall reactive impedances of successive T-circuits on
the left and right of
r0
, using (12) or (13).
For the same ‘
l
’
the equations (12) or (13) and (16) give usually different
values of
‘β’
,this phenomenon is called “Birefringence”. For circular
step index fibres the birefringence is negligible, however for elliptic
fibers and fibers of any other non uniform circular layers along ‘φ’ the
birefringence phenomenon is not negligible.
1.5 The Terminal Impedances
In order to calculate the overall reactive impedances on the left and right
of
r0
we should find the impedances for
r0→0
and
r0→ ∞
. As we proceed
to 0 or to
∞
the remaining piece of transmission line becomes
“homogeneous” i.e. its overall reactive impedance is equal to its
characteristic impedance given by
Z=ξ
jF
(
¿ξ
j n
2
F
)
For
r → ∞ F → β
2
r , MF → 0∧ξ →
√
β
2
−n
2
thus
Zr →∞ =0
For
r → 0F → l
2
r∧ξ → l
r
thus
Z
r →0
=1
jl
(
¿1
j n
2
l
)
For
l=0
Z
r →0
=∞
(open circuit at the center of the equivalent transmission
line)
It is useful to notice that there is the following equivalence between our
formulation and the classic formulation modes of optical fibers.
For
l=0
the modes (
VM,IM)
are the TM modes ,while the modes (
VE,IE)
are the TE modes.
For
l>0
the modes (
VM,IM )
are the HE modes ,while the modes (
VE,IE)
are their HE birefringence modes.
For
l<0
the modes (
VM,IM )
are the EH modes ,while the modes (
VE,IE )
are their EH birefringence modes.
1.6Application to elliptic core fibers
!"#!$%&''#!$%
##' (#)#
V=b∗2∗π
√
n
1
2
−n
2
2
"
*$%&%&%&%+%
#,%-
#.&+%+/+%0%
(#!
1&2
(n¿¿1∗φ¿¿1+n2∗φ2)/π¿ ¿
11&φ1 ,φ2
&
%,-3-4'-!-%
+
!"#$$$
%
& &++++++ &+ 5+&+++++
+&+++
' &+++++++++ &++ 5+&+++++
+&
( &++++++++ &+ 5+&+++++ +&
) &+++++++++ &+++ 5+&+++++
+&++
)* &++++++++ &+++ 5+&++++
+&
)& &+++++++++ &+++ 5+&+++++
+&++
)' &+++++++ &++ 5+&++++
+&
)( &+++++++ &+ 5+&++++++ +&++
* &++++++++ &++ 5+&+++++
+&
** &++++++++++ &++ 5+&++++
+&++
*
!"#$$$
%
& &++++++ &+++ +&++++++
+&+
' &++++++++ &++ +&+++++
+&+
( &+++++++ &++ +&++++
+&+
) &+++++++ &++ +&+++++
+&+++
)* &++++++++ &++++++ +&++++
+&+
)& &++++++++ &+++++ +&++++++
+&+
)' &+++++++ &++ +&++++
+&
)( &+++++++ &+++ +&++++
+&+
* &+++++++++ &+++ +&+++++
+&++++
+
** &+++++++ &+++ +&+++++
+&
&
!"#$$$
%
& &++++++++ &++ +&++++
+&+
' &++++++ &++++ +&+++++
+&
( &++++++++ &++++ +&++++
+&+++
) &+++++++++ &++ +&++++
+&
)* &+++++++ &+ +&+++++
+&+
+
)& &++++++++ &++ +&++++++
+&+
)' &++++++++ &++ +&+++++ +&++
)( &++++++++ &++ +&+++++ +&
* &++++++++ &+++ +&++++++
+&
** &+++++++++ &+ +&++++
+&
)
!"#$$$
%
& &+++++++++ &+ +&++++
&
+
' &++++++++ &+++ +&+++
&
+
( &+++++++++ &+++ +&+++
&
) &+++++++ &++ +&+++++
&
)* &++++++ &++++ +&++++
&+++
)& &++++++++ &+++ +&++++++
+&
)' &++++++++++ &+ +&+++
+&+
)( &+++++++ &++ +&++++++
+&+
* &++++++++ &+++ +&+++++
+&
** &++++++++ &+ 5+&++++
+&+
1.7Application to orthogonal core fibers
' "#!$%&''
#!$%&##' (#)#
V=b∗2∗π
√
n
1
2
−n
2
2
"*$%&%&%&%+%
''
,"6!%
(#!
1&2
(n¿¿1∗φ¿¿1+n2∗φ2)/π¿ ¿
11&φ1 ,φ2
&''
'%,-3-4'-!4%
+,,+
""-./ !0102"
+!3!212/#% +!3!212/#% +!3!212/#% +4/05"4
& +&++++++++++ +&+++++ +&+++++ &++
' +&+++++++++++ +&+++++ +&+++++ &++
( +&++++++++++++ +&++++++ +&++++ &++++
) +&++++++++++ +&++++ +&+++++ &+++++
)* +&++++++++++ +&+++++ +&+++++ &+
)& +&++++++++++ +&++++ +&++++ &++
)' +&+++++++++++ +&+++++ +&+++++ &+
)( +&+++++++++++ +&+++++ +&++++ &+++
* +&++++++++++++ +&++++++ +&++++++ &+++
** +&++++++++++++ +&++++++ +&+++++ &+
+,,+
""-./ !0102"
* +!3!212/#% +!3!212/#% +!3!212/#% +4/05"4
& +&+++++++++ +&++++ +&+++++++ &+
' +&++++++++++ +&+++++++ +&+++++ &+++
( +&++++++++++ +&++++++ +&+++++ &+++
) +&+++++++++ +&++++ +&++++ &+++
)* +&+++++++++ +&++++ +&+++++ &+
)& +&++++++++++ +&++++ +&+++++ &++
)' +&+++++++++ +&+++++ +&+++++ &++
)( +&++++++++++ +&+++++ +&++++ &++
* +&++++++++++++ +&+++++ +&++++ &+
** +&++++++++++ +&++++ +&++++ &+
+,,+
""-./ !0102"
& +!3!212/#% +!3!212/#% +!3!212/#% +4/05"4
& +&+++++++++++ +&++++ +&++++ &+++
' +&++++++++++ +&+++++ +&+++++ &++++
( +&++++++++++ +&++++ +&++++++ &++++
) +&++++++++++ +&++++++ +&+++++ &+++
)* +&++++++++++ +&++++ +&++++ &++
)& +&++++++++++++ +&++++ +&++++ &+++
)' +&++++++++++ +&+++++ +&++++ &+
)( +&++++++++++ +&++++ +&++++++ &+++
* +&+++++++++ +&+++++ +&++++ &+++
** +&+++++++++++ +&++++ +&+++++++ &+
+,,
+
""-./ !0102"
)+!3!212/
#% +!3!212/#% +!3!212/#% +4/05"4
& +&++++++++++
+%+++++
+&+++++
+
&++
+
' +&++++++++++
+%++++
+&+++
+
&++
+
( +&+++++++++++
+%++++
+&++++
+
&+++
+
) +&+++++++++++
+%++++
+&++++
+
&+
+
)* +&+++++++++
+%++++
+&+++++
+
&++
+
)& +&++++++++++
+%++++
+&++++
+
&+
+
)' +&+++++++++++
+%++++
+&+++++
+
&+++
+
)( +&++++++++++
+%+++
+&+++++
+
&++
+
* +&++++++++++
+%++++
+&+++++
+
&+
+
** +&+++++++++++
+%+++
+&++++
+
&++
+
1.8 Conclusion
The presented Transmission Line method can be used, with a negligible
error, in cases of cylindrical fibers of core of any shape, as long as the
difference in core to gladding refractive indexes are close as happens in
almost all the monomode fibers.
APPENDIX A
The root function for the fundamental mode for an elipse of a an b semi
axis, given V, ab=a/b, l=1 and tm=0 or 2 (for the birefringence) differing
modes given the n1 and n2 refractive indexes.
function y=eureln(b)
% ELIPSE
global n1 n2 V ab aa bb tm l
bb=V/sqrt(n1^2-n2^2);
aa=ab*bb;
r0=bb;
N=400;
qq=100;
% qq is the outer maximum radius to core radius and the ratio of core
radius to minimun core radius
wq=qq^(1/N);
w=2*(wq-1)/(wq+1);
% w is the ratio of radius to layer thickness
rn0=eur_ref2(0);
zs(1)=1/(rn0^tm*(l+10^-7));
zs(2)=0;
for i=1:N
jj=N+1-i;
r1(i,1)=r0*(1/wq^jj+1/wq^(jj-1))/2;
r1(i,2)=r0*(wq^jj+wq^(jj-1))/2;
end
j1=1;
for i=1:N
r=r1(i,j1);
rn=eur_ref2(r);
dr=w*r;
aa1=b^2+(l/r)^2;
zp=1/(dr*r*rn^tm*aa1);
cs=aa1-rn^2-2*rn*b*l/(aa1*r^2);
zb=0.5*cs*dr^2.0*zp;
zs1=zs(j1)+zb+zp;
zs(j1)=(zs(j1)+zb)*zp/zs1+zb;
end
j1=2;
for i=1:N
r=r1(i,j1);
rn=eur_ref2(r);
dr=w*r;
aa1=b^2+(l/r)^2;
zp=1/(dr*r*rn^tm*aa1);
cs=aa1-rn^2-2*rn*b*l/(aa1*r^2);
zb=0.5*cs*dr^2.0*zp;
zs1=zs(j1)+zb+zp;
zs(j1)=(zs(j1)+zb)*zp/zs1+zb;
end
y=-real(zs(1)+zs(2));
The function of the steady component calculation of the refractive index
as function of the radius r of an elliptical core fiber.
function fn=eur_ref2(r)
% ELIPSE
global n1 n2 bb aa
if r<=bb;
fn=n1;
elseif r>bb && r<aa;
c1=(1/r^2-1/aa^2)/(1/bb^2-1/aa^2);
cc=2*asin(sqrt(c1));
fn=sqrt((n2^2*(pi-cc)+cc*n1^2)/pi) ;
else fn=n2;
end
APPENDIX B
The root function for the fundamental mode for a rectangle of a an b semi
sides, given V, ab=a/b, l=1 and tm=0 or 2 (for the birefringence)
differing modes given the n1 and n2 refractive indexes.
function y=eureln1(b)
% RECTANGLE
global n1 n2 V tm l aa bb
bb=V/sqrt(n1^2-n2^2);
aa=ab*bb;
r0=bb;
N=400;
qq=100;
% qq is the outer maximum radius to core radius and the ratio of core
radius to minimun core radius
wq=qq^(1/N);
w=2*(wq-1)/(wq+1);
% w is the ratio of radius to layer thickness
rn0=eur_ref3(0);
zs(1)=1/(rn0^tm*(l+10^-7));
zs(2)=0;
for i=1:N
jj=N+1-i;
r1(i,1)=r0*(1/wq^jj+1/wq^(jj-1))/2;
r1(i,2)=r0*(wq^jj+wq^(jj-1))/2;
end
j1=1;
for i=1:N
r=r1(i,j1);
rn=eur_ref3(r);
dr=w*r;
aa1=b^2+(l/r)^2;
zp=1/(dr*r*rn^tm*aa1);
cs=aa1-rn^2-2*rn*b*l/(aa1*r^2);
zb=0.5*cs*dr^2.0*zp;
zs1=zs(j1)+zb+zp;
zs(j1)=(zs(j1)+zb)*zp/zs1+zb;
end
j1=2;
for i=1:N
r=r1(i,j1);
rn=eur_ref3(r);
dr=w*r;
aa1=b^2+(l/r)^2;
zp=1/(dr*r*rn^tm*aa1);
cs=aa1-rn^2-2*rn*b*l/(aa1*r^2);
zb=0.5*cs*dr^2.0*zp;
zs1=zs(j1)+zb+zp;
zs(j1)=(zs(j1)+zb)*zp/zs1+zb;
end
y=-real(zs(1)+zs(2));
The function of the steady component calculation of the refractive index
as function of the radius r of an rectangular core fiber.
function fn=eur_ref3(r)
%RECTANGLE
global n1 n2 bb aa
cc=sqrt(aa^2+bb^2);
if r<=bb;
fn=n1;
elseif r>bb && r<aa;
c=2*asin(bb/r);
fn=sqrt((n2^2*(pi-c)+c*n1^2)/pi) ;
else fn=n2;
end
if r>aa & r<cc;c=2*(asin(bb/r)-acos(aa/r));
fn=sqrt((n2^2*(pi-c)+c*n1^2)/pi);
end
The root finding function of elliptic
function fy=eurelzeron
global ab V n1 n2 tm
for n=1:50;x(n)=n2+(n1-n2)/49*(n-1);
y(n)=eureln(x(n));end
L=0;
for n=1:49; yy(n)=y(n)*y(n+1);
if yy(n)<0 && y(n)>0;L=L+1;
fz(L)= fzero(@eureln,[x(n),x(n+1)]);
end
end
if L>0; fy=max(fz);else fy=n2;end
+