{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Guide d'onde\n",
"\n",
"### TD EM8b exercice 1\n",
"\n",
"On considère la propagation d'une onde électromagnétique entre deux plans conducteurs parfaits $y=0$ et $y=a$.\n",
"On suppose l'onde polarisée suivant $\\vec{u}_z$ et on cherche des solutions de l'équation de d'Alembert sous la forme:\n",
"\n",
"$$\\vec{\\underline{E}}=\\left[\n",
"Ae^{{\\rm i}k_2 y} +Be^{-{\\rm i}k_2 y}\n",
"\\right]\n",
"e^{{\\rm i}(\\omega t - k_1 x)}\n",
"\\vec{u}_z=E_z(x,y,z,t)\\vec{u}_z$$\n",
"\n",
"La composante tangentielle du champ électrique s'annule à la surface du conducteur. Cela impose les deux conditions aux limites:\n",
"\n",
"$\\forall t \\quad \\forall x \\quad \\forall z$ \n",
"\n",
"$E_z(x,0,z,t)=0$\n",
"\n",
"$E_z(x,a,z,t)=0$\n",
"\n",
"On en déduit \n",
"\n",
"$$\\vec{\\underline{E}}=-2A\\sin(n\\frac{\\pi}{a}y)\\sin(\\omega t - k_1 x)\\vec{u}_z \\quad n\\in \\mathbb{N}^*$$\n",
"\n",
"avec $k_1=\\sqrt{\\left(\\frac{\\omega}{c}\\right)^2-n^2\\frac{\\pi^2}{a^2}}$\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"%display latex\n",
"a=0.1\n",
"omega=2*pi*5*10^9 # on prend une fréquence de 5 GHz (deux modes possible: 1 et 2)\n",
"c=3e8"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
""
],
"text/latex": [
"\\begin{math}\n",
"\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\left(x, y, n, t\\right)\n",
"\\end{math}"
],
"text/plain": [
"(x, y, n, t)"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"var('x,y,n,t')"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
""
],
"text/latex": [
"\\begin{math}\n",
"\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\sqrt{-100.000000000000 \\, \\pi^{2} n^{2} + 1111.11111111111 \\, \\pi^{2}}\n",
"\\end{math}"
],
"text/plain": [
"sqrt(-100.000000000000*pi^2*n^2 + 1111.11111111111*pi^2)"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"k1=sqrt((omega/c)^2-(n*pi/a)^2);k1"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
""
],
"text/latex": [
"\\begin{math}\n",
"\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\left( x, y, n, t \\right) \\ {\\mapsto} \\ -0.0200000000000000 \\, \\sin\\left(10.0000000000000 \\, \\pi n y\\right) \\sin\\left(10000000000 \\, \\pi t - \\sqrt{-100.000000000000 \\, \\pi^{2} n^{2} + 1111.11111111111 \\, \\pi^{2}} x\\right)\n",
"\\end{math}"
],
"text/plain": [
"(x, y, n, t) |--> -0.0200000000000000*sin(10.0000000000000*pi*n*y)*sin(10000000000*pi*t - sqrt(-100.000000000000*pi^2*n^2 + 1111.11111111111*pi^2)*x)"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Ez(x,y,n,t)=-0.02*sin(n*pi*y/a)*sin(omega*t-k1(n)*x);Ez"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Mode n=1 "
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"borne1=2*pi/k1(1) "
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n"
],
"text/plain": [
"Graphics3d Object"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"plot3d(Ez(x,y,1,0), (x,0,3*borne1) ,(y,0,a))"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"T=2*pi/omega"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"mode1=animate([plot3d(Ez(x,y,1,k*0.05*T), (x,0,3*borne1) ,(y,0,a),\n",
" axes_labels=['x','y','Ez']) for k in range(20)]).interactive()\n"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n"
],
"text/plain": [
"Graphics3d Object"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show(mode1,delay=5)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Mode n=2"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"borne2=2*pi/k1(2)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"mode2=animate([plot3d(Ez(x,y,2,k*0.05*T), (x,0,3*borne2) ,(y,0,a),\n",
" axes_labels=['x','y','Ez']) for k in range(20)]).interactive()\n"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n"
],
"text/plain": [
"Graphics3d Object"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show(mode2,delay=5)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "SageMath 9.2",
"language": "sage",
"name": "sagemath"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
}
},
"nbformat": 4,
"nbformat_minor": 4
}