summaryrefslogtreecommitdiff
path: root/Engineering_Physics/chapter5_2.ipynb
blob: 66e0fe37ef86fe0f69058a2e0b98c199c22f3493 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
{
 "metadata": {
  "name": "chapter5"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": "Superconductivity"
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 5.1, Page number 148"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the critical feild at 2K\n\n#importing modules\nimport math\n\n#Variable declaration\nTc=3.7;        #in kelvin\nHc_0=0.0306;         \nT=2\n\n#Calculation\nHc_2k=Hc_0*(1-((T/Tc)**2));\nHc_2k=math.ceil(Hc_2k*10**5)/10**5;   #rounding off to 5 decimals\n\n#Result\nprint(\"the critical feild at 2K in tesla is\",Hc_2k);\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "('the critical feild at 2K in tesla is', 0.02166)\n"
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 5.2, Page number 149\n"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the critical current\n\n#importing modules\nimport math\n\n#Variable declaration\nT=4.2;                     #in kelvin\nTc=7.18;                   #in kelvin\nHc_0=6.5*10**4;            #in amp per meter\nD=10**-3\n\n#Calculation\nR=D/2;                      #radius is equal to half of diameter\nHc_T=Hc_0*(1-((T/Tc)**2));\nHc_T=math.ceil(Hc_T*10)/10;   #rounding off to 1 decimals\nIc=2*math.pi*R*Hc_T        #critical current is calculated by 2*pi*r*Hc(T)\nIc=math.ceil(Ic*10**2)/10**2;   #rounding off to 2 decimals\n\n#Result\nprint(\"the critical feild in Tesla is\",round(Hc_T));\nprint(\"the critical current in Amp is\",Ic);\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "('the critical feild in Tesla is', 42759.0)\n('the critical current in Amp is', 134.34)\n"
      }
     ],
     "prompt_number": 19
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 5.3, Page number 149\n"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the pentration depth at 0k\n\n#importing modules\nimport math\n\n#Variable declaration\nlamda_T=75          #in nm\nT=3.5          \nHgTc=4.12          #in K\n\n#Calculation\nlamda_o=lamda_T*math.sqrt(1-((T/HgTc)**4));\nlamda_o=math.ceil(lamda_o*10**2)/10**2;   #rounding off to 2 decimals\n\n#Result\nprint(\"the pentration depth at 0k is\",lamda_o);",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "('the pentration depth at 0k is', 51.92)\n"
      }
     ],
     "prompt_number": 29
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 5.4, Page number 150"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the critical magnitude\n\n#importing modules\nimport math\n\n#Variable declaration\nlamda_T1=396             #pentration depth in armstrong\nlamda_T2=1730            #pentration depth in armstrong\nT1=3                     #temperature in K\nT2=7.1                   #temperature in K\n\n#Calculation\n#lamda_T2**2=lamda_0**2*(((Tc**4-T2**4)/Tc**4)**-1)\n#lamda_T1**2=lamda_0**2*(((Tc**4-T1**4)/Tc**4)**-1)\n#dividing lamda_T2**2 by lamda_T1**2 = (Tc**4-T1**4)/(Tc**4-T2**4)\n#let A=lamda_T2**2 and B=lamda_T1**2\nA=lamda_T2**2\nB=lamda_T1**2\nC=A/B\nC=math.ceil(C*10**4)/10**4;   #rounding off to 4 decimals\nX=T1**4\nY=T2**4\nY=math.ceil(Y*10**2)/10**2;   #rounding off to 2 decimals\n#C*((TC**4)-Y)=(Tc**4)-X\n#C*(Tc**4)-(Tc**4)=C*Y-X\n#(Tc**4)*(C-1)=(C*Y)-X\n#let Tc**4 be D\n#D*(C-1)=(C*Y)-X\nD=((C*Y)-X)/(C-1)\nD=math.ceil(D*10)/10;   #rounding off to 1 decimals\nTc=D**(1/4)\nTc=math.ceil(Tc*10**4)/10**4;   #rounding off to 4 decimals\n\n#Result\nprint(\"the pentration depth at 0k is\",Tc);",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "('the pentration depth at 0k is', 7.1932)\n"
      }
     ],
     "prompt_number": 44
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 5.5, Page number 150"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the critical feild at 5K\n\n#importing modules\nimport math\n\n#Variable declaration\nTc=7.2            #in K\nHo=6.5*10**3      #in amp per m\nT=5               #in K\n\n#Calculation\nHc=Ho*(1-((T/Tc)**2))\nHc=math.ceil(Hc*10**2)/10**2;   #rounding off to 2 decimals\n\n#Result\nprint(\"the critical magnetic feild at 5K in amp per m is\",Hc)\n\n# answer given in the book is wrong",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "('the critical magnetic feild at 5K in amp per m is', 3365.36)\n"
      }
     ],
     "prompt_number": 33
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 5.6, Page number 151"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the critical feild at 2.5K\n\n#importing modules\nimport math\n\n#Variable declaration\nTc=3.5            #in K\nHo=3.2*10**3      #in amp per m\nT=2.5             #in K\n\n#Calculation\nHc=Ho*(1-((T/Tc)**2))\nHc=math.ceil(Hc*10**2)/10**2;   #rounding off to 2 decimals\n\n#Result\nprint(\"the critical magnetic feild at 5K in amp per m is\",Hc)\n\n#answer in the book is wrong",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "('the critical magnetic feild at 5K in amp per m is', 1567.35)\n"
      }
     ],
     "prompt_number": 45
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 5.7, Page number 151"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the transition temperature\n\n#importing modules\nimport math\n\n#Variable declaration\nHc=5*10**3        #in amp per m\nHo=2*10**4        #in amp per m\nT=6               #in K\n\n#Calculation\nTc=T/math.sqrt(1-(Hc/Ho))\nTc=math.ceil(Tc*10**2)/10**2;   #rounding off to 2 decimals\n\n#Result\nprint(\"the critical magnetic feild at 5K in amp per m is\",Tc)\n\n#answer in the book is wrong",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "('the critical magnetic feild at 5K in amp per m is', 6.93)\n"
      }
     ],
     "prompt_number": 66
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 5.8, Page number 152"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the critical current\n\n#importing modules\nimport math\n\n#Variable declaration\nHc=2*10**3        #in amp per m\nR=0.02           #in m\n\n#Calculation\nIc=2*math.pi*R*Hc\nIc=math.ceil(Ic*10**2)/10**2;   #rounding off to 2 decimals\n\n#Result\nprint(\"the critical current is\",Ic)\n\n#answer in the book is wrong",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "('the critical magnetic feild at 5K in amp per m is', 251.33)\n"
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 5.9, Page number 152"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the isotopic mass of M2\n\n#importing modules\nimport math\n\n#Variable declaration\nM1=199.5       #in a.m.u\nT1=5            #in K\nT2=5.1          #in K\n\n#Calculation\nM2=((T1/T2)**2)*M1\nM2=math.ceil(M2*10**3)/10**3;   #rounding off to 3 decimals\n\n#Result\nprint(\"the isotopic mass of M2 is\",M2)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "('the isotopic mass of M2 is', 191.754)\n"
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 5.10, Page number 152"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the critical magnetic feild and critical current\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nD=3*10**-3        #in meters\nTc=8              #in K \nT=5               #in K \nHo=5*10**4\n\n#Calculation\nR=D/2\nHc=Ho*(1-((T/Tc)**2))\nIc=2*math.pi*R*Hc\nIc=math.ceil(Ic*10**3)/10**3;   #rounding off to 3 decimals\n\n#Result\nprint(\"critical magnetic feild in amp per m is\",round(Hc));\nprint(\"critical current in amp is\",Ic);\n\n#answer in the book is wrong",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "('critical magnetic feild in amp per m is', 30469.0)\n('critical current in amp is', 287.162)\n"
      }
     ],
     "prompt_number": 22
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 5.11, Page number 153"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the critical temperature\n\n#importing modules\nimport math\n\n#Variable declaration\nM1=199.5       \nM2=203.4       \nTc1=4.185            #in K\n\n#Calculation\nTc2=Tc1*math.sqrt(M1/M2)\nTc2=math.ceil(Tc2*10**3)/10**3;   #rounding off to 3 decimals\n\n#Result\nprint(\"the critical temperature is\",Tc2)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "('the critical temperature is', 4.145)\n"
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 5.12, Page number 154"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the EM wave frequency\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nV=8.5*10**-6           #in volts\ne=1.6*10**-19          #in C\nh=6.626*10**-24\n\n#Calculation\nnew=2*e*V/h\nnew=math.ceil(new*10**5)/10**5;   #rounding off to 5 decimals\n\n#Result\nprint(\"EM wave generated frequency in Hz is\",new)\n\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "('EM wave generated frequency in Hz is', 0.41051)\n"
      }
     ],
     "prompt_number": 24
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 5.13, Page number 154"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#to calculate the critical temperature at 6mm presure of Hg\n\n#Variable declaration\np1=1      #in mm\np2=6      #in mm\nTc1=5     #in K\n\n#Calculation\nTc2=Tc1*(p2/p1);\n\n#Result\nprint(\"the critical temperature in K is\",round(Tc2))",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "('the critical temperature in K is', 30.0)\n"
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 5.14, Page number 154\n"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#to calculate maximum critical temperature\n\n#Variable declaration\nTc=8.7        #in K\nHc=6*10**5         #in A per m\nHo=3*10**6       #in A per m\n\n#Calculation\nT=Tc*(math.sqrt(1-(Hc/Ho)))\n\n#Result\nprint(\" maximum critical temperature in K is\",T)\n\n#answer given in the book is wrong",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "(' maximum critical temperature in K is', 7.781516561699267)\n"
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "",
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}