"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
" \n",
"\n",
"import scipy\n",
"\n",
"#Variable Declaration\n",
" \n",
"a=5*10**-2 #in m\n",
"b=4*10**-2 #in m\n",
"c=10*10**-2 #in m\n",
"C=5.8*10**7 #in mhos/m\n",
"Uo=4*scipy.pi*10**-7 #permeability of free space\n",
"u=3*10**8 #speed of wave in m/s\n",
"\n",
"#Calculations\n",
"\n",
"def f(m,n,p):\n",
" fr=scipy.sqrt((m/a)**2+(n/b)**2+(p/c)**2)*u/2 #resonant frequency in Hz\n",
" print round(fr*10**-9,3)\n",
" \n",
"\n",
"f101=3.35*10**9\n",
"d=scipy.sqrt(1/(scipy.pi*f101*Uo*C))\n",
"Q=(a*a+c*c)*a*b*c/(d*(2*b*(a**3+c**3)+a*c*(a*a+c*c))) #quality factor\n",
"\n",
"#Results\n",
"\n",
"print 'Thus the five lowest order modes in ascending order are '\n",
"print 'TE101, frequency in GHz ='\n",
"f(1,0,1)\n",
"print 'TE011, frequency in GHz ='\n",
"f(0,1,1)\n",
"print 'TE102, frequency in GHz ='\n",
"f(1,0,2)\n",
"print 'TE110, frequency in GHz ='\n",
"f(1,1,0)\n",
"print 'TE111 or TM111, frequency in GHz ='\n",
"f(1,1,1)\n",
"print 'Quality factor =',round(Q,0)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Thus the five lowest order modes in ascending order are \n",
"TE101, frequency in GHz =\n",
"3.354\n",
"TE011, frequency in GHz =\n",
"4.039\n",
"TE102, frequency in GHz =\n",
"4.243\n",
"TE110, frequency in GHz =\n",
"4.802\n",
"TE111 or TM111, frequency in GHz =\n",
"5.031\n",
"Quality factor = 14358.0\n"
]
}
],
"prompt_number": 6
}
],
"metadata": {}
}
]
}