Difference between revisions of "Thermodynamics"

From AutoMeKin
Jump to navigation Jump to search
(Vapor-liquid equilibrium diagram ideal mixture)
 
(45 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Vapor-liquid equilibrium diagram ideal mixture==
+
==Phase diagram of an ideal solution at fixed temperature==
 +
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 blue curve shows the vapor pressure <math>p</math> of the mixture as a function of the mole fraction of A in the liquid <math>x_A^l</math>:
 +
 
 +
<center>
 +
<math>p=p_B^*+(p_A^*-p_B^*)x_A^l</math>
 +
</center>
 +
 
 +
The red curve shows the vapor pressure <math>p</math> of the mixture as a function of the mole fraction of A in the vapor <math>x_A^v</math>:
 +
 
 +
<center>
 +
<math>p=\dfrac{p_A^*p_B^*}{p_A^*-(p_A^*-p_B^*)x_A^v}</math>
 +
</center>
 +
 
 +
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.
  
The following plot shows the vapor-liquid phase diagram for a binary mixture (A and B). The vapor pressures of the pure substances are <math>P_A^*</math> and <math>P_B^*</math>, respectively. In the example below <math>P_A^*=1</math> (a.u.) and the <math>P_B^*/P_A^*</math> ratio can be changed moving the slider below.
 
  
  
Line 7: Line 21:
 
    
 
    
 
   <head>
 
   <head>
   
+
      <div align='center'>
 +
 
 
       <meta charset="utf-8">
 
       <meta charset="utf-8">
 
       <title>slider.py example</title>
 
       <title>slider.py example</title>
Line 38: Line 53:
 
            
 
            
 
              
 
              
               <div class="bk-root" id="4bb40a24-8813-497a-86de-60b1fb7def71"></div>
+
               <div class="bk-root" id="0a3d58d8-edf7-46d8-a100-536fcb083c22"></div>
 
              
 
              
 
            
 
            
Line 44: Line 59:
 
        
 
        
 
        
 
        
         <script type="application/json" id="9844">
+
         <script type="application/json" id="1615">
           {"1b483621-b0d0-40ae-8840-10c68c359a10":{"roots":{"references":[{"attributes":{},"id":"9730","type":"LinearScale"},{"attributes":{},"id":"9733","type":"BasicTicker"},{"attributes":{"axis_label":"Mole fraction of A","formatter":{"id":"9775","type":"BasicTickFormatter"},"plot":{"id":"9723","subtype":"Figure","type":"Plot"},"ticker":{"id":"9733","type":"BasicTicker"}},"id":"9732","type":"LinearAxis"},{"attributes":{},"id":"9742","type":"PanTool"},{"attributes":{"axis_label":"Vapor pressure (a.u.)","formatter":{"id":"9777","type":"BasicTickFormatter"},"plot":{"id":"9723","subtype":"Figure","type":"Plot"},"ticker":{"id":"9738","type":"BasicTicker"}},"id":"9737","type":"LinearAxis"},{"attributes":{"plot":{"id":"9723","subtype":"Figure","type":"Plot"},"ticker":{"id":"9733","type":"BasicTicker"}},"id":"9736","type":"Grid"},{"attributes":{},"id":"9738","type":"BasicTicker"},{"attributes":{"data_source":{"id":"9722","type":"ColumnDataSource"},"glyph":{"id":"9763","type":"Line"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"9764","type":"Line"},"selection_glyph":null,"view":{"id":"9766","type":"CDSView"}},"id":"9765","type":"GlyphRenderer"},{"attributes":{},"id":"9779","type":"UnionRenderers"},{"attributes":{},"id":"9778","type":"Selection"},{"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":"9750","type":"BoxAnnotation"},{"attributes":{},"id":"9775","type":"BasicTickFormatter"},{"attributes":{},"id":"9777","type":"BasicTickFormatter"},{"attributes":{"children":[{"id":"9723","subtype":"Figure","type":"Plot"},{"id":"9770","type":"Column"}]},"id":"9771","type":"Row"},{"attributes":{"children":[{"id":"9769","type":"WidgetBox"}]},"id":"9770","type":"Column"},{"attributes":{"plot":null,"text":""},"id":"9773","type":"Title"},{"attributes":{"line_alpha":0.6,"line_color":"red","line_width":3,"x":{"field":"x"},"y":{"field":"y0"}},"id":"9758","type":"Line"},{"attributes":{"line_alpha":0.1,"line_color":"#1f77b4","line_width":3,"x":{"field":"x"},"y":{"field":"y0"}},"id":"9759","type":"Line"},{"attributes":{"callback":null,"end":5},"id":"9726","type":"Range1d"},{"attributes":{"callback":null},"id":"9724","type":"Range1d"},{"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/ZZNNNtlk4z9j3s6QmLfjP2ApUOtXCuQ/XnTRRRdd5D9bv1Kg1q/kP1gK1PqVAuU/VlVVVVVV5T9ToNavFKjlP1HrVwrU+uU/TjbZZJNN5j9MgVq/UqDmP0nM2xkS8+Y/RhdddNFF5z9EYt7OkJjnP0GtXylQ6+c/P/jggw8+6D88Q2LezpDoPzmO4ziO4+g/N9lkk0026T80JObtDIn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A7sRO7MROBECrv8/bpLsEQC0tLS0tLQVAUXHJEKyjBUBtfDO0dh8GQBDqoA7qoAZAh/IaymsoB0Dx/C1Oa7YHQKhy3fFiSwhAqQnGW9nnCECOMcYYY4wJQJPmSHOkOQpAvpyCl1PwCkAVO7ETO7ELQL8O6MY8fQxAV1VVVVVVDUA9y4g+oDoOQM7lcrlcLg9AGpyPwfkYEEDufqPsfqMQQNWb3vSmNxFAaN1ginzWEUCzojQ+MoESQGcRn0AqORNAAAAAAAAAFEA=","dtype":"float64","shape":[100]}},"selected":{"id":"9778","type":"Selection"},"selection_policy":{"id":"9779","type":"UnionRenderers"}},"id":"9722","type":"ColumnDataSource"},{"attributes":{"below":[{"id":"9732","type":"LinearAxis"}],"left":[{"id":"9737","type":"LinearAxis"}],"plot_height":400,"plot_width":400,"renderers":[{"id":"9732","type":"LinearAxis"},{"id":"9736","type":"Grid"},{"id":"9737","type":"LinearAxis"},{"id":"9741","type":"Grid"},{"id":"9750","type":"BoxAnnotation"},{"id":"9760","type":"GlyphRenderer"},{"id":"9765","type":"GlyphRenderer"}],"title":{"id":"9773","type":"Title"},"toolbar":{"id":"9748","type":"Toolbar"},"x_range":{"id":"9724","type":"Range1d"},"x_scale":{"id":"9728","type":"LinearScale"},"y_range":{"id":"9726","type":"Range1d"},"y_scale":{"id":"9730","type":"LinearScale"}},"id":"9723","subtype":"Figure","type":"Plot"},{"attributes":{},"id":"9728","type":"LinearScale"},{"attributes":{"overlay":{"id":"9750","type":"BoxAnnotation"}},"id":"9744","type":"BoxZoomTool"},{"attributes":{"line_alpha":0.6,"line_width":3,"x":{"field":"x"},"y":{"field":"y1"}},"id":"9763","type":"Line"},{"attributes":{},"id":"9746","type":"ResetTool"},{"attributes":{"source":{"id":"9722","type":"ColumnDataSource"}},"id":"9761","type":"CDSView"},{"attributes":{"source":{"id":"9722","type":"ColumnDataSource"}},"id":"9766","type":"CDSView"},{"attributes":{"dimension":1,"plot":{"id":"9723","subtype":"Figure","type":"Plot"},"ticker":{"id":"9738","type":"BasicTicker"}},"id":"9741","type":"Grid"},{"attributes":{"line_alpha":0.1,"line_color":"#1f77b4","line_width":3,"x":{"field":"x"},"y":{"field":"y1"}},"id":"9764","type":"Line"},{"attributes":{},"id":"9743","type":"WheelZoomTool"},{"attributes":{"callback":{"id":"9767","type":"CustomJS"},"end":5,"start":0.1,"step":0.1,"title":"ratio","value":5},"id":"9768","type":"Slider"},{"attributes":{"children":[{"id":"9768","type":"Slider"}]},"id":"9769","type":"WidgetBox"},{"attributes":{"active_drag":"auto","active_inspect":"auto","active_multi":null,"active_scroll":"auto","active_tap":"auto","tools":[{"id":"9742","type":"PanTool"},{"id":"9743","type":"WheelZoomTool"},{"id":"9744","type":"BoxZoomTool"},{"id":"9745","type":"SaveTool"},{"id":"9746","type":"ResetTool"},{"id":"9747","type":"HelpTool"}]},"id":"9748","type":"Toolbar"},{"attributes":{},"id":"9745","type":"SaveTool"},{"attributes":{"data_source":{"id":"9722","type":"ColumnDataSource"},"glyph":{"id":"9758","type":"Line"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"9759","type":"Line"},"selection_glyph":null,"view":{"id":"9761","type":"CDSView"}},"id":"9760","type":"GlyphRenderer"},{"attributes":{},"id":"9747","type":"HelpTool"},{"attributes":{"args":{"freq":{"id":"9768","type":"Slider"},"source":{"id":"9722","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] = 1+(k-1)*x[i];\n        y1[i] = k/(k-(k-1)*x[i]);\n    }\n    source.change.emit();\n"},"id":"9767","type":"CustomJS"}],"root_ids":["9771"]},"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":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I/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 54: Line 69:
 
                   function embed_document(root) {
 
                   function embed_document(root) {
 
                      
 
                      
                   var docs_json = document.getElementById('9844').textContent;
+
                   var docs_json = document.getElementById('1615').textContent;
                   var render_items = [{"docid":"1b483621-b0d0-40ae-8840-10c68c359a10","roots":{"9771":"4bb40a24-8813-497a-86de-60b1fb7def71"}}];
+
                   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 82: Line 97:
 
           })();
 
           })();
 
         </script>
 
         </script>
 +
    </div>
 +
  </body>
 +
 
 +
</html>
 +
 +
 +
The number of moles in each phase (liquid or vapor) can be obtained from the lever rule:
 +
<center>
 +
<math>n^l\overline{\text{BK}}=n^v\overline{\text{KR}}</math>
 +
</center>
 +
 +
 +
<html lang="en">
 +
 
 +
  <head>
 +
      <div align='center'>
 +
   
 +
      <meta charset="utf-8">
 +
      <title>slider.py example</title>
 +
     
 +
     
 +
       
 +
         
 +
        <link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-1.0.4.min.css" type="text/css" />
 +
        <link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-widgets-1.0.4.min.css" type="text/css" />
 +
       
 +
       
 +
         
 +
        <script type="text/javascript" src="https://cdn.pydata.org/bokeh/release/bokeh-1.0.4.min.js"></script>
 +
        <script type="text/javascript" src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-1.0.4.min.js"></script>
 +
        <script type="text/javascript">
 +
            Bokeh.set_log_level("info");
 +
        </script>
 +
       
 +
     
 +
     
 
      
 
      
 +
  </head>
 +
 
 +
 
 +
  <body>
 +
   
 +
     
 +
       
 +
         
 +
         
 +
           
 +
              <div class="bk-root" id="3b715907-4e69-4660-a7f3-4279658d028a" data-root-id="12384"></div>
 +
           
 +
         
 +
       
 +
     
 +
     
 +
        <script type="application/json" id="12507">
 +
          {"98005dec-a5d3-43ec-a523-7494f747438f":{"roots":{"references":[{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"#1f77b4"},"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"size":{"units":"screen","value":7},"x":{"field":"x2"},"y":{"field":"y2"}},"id":"12328","type":"Circle"},{"attributes":{"children":[{"id":"12378","type":"WidgetBox"},{"id":"12379","type":"WidgetBox"}]},"id":"12380","type":"Row"},{"attributes":{},"id":"12245","type":"LinearScale"},{"attributes":{},"id":"12257","type":"PanTool"},{"attributes":{"line_alpha":0.1,"line_color":"#1f77b4","line_width":3,"x":{"field":"x"},"y":{"field":"y1"}},"id":"12313","type":"Line"},{"attributes":{"data_source":{"id":"12237","type":"ColumnDataSource"},"glyph":{"id":"12307","type":"Line"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"12308","type":"Line"},"selection_glyph":null,"view":{"id":"12310","type":"CDSView"}},"id":"12309","type":"GlyphRenderer"},{"attributes":{"callback":null,"end":6,"start":4},"id":"12273","type":"Range1d"},{"attributes":{},"id":"12279","type":"LinearScale"},{"attributes":{"axis_label":"Vapor pressure (a.u.)","formatter":{"id":"12358","type":"BasicTickFormatter"},"plot":{"id":"12238","subtype":"Figure","type":"Plot"},"ticker":{"id":"12253","type":"BasicTicker"}},"id":"12252","type":"LinearAxis"},{"attributes":{"source":{"id":"12237","type":"ColumnDataSource"}},"id":"12345","type":"CDSView"},{"attributes":{},"id":"12292","type":"WheelZoomTool"},{"attributes":{"callback":null},"id":"12275","type":"Range1d"},{"attributes":{"line_alpha":0.6,"line_dash":[2,4],"line_width":3,"x":{"field":"x2"},"y":{"field":"y"}},"id":"12322","type":"Line"},{"attributes":{"below":[{"id":"12281","type":"LinearAxis"}],"left":[{"id":"12286","type":"LinearAxis"}],"plot_height":400,"plot_width":400,"renderers":[{"id":"12281","type":"LinearAxis"},{"id":"12285","type":"Grid"},{"id":"12286","type":"LinearAxis"},{"id":"12290","type":"Grid"},{"id":"12299","type":"BoxAnnotation"},{"id":"12344","type":"GlyphRenderer"},{"id":"12347","type":"GlyphRenderer"}],"title":{"id":"12365","type":"Title"},"toolbar":{"id":"12297","type":"Toolbar"},"toolbar_location":null,"x_range":{"id":"12273","type":"Range1d"},"x_scale":{"id":"12277","type":"LinearScale"},"y_range":{"id":"12275","type":"Range1d"},"y_scale":{"id":"12279","type":"LinearScale"}},"id":"12272","subtype":"Figure","type":"Plot"},{"attributes":{"source":{"id":"12237","type":"ColumnDataSource"}},"id":"12330","type":"CDSView"},{"attributes":{},"id":"12366","type":"BasicTickFormatter"},{"attributes":{"dimension":1,"plot":{"id":"12272","subtype":"Figure","type":"Plot"},"ticker":{"id":"12287","type":"BasicTicker"}},"id":"12290","type":"Grid"},{"attributes":{"source":{"id":"12237","type":"ColumnDataSource"}},"id":"12310","type":"CDSView"},{"attributes":{"plot":{"id":"12272","subtype":"Figure","type":"Plot"},"ticker":{"id":"12282","type":"BasicTicker"}},"id":"12285","type":"Grid"},{"attributes":{},"id":"12367","type":"BasicTickFormatter"},{"attributes":{"line_alpha":0.1,"line_color":"#1f77b4","line_width":3,"x":{"field":"x"},"y":{"field":"y0"}},"id":"12308","type":"Line"},{"attributes":{"bottom":{"field":"bottom"},"fill_color":{"value":"blue"},"left":{"field":"left"},"right":{"field":"right"},"top":{"field":"nl"}},"id":"12343","type":"Quad"},{"attributes":{"fill_color":{"value":"black"},"size":{"units":"screen","value":7},"x":{"field":"x2"},"y":{"field":"y2"}},"id":"12327","type":"Circle"},{"attributes":{"axis_label":"Mole fraction","formatter":{"id":"12367","type":"BasicTickFormatter"},"plot":{"id":"12272","subtype":"Figure","type":"Plot"},"ticker":{"id":"12287","type":"BasicTicker"}},"id":"12286","type":"LinearAxis"},{"attributes":{"callback":{"id":"12351","type":"CustomJS"},"end":1,"start":0,"step":0.01,"title":"x","value":0.5},"id":"12353","type":"Slider"},{"attributes":{},"id":"12248","type":"BasicTicker"},{"attributes":{"data_source":{"id":"12237","type":"ColumnDataSource"},"glyph":{"id":"12312","type":"Line"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"12313","type":"Line"},"selection_glyph":null,"view":{"id":"12315","type":"CDSView"}},"id":"12314","type":"GlyphRenderer"},{"attributes":{"tools":[{"id":"12257","type":"PanTool"},{"id":"12258","type":"WheelZoomTool"},{"id":"12259","type":"BoxZoomTool"},{"id":"12260","type":"SaveTool"},{"id":"12261","type":"ResetTool"},{"id":"12262","type":"HelpTool"},{"id":"12291","type":"PanTool"},{"id":"12292","type":"WheelZoomTool"},{"id":"12293","type":"BoxZoomTool"},{"id":"12294","type":"SaveTool"},{"id":"12295","type":"ResetTool"},{"id":"12296","type":"HelpTool"}]},"id":"12382","type":"ProxyToolbar"},{"attributes":{"line_alpha":0.6,"line_dash":[2,4],"line_width":3,"x":{"field":"x"},"y":{"field":"y2"}},"id":"12317","type":"Line"},{"attributes":{"children":[{"id":"12238","subtype":"Figure","type":"Plot"},{"id":"12272","subtype":"Figure","type":"Plot"}]},"id":"12373","type":"Row"},{"attributes":{},"id":"12291","type":"PanTool"},{"attributes":{"source":{"id":"12237","type":"ColumnDataSource"}},"id":"12320","type":"CDSView"},{"attributes":{},"id":"12360","type":"UnionRenderers"},{"attributes":{},"id":"12358","type":"BasicTickFormatter"},{"attributes":{},"id":"12253","type":"BasicTicker"},{"attributes":{"source":{"id":"12237","type":"ColumnDataSource"}},"id":"12315","type":"CDSView"},{"attributes":{"overlay":{"id":"12299","type":"BoxAnnotation"}},"id":"12293","type":"BoxZoomTool"},{"attributes":{"plot":null,"text":""},"id":"12365","type":"Title"},{"attributes":{},"id":"12287","type":"BasicTicker"},{"attributes":{},"id":"12361","type":"Selection"},{"attributes":{"callback":null,"end":5},"id":"12241","type":"Range1d"},{"attributes":{"source":{"id":"12237","type":"ColumnDataSource"}},"id":"12325","type":"CDSView"},{"attributes":{"children":[{"id":"12373","type":"Row"},{"id":"12380","type":"Row"}]},"id":"12381","type":"Column"},{"attributes":{"below":[{"id":"12247","type":"LinearAxis"}],"left":[{"id":"12252","type":"LinearAxis"}],"plot_height":400,"plot_width":400,"renderers":[{"id":"12247","type":"LinearAxis"},{"id":"12251","type":"Grid"},{"id":"12252","type":"LinearAxis"},{"id":"12256","type":"Grid"},{"id":"12265","type":"BoxAnnotation"},{"id":"12309","type":"GlyphRenderer"},{"id":"12314","type":"GlyphRenderer"},{"id":"12319","type":"GlyphRenderer"},{"id":"12324","type":"GlyphRenderer"},{"id":"12329","type":"GlyphRenderer"},{"id":"12334","type":"GlyphRenderer"},{"id":"12339","type":"GlyphRenderer"},{"id":"12341","type":"Label"},{"id":"12342","type":"Label"}],"title":{"id":"12355","type":"Title"},"toolbar":{"id":"12263","type":"Toolbar"},"toolbar_location":null,"x_range":{"id":"12239","type":"Range1d"},"x_scale":{"id":"12243","type":"LinearScale"},"y_range":{"id":"12241","type":"Range1d"},"y_scale":{"id":"12245","type":"LinearScale"}},"id":"12238","subtype":"Figure","type":"Plot"},{"attributes":{"dimension":1,"plot":{"id":"12238","subtype":"Figure","type":"Plot"},"ticker":{"id":"12253","type":"BasicTicker"}},"id":"12256","type":"Grid"},{"attributes":{"children":[{"id":"12353","type":"Slider"}]},"id":"12379","type":"WidgetBox"},{"attributes":{},"id":"12356","type":"BasicTickFormatter"},{"attributes":{"plot":null,"text":""},"id":"12355","type":"Title"},{"attributes":{"fill_color":{"value":"blue"},"line_color":{"value":"blue"},"size":{"units":"screen","value":7},"x":{"field":"xcut"},"y":{"field":"y2"}},"id":"12332","type":"Circle"},{"attributes":{"data_source":{"id":"12237","type":"ColumnDataSource"},"glyph":{"id":"12317","type":"Line"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"12318","type":"Line"},"selection_glyph":null,"view":{"id":"12320","type":"CDSView"}},"id":"12319","type":"GlyphRenderer"},{"attributes":{"line_alpha":0.6,"line_color":"blue","line_width":3,"x":{"field":"x"},"y":{"field":"y0"}},"id":"12307","type":"Line"},{"attributes":{"data_source":{"id":"12237","type":"ColumnDataSource"},"glyph":{"id":"12322","type":"Line"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"12323","type":"Line"},"selection_glyph":null,"view":{"id":"12325","type":"CDSView"}},"id":"12324","type":"GlyphRenderer"},{"attributes":{"callback":{"id":"12351","type":"CustomJS"},"end":5,"start":0,"step":0.01,"title":"p","value":2.5},"id":"12352","type":"Slider"},{"attributes":{"active_drag":"auto","active_inspect":"auto","active_multi":null,"active_scroll":"auto","active_tap":"auto","tools":[{"id":"12257","type":"PanTool"},{"id":"12258","type":"WheelZoomTool"},{"id":"12259","type":"BoxZoomTool"},{"id":"12260","type":"SaveTool"},{"id":"12261","type":"ResetTool"},{"id":"12262","type":"HelpTool"}]},"id":"12263","type":"Toolbar"},{"attributes":{"fill_color":{"value":"red"},"line_color":{"value":"red"},"size":{"units":"screen","value":7},"x":{"field":"xcut2"},"y":{"field":"y2"}},"id":"12337","type":"Circle"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"#1f77b4"},"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"size":{"units":"screen","value":7},"x":{"field":"xcut2"},"y":{"field":"y2"}},"id":"12338","type":"Circle"},{"attributes":{},"id":"12282","type":"BasicTicker"},{"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":"12299","type":"BoxAnnotation"},{"attributes":{"data_source":{"id":"12237","type":"ColumnDataSource"},"glyph":{"id":"12337","type":"Circle"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"12338","type":"Circle"},"selection_glyph":null,"view":{"id":"12340","type":"CDSView"}},"id":"12339","type":"GlyphRenderer"},{"attributes":{"plot":{"id":"12238","subtype":"Figure","type":"Plot"},"text":"Vapor","x":0.7,"y":1},"id":"12342","type":"Label"},{"attributes":{},"id":"12243","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":"12265","type":"BoxAnnotation"},{"attributes":{"axis_label":"Mole fraction of A","formatter":{"id":"12356","type":"BasicTickFormatter"},"plot":{"id":"12238","subtype":"Figure","type":"Plot"},"ticker":{"id":"12248","type":"BasicTicker"}},"id":"12247","type":"LinearAxis"},{"attributes":{},"id":"12262","type":"HelpTool"},{"attributes":{"ticks":[1,2]},"id":"12349","type":"FixedTicker"},{"attributes":{"source":{"id":"12237","type":"ColumnDataSource"}},"id":"12335","type":"CDSView"},{"attributes":{"data_source":{"id":"12237","type":"ColumnDataSource"},"glyph":{"id":"12327","type":"Circle"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"12328","type":"Circle"},"selection_glyph":null,"view":{"id":"12330","type":"CDSView"}},"id":"12329","type":"GlyphRenderer"},{"attributes":{"children":[{"id":"12383","type":"ToolbarBox"},{"id":"12381","type":"Column"}]},"id":"12384","type":"Column"},{"attributes":{},"id":"12261","type":"ResetTool"},{"attributes":{"children":[{"id":"12352","type":"Slider"}]},"id":"12378","type":"WidgetBox"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"#1f77b4"},"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"size":{"units":"screen","value":7},"x":{"field":"xcut"},"y":{"field":"y2"}},"id":"12333","type":"Circle"},{"attributes":{"source":{"id":"12237","type":"ColumnDataSource"}},"id":"12340","type":"CDSView"},{"attributes":{"callback":null},"id":"12239","type":"Range1d"},{"attributes":{"data_source":{"id":"12237","type":"ColumnDataSource"},"glyph":{"id":"12332","type":"Circle"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"12333","type":"Circle"},"selection_glyph":null,"view":{"id":"12335","type":"CDSView"}},"id":"12334","type":"GlyphRenderer"},{"attributes":{"active_drag":"auto","active_inspect":"auto","active_multi":null,"active_scroll":"auto","active_tap":"auto","tools":[{"id":"12291","type":"PanTool"},{"id":"12292","type":"WheelZoomTool"},{"id":"12293","type":"BoxZoomTool"},{"id":"12294","type":"SaveTool"},{"id":"12295","type":"ResetTool"},{"id":"12296","type":"HelpTool"}]},"id":"12297","type":"Toolbar"},{"attributes":{"args":{"p":{"id":"12352","type":"Slider"},"source":{"id":"12237","type":"ColumnDataSource"},"xx":{"id":"12353","type":"Slider"}},"code":"\n    var data = source.data;\n    var p = p.value;\n    var xx = xx.value;\n    var x = data['x']\n    var xcut = data['xcut']\n    var xcut2 = data['xcut2']\n    var x2 = data['x2']\n    var y2 = data['y2']\n    var nl = data['nl']\n    var ng = data['ng']\n    for(var i = 0; i &lt; x.length; i++) {\n      y2[i] = p;\n      x2[i] = xx;\n      xcut[i] = (p-1)/4;\n      xcut2[i] = 5*(p-1)/(4*p);\n      nl[i]=(xcut2[i]-x2[i])/(x2[i]-xcut[i])/(1+(xcut2[i]-x2[i])/(x2[i]-xcut[i]))\n      if(nl[i]&gt;1) nl[i]=1\n      ng[i]=1-nl[i]\n      if(ng[i]&gt;1) ng[i]=1\n      if(p&lt;1) {ng[i]=1;nl[i]=0}\n      if(p&gt;4) {ng[i]=0;nl[i]=1}\n      if(xcut[i]&gt;xx) {xcut[i]=-1;xcut2[i]=-1};\n      if(xcut2[i]&lt;xx) {xcut[i]=-1;xcut2[i]=-1};\n    }\n    source.change.emit();\n"},"id":"12351","type":"CustomJS"},{"attributes":{},"id":"12295","type":"ResetTool"},{"attributes":{"data_source":{"id":"12237","type":"ColumnDataSource"},"glyph":{"id":"12346","type":"Quad"},"hover_glyph":null,"muted_glyph":null,"view":{"id":"12348","type":"CDSView"}},"id":"12347","type":"GlyphRenderer"},{"attributes":{},"id":"12296","type":"HelpTool"},{"attributes":{"line_alpha":0.1,"line_color":"#1f77b4","line_dash":[2,4],"line_width":3,"x":{"field":"x2"},"y":{"field":"y"}},"id":"12323","type":"Line"},{"attributes":{"source":{"id":"12237","type":"ColumnDataSource"}},"id":"12348","type":"CDSView"},{"attributes":{"overlay":{"id":"12265","type":"BoxAnnotation"}},"id":"12259","type":"BoxZoomTool"},{"attributes":{},"id":"12294","type":"SaveTool"},{"attributes":{"plot":{"id":"12238","subtype":"Figure","type":"Plot"},"text":"Liquid","x":0.2,"y":3.5},"id":"12341","type":"Label"},{"attributes":{"toolbar":{"id":"12382","type":"ProxyToolbar"},"toolbar_location":"above"},"id":"12383","type":"ToolbarBox"},{"attributes":{},"id":"12260","type":"SaveTool"},{"attributes":{"plot":{"id":"12238","subtype":"Figure","type":"Plot"},"ticker":{"id":"12248","type":"BasicTicker"}},"id":"12251","type":"Grid"},{"attributes":{"callback":null,"data":{"bottom":{"__ndarray__":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAEQAAAAAAAAARAAAAAAAAABEA=","dtype":"float64","shape":[100]}},"selected":{"id":"12361","type":"Selection"},"selection_policy":{"id":"12360","type":"UnionRenderers"}},"id":"12237","type":"ColumnDataSource"},{"attributes":{"line_alpha":0.6,"line_color":"red","line_width":3,"x":{"field":"x"},"y":{"field":"y1"}},"id":"12312","type":"Line"},{"attributes":{"line_alpha":0.1,"line_color":"#1f77b4","line_dash":[2,4],"line_width":3,"x":{"field":"x"},"y":{"field":"y2"}},"id":"12318","type":"Line"},{"attributes":{"axis_label":"Liquid                                  Vapor","formatter":{"id":"12366","type":"BasicTickFormatter"},"plot":{"id":"12272","subtype":"Figure","type":"Plot"},"ticker":{"id":"12349","type":"FixedTicker"}},"id":"12281","type":"LinearAxis"},{"attributes":{},"id":"12258","type":"WheelZoomTool"},{"attributes":{"bottom":{"field":"bottom"},"fill_color":{"value":"red"},"left":{"field":"left2"},"right":{"field":"right2"},"top":{"field":"ng"}},"id":"12346","type":"Quad"},{"attributes":{"data_source":{"id":"12237","type":"ColumnDataSource"},"glyph":{"id":"12343","type":"Quad"},"hover_glyph":null,"muted_glyph":null,"view":{"id":"12345","type":"CDSView"}},"id":"12344","type":"GlyphRenderer"},{"attributes":{},"id":"12277","type":"LinearScale"}],"root_ids":["12384"]},"title":"Bokeh Application","version":"1.0.4"}}
 +
        </script>
 +
        <script type="text/javascript">
 +
          (function() {
 +
            var fn = function() {
 +
              Bokeh.safely(function() {
 +
                (function(root) {
 +
                  function embed_document(root) {
 +
                   
 +
                  var docs_json = document.getElementById('12507').textContent;
 +
                  var render_items = [{"docid":"98005dec-a5d3-43ec-a523-7494f747438f","roots":{"12384":"3b715907-4e69-4660-a7f3-4279658d028a"}}];
 +
                  root.Bokeh.embed.embed_items(docs_json, render_items);
 +
               
 +
                  }
 +
                  if (root.Bokeh !== undefined) {
 +
                    embed_document(root);
 +
                  } else {
 +
                    var attempts = 0;
 +
                    var timer = setInterval(function(root) {
 +
                      if (root.Bokeh !== undefined) {
 +
                        embed_document(root);
 +
                        clearInterval(timer);
 +
                      }
 +
                      attempts++;
 +
                      if (attempts > 100) {
 +
                        console.log("Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing");
 +
                        clearInterval(timer);
 +
                      }
 +
                    }, 10, root)
 +
                  }
 +
                })(window);
 +
              });
 +
            };
 +
            if (document.readyState != "loading") fn();
 +
            else document.addEventListener("DOMContentLoaded", fn);
 +
          })();
 +
        </script>
 +
        </div>
 
   </body>
 
   </body>
 
    
 
    
 
</html>
 
</html>
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
  
 
Return to [[Main_Page]]
 
Return to [[Main_Page]]

Latest revision as of 09:22, 29 May 2023

Phase diagram of an ideal solution at fixed temperature

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 blue curve shows the vapor pressure [math]p[/math] of the mixture 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 red curve shows the vapor pressure [math]p[/math] of the mixture as a function of the mole fraction of A in the vapor [math]x_A^v[/math]:

[math]p=\dfrac{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


The number of moles in each phase (liquid or vapor) can be obtained from the lever rule:

[math]n^l\overline{\text{BK}}=n^v\overline{\text{KR}}[/math]


slider.py example







Return to Main_Page