+ " currentvalue={\"prefix\": \"Time Constant T : \"},\n",
" pad={\"t\": 90}, #distance of the sliding bar from the x axis\n",
" steps=taws\n",
")]\n",
"\n",
"fig.update_layout(\n",
" sliders=sliders\n",
")\n",
"fig.data[0].visible = True\n",
"fig.show()"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'\\n1. Show a cicuit diagram with a key to switch between charging and discharging circuits as in the youtube video\\n2. Show the graph of Voltage and Current as a function of time.\\n3. Vary the time as multiples of the time constant. Show how much percent of the total voltage and current is present. May be it can be indicated with two progress bars.\\n\\nRef:\\nhttps://www.youtube.com/watch?v=X5bzjs3ByBU\\nhttps://electronicspani.com/charging-and-discharging-of-capacitor/\\n'"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#charge and discharge of a condensator\n",
"\"\"\"\n",
"1. Show a cicuit diagram with a key to switch between charging and discharging circuits as in the youtube video\n",
"2. Show the graph of Voltage and Current as a function of time.\n",
"3. Vary the time as multiples of the time constant. Show how much percent of the total voltage and current is present. May be it can be indicated with two progress bars.\n",
"A wave is a disturbance of a field in which a physical attribute oscillates repeatedly at each point or propagates from each point to neighboring points, or seems to move through space. \n",
"\n",
"\n",
"# Examples : \n",
"\n",
"Wave | Field/medium | Oscillating attribute \n",
"--- | --- | --- \n",
"Water wave | Water | Water height\n",
"Sound wave | Air | Denisty of air\n",
"vibration in a string | \n",
"Mexican wave | people | height of raised hands\n",
"EM wave | EM field | Field amplitude \n",
"\n",
"\n",
"# Derivation of the 1D wave equation : \n",
"\n",
"The disturbance could be any function of $x$, for example: \n",
"Let us think of such a disturbance moving in the positive $x$ direction with a constant speed $v$. Since the disturbance is moving, it must be described by a function of position as well as time $\\psi(x,t)$. The shape of the disturbance at a particular time, say $t=0$, can be found by plugging the value of time as a particular constant (for example $0$). In this case, $\\psi(x,t)|_{t=0} = \\psi(x,0)$ represents the $\\textbf{profile}$ of the wave at that time. In more intuitive terms, this is analogous to taking a photograph of a pulse as it travels by. We limit ourselves to a wave that does not change it's shape as it travels through space, i.e., in time $t$, it travels a distance $vt$ but remains unchanged in all other aspects. \n",
"\n",
"Let us move to a new coordinate system ($S'$) that travels in the same direction as the wave with the same velocity, and shares the origin with the frame $S$ at time $t=0$. In this frame, the wave appears to be stationary and is no longer a function of time. Here, the coordinate is $x'$ rather than $x$. It follows that: \n",
"\n",
"$$ x' = x - vt$$\n",
"\n",
"And thus, by substituting we get, \n",
"\n",
"$$ \\psi(x,t) = f(x-vt) $$\n",
"\n",
"This represents the most general form of a 1D $\\textbf{wavefunction}$. To recap: \n",
"\n",
"- Choose a profile by choosing a function $f(x)$\n",
"- Substitute $x-vt$ instead of $x$ in $f(x)$.\n",
"\n",
"This gives a wave travelling in the positive $x$-direction with a speed $v$.\n",
"\n",
"For example : \n",
"$f(x) = e ^{-a x^2}$ gives a bell shaped profile. \n",
"$\\psi (x,t) = e ^{-a (x-vt)^2}$ gives a bell shaped disturbance travelling in the $+x$ direction with velocity $v$.\n",
"\n",
"(Animation needed here)\n",
"\n",
"## Wave equation\n",
"\n",
"We will now derive the wave equation using the information that the most basic form of waves travelling at a fixed velocity requires two constants to specify it (amplitude and frequency/wavelength), this suggests second derivatives. To relate the space and time dynamics of $\\psi(x,t)$, take the partial derivative of $\\psi(x,t) = f(x')$ w.r.t $x$. Using $x' = x \\pm vt$: \n",
"(because it takes the same value in the entire plane). What may be easier mathematically is not always physical (infinitely extended wave in this case)\n",
"\n",
" # Demo of plane wave in 3D (try to implement plane_wave1 and plane_wave2 side by side for easier understanding) then using only plane_wave2, the shift to explaining polarisation can be made.\n",
" \n",
" # Equations and animations for circular, radial and azimuthal polarisation. \n",
" \n",
"\n",
"\n",
" \n",
"\n",
" \n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Superposition of waves\n",
"\n",
"Analytical expressions and animation for sinusoidal waves:\n",
"\n",
"\n",
"Important cases : \n",
"\n",
"Standing waves \n",
"\n",
"Beats pattern\n",
"\n",
"Constructive and destructive interference\n",
"\n",
"Reflection and transmission of waves (can be used as a link to Fresnel coefficients)\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Polarisation \n",
"\n",
"Property of transverse waves which specifies the geometric orientation of the oscillation.\n",
"\n",
"Analytical expression of sinusoidal wave with labels and diagram.\n",
"\n",
"Animations: \n",
"\n",
"linear polarisation\n",
"\n",
"Circular polarisation\n",
"\n",
"Elliptic polarisation.\n",
"\n",
"Idea for animation : Show the wave amplitude along with the projection on two perpendicular axis to clarify idea of superposition."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Food for thought / fun questions and applications\n",
"\n",
"Superposition of waves with opposite amplitude interfering gives no wave at some point. Energy conservation???\n",