Difference between revisions of "Thermodynamics"

From AutoMeKin
Jump to navigation Jump to search
(Vapor-liquid equilibrium diagram of an ideal mixture)
(Vapor-liquid equilibrium diagram of an ideal mixture)
Line 14: Line 14:
 
In the example below <math>p_A^*=1</math> (a.u.) and the value of <math>p_B^*</math> can be changed moving the slider below.
 
In the example below <math>p_A^*=1</math> (a.u.) and the value of <math>p_B^*</math> can be changed moving the slider below.
 
</div>
 
</div>
   
+
 
 
<html lang="en">
 
<html lang="en">
 
    
 
    
 
   <head>
 
   <head>
 
       <div align='center'>
 
       <div align='center'>
   
+
 
 
       <meta charset="utf-8">
 
       <meta charset="utf-8">
 
       <title>slider.py example</title>
 
       <title>slider.py example</title>
Line 50: Line 50:
 
            
 
            
 
              
 
              
               <div class="bk-root" id="8d6ef07f-ccfb-4c63-bdd3-f9c440aa36e2"></div>
+
               <div class="bk-root" id="0a3d58d8-edf7-46d8-a100-536fcb083c22"></div>
 
              
 
              
 
            
 
            
Line 56: Line 56:
 
        
 
        
 
        
 
        
         <script type="application/json" id="1492">
+
         <script type="application/json" id="1615">
           {"0e6142b5-bab7-4c8f-971c-7b839d78c7f6":{"roots":{"references":[{"attributes":{"axis_label":"Mole fraction of A","formatter":{"id":"1423","type":"BasicTickFormatter"},"plot":{"id":"1371","subtype":"Figure","type":"Plot"},"ticker":{"id":"1381","type":"BasicTicker"}},"id":"1380","type":"LinearAxis"},{"attributes":{"callback":null},"id":"1372","type":"Range1d"},{"attributes":{"plot":null,"text":""},"id":"1421","type":"Title"},{"attributes":{"below":[{"id":"1380","type":"LinearAxis"}],"left":[{"id":"1385","type":"LinearAxis"}],"plot_height":400,"plot_width":400,"renderers":[{"id":"1380","type":"LinearAxis"},{"id":"1384","type":"Grid"},{"id":"1385","type":"LinearAxis"},{"id":"1389","type":"Grid"},{"id":"1398","type":"BoxAnnotation"},{"id":"1408","type":"GlyphRenderer"},{"id":"1413","type":"GlyphRenderer"}],"title":{"id":"1421","type":"Title"},"toolbar":{"id":"1396","type":"Toolbar"},"x_range":{"id":"1372","type":"Range1d"},"x_scale":{"id":"1376","type":"LinearScale"},"y_range":{"id":"1374","type":"Range1d"},"y_scale":{"id":"1378","type":"LinearScale"}},"id":"1371","subtype":"Figure","type":"Plot"},{"attributes":{},"id":"1423","type":"BasicTickFormatter"},{"attributes":{},"id":"1425","type":"BasicTickFormatter"},{"attributes":{},"id":"1427","type":"UnionRenderers"},{"attributes":{},"id":"1426","type":"Selection"},{"attributes":{"axis_label":"Vapor pressure (a.u.)","formatter":{"id":"1425","type":"BasicTickFormatter"},"plot":{"id":"1371","subtype":"Figure","type":"Plot"},"ticker":{"id":"1386","type":"BasicTicker"}},"id":"1385","type":"LinearAxis"},{"attributes":{"callback":null,"data":{"x":{"__ndarray__":"AAAAAAAAAABbv1Kg1q+EP1u/UqDWr5Q/CB988MEHnz9bv1Kg1q+kPzJvZ0jM26k/CB988MEHrz9wZ0jM2xmyP1u/UqDWr7Q/RhdddNFFtz8yb2dIzNu5Px3HcRzHcbw/CB988MEHvz96O0Ni3s7AP3BnSMzbGcI/ZZNNNtlkwz9bv1Kg1q/EP1HrVwrU+sU/RhdddNFFxz88Q2LezpDIPzJvZ0jM28k/J5tssskmyz8dx3Ecx3HMPxPzdobEvM0/CB988MEHzz9/pUCtXynQP3o7Q2LeztA/ddFFF1100T9wZ0jM2xnSP2r9SoFav9I/ZZNNNtlk0z9gKVDrVwrUP1u/UqDWr9Q/VlVVVVVV1T9R61cK1PrVP0yBWr9SoNY/RhdddNFF1z9BrV8pUOvXPzxDYt7OkNg/N9lkk0022T8yb2dIzNvZPy0Fav1Kgdo/J5tssskm2z8iMW9nSMzbPx3HcRzHcdw/GF100UUX3T8T83aGxLzdPw6JeTtDYt4/CB988MEH3z8DtX6lQK3fP3+lQK1fKeA/ffDBBx984D96O0Ni3s7gP3eGxLydIeE/ddFFF1104T9yHMdxHMfhP3BnSMzbGeI/bbLJJpts4j9q/UqBWr/iP2hIzNsZEuM/ZZNNNtlk4z9j3s6QmLfjP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+D/BtR8lcO33P9kt/GpMpPc/Kc51jOJc9z98zyYUIxf3P6KsIkP/0vY/BmmQBmmQ9j/qyfjtUk/2Pzp5OiKwD/Y/0UUXXXTR9T+p0k7hk5T1P0cIPHMDWfU/HoXrUbge9T9eHKIwqOX0PyEyyzDJrfQ/HnFH3BF39D+P8xQgeUH0PxqISkf2DPQ/lz1g9oDZ8z9Y178mEafzP1o3mCKfdfM/ti7vgCNF8z91fu0hlxXzP0UlYSvz5vI/CmJyBTG58j/7F4hXSozyP0yAWAU5YPI/ck8jLPc08j8dqRIgfwryP/RuwGnL4PE/OKPdw9a38T+QwfkYnI/xP4AWaIEWaPE/QUFBQUFB8T+uK3/GFxvxP2XiMaeV9fA/WNLLn7bQ8D/HCoSRdqzwP0A6zYDRiPA/4jLgk8Nl8D951lgRSUPwP9ld5F5eIfA/AAAAAAAA8D8=","dtype":"float64","shape":[100]}},"selected":{"id":"1426","type":"Selection"},"selection_policy":{"id":"1427","type":"UnionRenderers"}},"id":"1370","type":"ColumnDataSource"},{"attributes":{"source":{"id":"1370","type":"ColumnDataSource"}},"id":"1409","type":"CDSView"},{"attributes":{"data_source":{"id":"1370","type":"ColumnDataSource"},"glyph":{"id":"1406","type":"Line"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1407","type":"Line"},"selection_glyph":null,"view":{"id":"1409","type":"CDSView"}},"id":"1408","type":"GlyphRenderer"},{"attributes":{"callback":null,"end":5},"id":"1374","type":"Range1d"},{"attributes":{"bottom_units":"screen","fill_alpha":{"value":0.5},"fill_color":{"value":"lightgrey"},"left_units":"screen","level":"overlay","line_alpha":{"value":1.0},"line_color":{"value":"red"},"line_dash":[4,4],"line_width":{"value":2},"plot":null,"render_mode":"css","right_units":"screen","top_units":"screen"},"id":"1398","type":"BoxAnnotation"},{"attributes":{},"id":"1378","type":"LinearScale"},{"attributes":{},"id":"1395","type":"HelpTool"},{"attributes":{},"id":"1394","type":"ResetTool"},{"attributes":{"line_alpha":0.1,"line_color":"#1f77b4","line_width":3,"x":{"field":"x"},"y":{"field":"y0"}},"id":"1407","type":"Line"},{"attributes":{"overlay":{"id":"1398","type":"BoxAnnotation"}},"id":"1392","type":"BoxZoomTool"},{"attributes":{},"id":"1391","type":"WheelZoomTool"},{"attributes":{},"id":"1390","type":"PanTool"},{"attributes":{},"id":"1376","type":"LinearScale"},{"attributes":{},"id":"1381","type":"BasicTicker"},{"attributes":{"active_drag":"auto","active_inspect":"auto","active_multi":null,"active_scroll":"auto","active_tap":"auto","tools":[{"id":"1390","type":"PanTool"},{"id":"1391","type":"WheelZoomTool"},{"id":"1392","type":"BoxZoomTool"},{"id":"1393","type":"SaveTool"},{"id":"1394","type":"ResetTool"},{"id":"1395","type":"HelpTool"}]},"id":"1396","type":"Toolbar"},{"attributes":{},"id":"1386","type":"BasicTicker"},{"attributes":{},"id":"1393","type":"SaveTool"},{"attributes":{"line_alpha":0.6,"line_color":"blue","line_width":3,"x":{"field":"x"},"y":{"field":"y0"}},"id":"1406","type":"Line"},{"attributes":{"children":[{"id":"1417","type":"WidgetBox"}]},"id":"1418","type":"Column"},{"attributes":{"children":[{"id":"1371","subtype":"Figure","type":"Plot"},{"id":"1418","type":"Column"}]},"id":"1419","type":"Row"},{"attributes":{"dimension":1,"plot":{"id":"1371","subtype":"Figure","type":"Plot"},"ticker":{"id":"1386","type":"BasicTicker"}},"id":"1389","type":"Grid"},{"attributes":{"plot":{"id":"1371","subtype":"Figure","type":"Plot"},"ticker":{"id":"1381","type":"BasicTicker"}},"id":"1384","type":"Grid"},{"attributes":{"line_alpha":0.6,"line_width":3,"x":{"field":"x"},"y":{"field":"y1"}},"id":"1411","type":"Line"},{"attributes":{"line_alpha":0.1,"line_color":"#1f77b4","line_width":3,"x":{"field":"x"},"y":{"field":"y1"}},"id":"1412","type":"Line"},{"attributes":{"data_source":{"id":"1370","type":"ColumnDataSource"},"glyph":{"id":"1411","type":"Line"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1412","type":"Line"},"selection_glyph":null,"view":{"id":"1414","type":"CDSView"}},"id":"1413","type":"GlyphRenderer"},{"attributes":{"source":{"id":"1370","type":"ColumnDataSource"}},"id":"1414","type":"CDSView"},{"attributes":{"args":{"freq":{"id":"1416","type":"Slider"},"source":{"id":"1370","type":"ColumnDataSource"}},"code":"\n    var data = source.data;\n    var k = freq.value;\n    var x = data['x']\n    var y0 = data['y0']\n    var y1 = data['y1']\n    for (var i = 0; i &lt; x.length; i++) {\n        y0[i] = k+(1-k)*x[i];\n        y1[i] = k/(1-(1-k)*x[i]);\n    }\n    source.change.emit();\n"},"id":"1415","type":"CustomJS"},{"attributes":{"callback":{"id":"1415","type":"CustomJS"},"end":5,"start":0.1,"step":0.1,"title":"pB* (a.u.) =","value":5},"id":"1416","type":"Slider"},{"attributes":{"children":[{"id":"1416","type":"Slider"}]},"id":"1417","type":"WidgetBox"}],"root_ids":["1419"]},"title":"Bokeh Application","version":"1.0.2"}}
+
           {"5e99dd87-ef63-471c-ac32-90aba1a5be5a":{"roots":{"references":[{"attributes":{"dimension":1,"plot":{"id":"1494","subtype":"Figure","type":"Plot"},"ticker":{"id":"1509","type":"BasicTicker"}},"id":"1512","type":"Grid"},{"attributes":{"callback":{"id":"1538","type":"CustomJS"},"end":5,"start":0.1,"step":0.1,"title":"pB* (a.u.) =","value":5},"id":"1539","type":"Slider"},{"attributes":{"plot":{"id":"1494","subtype":"Figure","type":"Plot"},"ticker":{"id":"1504","type":"BasicTicker"}},"id":"1507","type":"Grid"},{"attributes":{},"id":"1546","type":"BasicTickFormatter"},{"attributes":{"plot":null,"text":""},"id":"1544","type":"Title"},{"attributes":{"children":[{"id":"1494","subtype":"Figure","type":"Plot"},{"id":"1541","type":"Column"}]},"id":"1542","type":"Row"},{"attributes":{"children":[{"id":"1539","type":"Slider"}]},"id":"1540","type":"WidgetBox"},{"attributes":{"children":[{"id":"1540","type":"WidgetBox"}]},"id":"1541","type":"Column"},{"attributes":{},"id":"1548","type":"BasicTickFormatter"},{"attributes":{},"id":"1549","type":"Selection"},{"attributes":{"axis_label":"Mole fraction of A","formatter":{"id":"1546","type":"BasicTickFormatter"},"plot":{"id":"1494","subtype":"Figure","type":"Plot"},"ticker":{"id":"1504","type":"BasicTicker"}},"id":"1503","type":"LinearAxis"},{"attributes":{},"id":"1501","type":"LinearScale"},{"attributes":{"bottom_units":"screen","fill_alpha":{"value":0.5},"fill_color":{"value":"lightgrey"},"left_units":"screen","level":"overlay","line_alpha":{"value":1.0},"line_color":{"value":"black"},"line_dash":[4,4],"line_width":{"value":2},"plot":null,"render_mode":"css","right_units":"screen","top_units":"screen"},"id":"1521","type":"BoxAnnotation"},{"attributes":{},"id":"1504","type":"BasicTicker"},{"attributes":{"axis_label":"Vapor pressure (a.u.)","formatter":{"id":"1548","type":"BasicTickFormatter"},"plot":{"id":"1494","subtype":"Figure","type":"Plot"},"ticker":{"id":"1509","type":"BasicTicker"}},"id":"1508","type":"LinearAxis"},{"attributes":{},"id":"1509","type":"BasicTicker"},{"attributes":{"line_alpha":0.6,"line_color":"blue","line_width":3,"x":{"field":"x"},"y":{"field":"y0"}},"id":"1529","type":"Line"},{"attributes":{"source":{"id":"1493","type":"ColumnDataSource"}},"id":"1532","type":"CDSView"},{"attributes":{"callback":null,"data":{"x":{"__ndarray__":"AAAAAAAAAABbv1Kg1q+EP1u/UqDWr5Q/CB988MEHnz9bv1Kg1q+kPzJvZ0jM26k/CB988MEHrz9wZ0jM2xmyP1u/UqDWr7Q/RhdddNFFtz8yb2dIzNu5Px3HcRzHcbw/CB988MEHvz96O0Ni3s7AP3BnSMzbGcI/ZZNNNtlkwz9bv1Kg1q/EP1HrVwrU+sU/RhdddNFFxz88Q2LezpDIPzJvZ0jM28k/J5tssskmyz8dx3Ecx3HMPxPzdobEvM0/CB988MEHzz9/pUCtXynQP3o7Q2LeztA/ddFFF1100T9wZ0jM2xnSP2r9SoFav9I/ZZNNNtlk0z9gKVDrVwrUP1u/UqDWr9Q/VlVVVVVV1T9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ChQoVAkAQTsRLAsIBQPFOfjDncQFASZIkSZIkAUCjvrNR39kAQBmYrnOskQBAvoT2EtpLAECFgJyfSggAQJMdOdjEjf8/Dg8PDw8P/z9E6Vw2Q5T+P9rg35YzHf4/2tSmNrWp/T+SS1Clnzn9P83MzMzMzPw/Y4wxxhhj/D9ndzSyYfz7Pyow9pSHmPs/y5PINGw3+z9nOKn78tj6Px4XL9sAffo//WyxMnwj+j+m6HO3TMz5P7ORqV5bd/k/SZIkSZIk+T/LPY2w3NP4PzRq/tUmhfg/hoPo8V04+D/BtR8lcO33P9kt/GpMpPc/Kc51jOJc9z98zyYUIxf3P6KsIkP/0vY/BmmQBmmQ9j/qyfjtUk/2Pzp5OiKwD/Y/0UUXXXTR9T+p0k7hk5T1P0cIPHMDWfU/HoXrUbge9T9eHKIwqOX0PyEyyzDJrfQ/HnFH3BF39D+P8xQgeUH0PxqISkf2DPQ/lz1g9oDZ8z9Y178mEafzP1o3mCKfdfM/ti7vgCNF8z91fu0hlxXzP0UlYSvz5vI/CmJyBTG58j/7F4hXSozyP0yAWAU5YPI/ck8jLPc08j8dqRIgfwryP/RuwGnL4PE/OKPdw9a38T+QwfkYnI/xP4AWaIEWaPE/QUFBQUFB8T+uK3/GFxvxP2XiMaeV9fA/WNLLn7bQ8D/HCoSRdqzwP0A6zYDRiPA/4jLgk8Nl8D951lgRSUPwP9ld5F5eIfA/AAAAAAAA8D8=","dtype":"float64","shape":[100]}},"selected":{"id":"1549","type":"Selection"},"selection_policy":{"id":"1550","type":"UnionRenderers"}},"id":"1493","type":"ColumnDataSource"},{"attributes":{"below":[{"id":"1503","type":"LinearAxis"}],"left":[{"id":"1508","type":"LinearAxis"}],"plot_height":400,"plot_width":400,"renderers":[{"id":"1503","type":"LinearAxis"},{"id":"1507","type":"Grid"},{"id":"1508","type":"LinearAxis"},{"id":"1512","type":"Grid"},{"id":"1521","type":"BoxAnnotation"},{"id":"1531","type":"GlyphRenderer"},{"id":"1536","type":"GlyphRenderer"}],"title":{"id":"1544","type":"Title"},"toolbar":{"id":"1519","type":"Toolbar"},"x_range":{"id":"1495","type":"Range1d"},"x_scale":{"id":"1499","type":"LinearScale"},"y_range":{"id":"1497","type":"Range1d"},"y_scale":{"id":"1501","type":"LinearScale"}},"id":"1494","subtype":"Figure","type":"Plot"},{"attributes":{"callback":null},"id":"1495","type":"Range1d"},{"attributes":{"callback":null,"end":5},"id":"1497","type":"Range1d"},{"attributes":{},"id":"1499","type":"LinearScale"},{"attributes":{},"id":"1550","type":"UnionRenderers"},{"attributes":{"source":{"id":"1493","type":"ColumnDataSource"}},"id":"1537","type":"CDSView"},{"attributes":{"data_source":{"id":"1493","type":"ColumnDataSource"},"glyph":{"id":"1534","type":"Line"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1535","type":"Line"},"selection_glyph":null,"view":{"id":"1537","type":"CDSView"}},"id":"1536","type":"GlyphRenderer"},{"attributes":{"line_alpha":0.1,"line_color":"#1f77b4","line_width":3,"x":{"field":"x"},"y":{"field":"y1"}},"id":"1535","type":"Line"},{"attributes":{"line_alpha":0.6,"line_color":"red","line_width":3,"x":{"field":"x"},"y":{"field":"y1"}},"id":"1534","type":"Line"},{"attributes":{"active_drag":"auto","active_inspect":"auto","active_multi":null,"active_scroll":"auto","active_tap":"auto","tools":[{"id":"1513","type":"PanTool"},{"id":"1514","type":"WheelZoomTool"},{"id":"1515","type":"BoxZoomTool"},{"id":"1516","type":"SaveTool"},{"id":"1517","type":"ResetTool"},{"id":"1518","type":"HelpTool"}]},"id":"1519","type":"Toolbar"},{"attributes":{},"id":"1518","type":"HelpTool"},{"attributes":{"data_source":{"id":"1493","type":"ColumnDataSource"},"glyph":{"id":"1529","type":"Line"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1530","type":"Line"},"selection_glyph":null,"view":{"id":"1532","type":"CDSView"}},"id":"1531","type":"GlyphRenderer"},{"attributes":{"line_alpha":0.1,"line_color":"#1f77b4","line_width":3,"x":{"field":"x"},"y":{"field":"y0"}},"id":"1530","type":"Line"},{"attributes":{"overlay":{"id":"1521","type":"BoxAnnotation"}},"id":"1515","type":"BoxZoomTool"},{"attributes":{},"id":"1514","type":"WheelZoomTool"},{"attributes":{},"id":"1517","type":"ResetTool"},{"attributes":{},"id":"1516","type":"SaveTool"},{"attributes":{},"id":"1513","type":"PanTool"},{"attributes":{"args":{"freq":{"id":"1539","type":"Slider"},"source":{"id":"1493","type":"ColumnDataSource"}},"code":"\n    var data = source.data;\n    var k = freq.value;\n    var x = data['x']\n    var y0 = data['y0']\n    var y1 = data['y1']\n    for (var i = 0; i &lt; x.length; i++) {\n        y0[i] = k+(1-k)*x[i];\n        y1[i] = k/(1-(1-k)*x[i]);\n    }\n    source.change.emit();\n"},"id":"1538","type":"CustomJS"}],"root_ids":["1542"]},"title":"Bokeh Application","version":"1.0.2"}}
 
         </script>
 
         </script>
 
         <script type="text/javascript">
 
         <script type="text/javascript">
Line 66: Line 66:
 
                   function embed_document(root) {
 
                   function embed_document(root) {
 
                      
 
                      
                   var docs_json = document.getElementById('1492').textContent;
+
                   var docs_json = document.getElementById('1615').textContent;
                   var render_items = [{"docid":"0e6142b5-bab7-4c8f-971c-7b839d78c7f6","roots":{"1419":"8d6ef07f-ccfb-4c63-bdd3-f9c440aa36e2"}}];
+
                   var render_items = [{"docid":"5e99dd87-ef63-471c-ac32-90aba1a5be5a","roots":{"1542":"0a3d58d8-edf7-46d8-a100-536fcb083c22"}}];
 
                   root.Bokeh.embed.embed_items(docs_json, render_items);
 
                   root.Bokeh.embed.embed_items(docs_json, render_items);
 
                  
 
                  
Line 98: Line 98:
 
    
 
    
 
</html>
 
</html>
 
 
Return to [[Main_Page]]
 

Revision as of 17:58, 21 April 2019

Vapor-liquid equilibrium diagram of an ideal mixture

The following plot shows the vapor-liquid phase diagram for a binary ideal mixture (components: A and B). The vapor pressures of the pure substances are [math]p_A^*[/math] and [math]p_B^*[/math], respectively.

The red curve shows the vapor pressure of the mixture [math]p[/math] as a function of the mole fraction of A in the liquid [math]x_A^l[/math]:

[math]p=p_B^*+(p_A^*-p_B^*)x_A^l[/math]

The black curve shows the vapor pressure of the mixture [math]p[/math] as a function of the mole fraction of A in the vapor [math]x_A^v[/math]:

[math]p=p_A^*p_B^*/(p_A^*-(p_A^*-p_B^*)x_A^v)[/math]

In the example below [math]p_A^*=1[/math] (a.u.) and the value of [math]p_B^*[/math] can be changed moving the slider below.

slider.py example