summaryrefslogtreecommitdiff
path: root/Concise_Physics_by_H_Matyaka/3-Waves.ipynb
diff options
context:
space:
mode:
authorPrashant S2020-04-14 10:25:32 +0530
committerGitHub2020-04-14 10:25:32 +0530
commit06b09e7d29d252fb2f5a056eeb8bd1264ff6a333 (patch)
tree2b1df110e24ff0174830d7f825f43ff1c134d1af /Concise_Physics_by_H_Matyaka/3-Waves.ipynb
parentabb52650288b08a680335531742a7126ad0fb846 (diff)
parent476705d693c7122d34f9b049fa79b935405c9b49 (diff)
downloadall-scilab-tbc-books-ipynb-master.tar.gz
all-scilab-tbc-books-ipynb-master.tar.bz2
all-scilab-tbc-books-ipynb-master.zip
Merge pull request #1 from prashantsinalkar/masterHEADmaster
Initial commit
Diffstat (limited to 'Concise_Physics_by_H_Matyaka/3-Waves.ipynb')
-rw-r--r--Concise_Physics_by_H_Matyaka/3-Waves.ipynb211
1 files changed, 211 insertions, 0 deletions
diff --git a/Concise_Physics_by_H_Matyaka/3-Waves.ipynb b/Concise_Physics_by_H_Matyaka/3-Waves.ipynb
new file mode 100644
index 0000000..d4a2733
--- /dev/null
+++ b/Concise_Physics_by_H_Matyaka/3-Waves.ipynb
@@ -0,0 +1,211 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 3: Waves"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.1: refraction_and_incidence_angle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"clear\n",
+"//calculation of angle of refraction\n",
+"rj=(sind(6)/0.76)//from snells law\n",
+"x=asind(rj)\n",
+"printf('the refractive index of jelly is %3.3f deg',x)\n",
+"// calculating angle of incidence\n",
+"printf('\nsince angle of refraction and angle of incidence are alternate angles , angle of incidence is %3.3f deg',x)\n",
+"//calculating angle of refraction\n",
+"np=0.59/0.76 // according to relationship of media\n",
+"jnp=sind(7.9)/0.78\n",
+"rp=asind(jnp)\n",
+"printf('\nthe angle of refraction is %3.3f deg',rp)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.2: critical_angle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"clear\n",
+"//input data\n",
+"a=1.28 //refractive index of X\n",
+"b=1.41 //refractive index of Y\n",
+"//calculation of condition for total internal reflection\n",
+"x=(a/b) \n",
+"c=asind(x) // calculating critical angle\n",
+"//output\n",
+"printf('light incident with an angle greater than %3.3f degrees will be totally internally reflected',c)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.3: wavespeed_in_medium.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"clear\n",
+"//input data\n",
+"nb=0.67 //refractive index\n",
+"va=3.45*10^3\n",
+"//calculation\n",
+"vb=va/nb //snells law\n",
+"//output\n",
+"printf('the speed of the wave in medium b is %3.3f m/s',vb)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.4: frequency_for_antinode.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"clear\n",
+"//input data\n",
+"f=120 //lowest frequency \n",
+"//calculation\n",
+"x=3*f // the next higher frequency is thrice the lowest frequency\n",
+"//output\n",
+"printf('the next higher frequency where the antinode is formed is at %3.3f Hz',x)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.5: wave_frequency_speed.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"clear\n",
+"//input data\n",
+"amp=3.4*10^-5 //amplitude of the wave\n",
+"af=5.7*10^2 //angular frequency\n",
+"k=20 //wavenumber\n",
+"//calculation\n",
+"//wave frequency\n",
+"f=af/(2*%pi)\n",
+"l=(2*%pi)/k\n",
+"v=f*l\n",
+"printf('the wave frequency is %3.3f and the speed is %3.3f m/s',f,v)\n",
+"//calculating greatest speed for the wave to pass through\n",
+"vmax=af*amp //greatest speed\n",
+"//output\n",
+"printf('\nthe greatest value of speed for the wave to pass through is %3.3f m/s',vmax)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.6: wave_attributes.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"clear\n",
+"//input\n",
+"k=16\n",
+"w=23\n",
+"//calculation\n",
+"//1.wavelength\n",
+"l=2*%pi/k\n",
+"//output\n",
+"printf('the wavelength is %3.3f m',l)\n",
+"//2.wavespeed\n",
+"v=(l*w)/(2*%pi)\n",
+"printf('\nthe wavespeed is %3.3f m/s',v)\n",
+"//3.pase difference\n",
+"pha=(0.5*2*%pi)/0.39 // phase difference of molecules 0.5m apart \n",
+"printf('\n the phase difference is %3.3f radians',pha)"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}