From Wikipedia, the free encyclopedia
No higher resolution available.
Polytropic.gif (487 × 468 pixels, file size: 75 KB, MIME type: image/gif , looped, 8 frames, 8.0 s)
Summary
Matplotlib (Python)
Code for isobaric process
from matplotlib.pyplot import *
from numpy import linspace , arange
from matplotlib.patches import Polygon
x1 = linspace ( 0 , 9 , 100 )
y1 = 3100 + 0 * x1
fig = figure ( figsize = ( 5 , 5 ))
ax = fig . add_subplot ( 111 )
ax . grid ( False )
ax . plot ( x1 , y1 )
ax . text ( 3 , 2500 , r "$PV^n=\mathrm {const} $" , size = 20 )
ax . text ( 3 , 2000 , r "Isobaric: $n=0$" , size = 20 )
ax . set_ylim ( 0 , 3720 )
ax . set_yticks ( linspace ( 0 , 3100 , 6 ))
ax . minorticks_on ()
ax . set_xlabel ( "V" )
ax . set_ylabel ( "P" )
fig . savefig ( "polytropic_1.png" , bbox_inches = "tight" , \
pad_inches = .15 )
Code for isothermal process
from matplotlib.pyplot import *
from numpy import linspace , arange
from matplotlib.patches import Polygon
x1 = linspace ( 0 , 9 , 100 )
y1 = 3100 / ( x1 )
fig = figure ( figsize = ( 5 , 5 ))
ax = fig . add_subplot ( 111 )
ax . grid ( False )
ax . plot ( x1 , y1 )
ax . text ( 3 , 2500 , r "$PV^n=\mathrm {const} $" , size = 20 )
ax . text ( 3 , 2000 , r "Isothermal: $n=1$" , size = 20 )
ax . set_ylim ( 0 , 3720 )
ax . set_yticks ( linspace ( 0 , 3100 , 6 ))
ax . minorticks_on ()
ax . set_xlabel ( "V" )
ax . set_ylabel ( "P" )
fig . savefig ( "polytropic_2.png" , bbox_inches = "tight" , \
pad_inches = .15 )
Code for adiabatic process
from matplotlib.pyplot import *
from numpy import linspace , arange
from matplotlib.patches import Polygon
x1 = linspace ( 0 , 9 , 100 )
y1 = 3100 / ( x1 ** 1.4 )
fig = figure ( figsize = ( 5 , 5 ))
ax = fig . add_subplot ( 111 )
ax . grid ( False )
ax . plot ( x1 , y1 )
ax . text ( 3 , 2500 , r "$PV^n=\mathrm {const} $" , size = 20 )
ax . text ( 3 , 2000 , r "Adiabatic: $n=K$" , size = 20 )
ax . set_ylim ( 0 , 3720 )
ax . set_yticks ( linspace ( 0 , 3100 , 6 ))
ax . minorticks_on ()
ax . set_xlabel ( "V" )
ax . set_ylabel ( "P" )
fig . savefig ( "polytropic_3.png" , bbox_inches = "tight" , \
pad_inches = .15 )
Code for polytropic process
from matplotlib.pyplot import *
from numpy import linspace , arange
from matplotlib.patches import Polygon
x1 = linspace ( 0 , 9 , 100 )
y1 = 3100 / ( x1 ** 4 )
fig = figure ( figsize = ( 5 , 5 ))
ax = fig . add_subplot ( 111 )
ax . grid ( False )
ax . plot ( x1 , y1 )
ax . text ( 3 , 2500 , r "$PV^n=\mathrm {const} $" , size = 20 )
ax . text ( 3 , 2000 , r "Other: $n=4$" , size = 20 )
ax . set_ylim ( 0 , 3720 )
ax . set_yticks ( linspace ( 0 , 3100 , 6 ))
ax . minorticks_on ()
ax . set_xlabel ( "V" )
ax . set_ylabel ( "P" )
fig . savefig ( "polytropic_4.png" , bbox_inches = "tight" , \
pad_inches = .15 )
Code for isochoric process
from matplotlib.pyplot import *
from numpy import linspace , arange
from matplotlib.patches import Polygon
x1 = [ 1 , 1 ]
y1 = [ 0 , 3720 ]
fig = figure ( figsize = ( 5 , 5 ))
ax = fig . add_subplot ( 111 )
ax . grid ( False )
ax . plot ( x1 , y1 )
ax . text ( 3 , 2500 , r "$PV^n=\mathrm {const} $" , size = 20 )
ax . text ( 3 , 2000 , r "Isochoric: $n \rightarrow +\infty$" , size = 20 )
ax . set_xlim ( 0 , 9 )
ax . set_ylim ( 0 , 3720 )
ax . set_yticks ( linspace ( 0 , 3100 , 6 ))
ax . minorticks_on ()
ax . set_xlabel ( "V" )
ax . set_ylabel ( "P" )
fig . savefig ( "polytropic_7.png" , bbox_inches = "tight" , \
pad_inches = .15 )
Licensing
I, the copyright holder of this work, hereby publish it under the following license:
You are free:
to share – to copy, distribute and transmit the work
to remix – to adapt the work
Under the following conditions:
attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original. https://creativecommons.org/licenses/by-sa/3.0 CC BY-SA 3.0 Creative Commons Attribution-Share Alike 3.0 true true English Add a one-line explanation of what this file represents
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time Thumbnail Dimensions User Comment
current 18:16, 3 September 2013 487 × 468 (75 KB) IkamusumeFan Update according to CausalJJ's advice.
07:36, 2 September 2013 487 × 468 (63 KB) IkamusumeFan User created page with UploadWizard
File usage
The following 3 pages use this file:
Global file usage
The following other wikis use this file:
Usage on az.wikipedia.org
Usage on es.wikipedia.org
Usage on hr.wikipedia.org
Usage on hy.wikipedia.org
Usage on pt.wikipedia.org
Usage on uk.wikipedia.org
Usage on vi.wikipedia.org