<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Creating a string from a table for Coolprop, programming ? in Mathcad</title>
    <link>https://www.ptcusercommunity.com/t5/Mathcad/Creating-a-string-from-a-table-for-Coolprop-programming/m-p/873003#M206532</link>
    <description>&lt;P&gt;Dears,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I´m using with great success the Coolprop wrapper, but one challenging task is to form the "mixture" string.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Air for instance must be written as: "O2[0.21]&amp;amp;N2[0.79]"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When working with complex mixtures, like up to 10 components, my idea was to use a table and extract a "concat" function from the table. All good doing it the hard way:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fredericocms_0-1683051861297.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/81300i00F25F73A141481C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="fredericocms_0-1683051861297.png" alt="fredericocms_0-1683051861297.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;(...)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fredericocms_1-1683051889053.png" style="width: 511px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/81301iE4128F1EF1BBFFC5/image-dimensions/511x114?v=v2" width="511" height="114" role="button" title="fredericocms_1-1683051889053.png" alt="fredericocms_1-1683051889053.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Problem: if I add or remove one of the 10 components from the table, maybe for a simpler composition, then the formula for "mixture" would fail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Solution: maybe write a program? But don´t even know how to start.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be great.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fred.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 02 May 2023 18:41:52 GMT</pubDate>
    <dc:creator>frederico.cms</dc:creator>
    <dc:date>2023-05-02T18:41:52Z</dc:date>
    <item>
      <title>Creating a string from a table for Coolprop, programming ?</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Creating-a-string-from-a-table-for-Coolprop-programming/m-p/873003#M206532</link>
      <description>&lt;P&gt;Dears,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I´m using with great success the Coolprop wrapper, but one challenging task is to form the "mixture" string.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Air for instance must be written as: "O2[0.21]&amp;amp;N2[0.79]"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When working with complex mixtures, like up to 10 components, my idea was to use a table and extract a "concat" function from the table. All good doing it the hard way:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fredericocms_0-1683051861297.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/81300i00F25F73A141481C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="fredericocms_0-1683051861297.png" alt="fredericocms_0-1683051861297.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;(...)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fredericocms_1-1683051889053.png" style="width: 511px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/81301iE4128F1EF1BBFFC5/image-dimensions/511x114?v=v2" width="511" height="114" role="button" title="fredericocms_1-1683051889053.png" alt="fredericocms_1-1683051889053.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Problem: if I add or remove one of the 10 components from the table, maybe for a simpler composition, then the formula for "mixture" would fail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Solution: maybe write a program? But don´t even know how to start.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be great.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fred.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 18:41:52 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Creating-a-string-from-a-table-for-Coolprop-programming/m-p/873003#M206532</guid>
      <dc:creator>frederico.cms</dc:creator>
      <dc:date>2023-05-02T18:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a string from a table for Coolprop, programming ?</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Creating-a-string-from-a-table-for-Coolprop-programming/m-p/873008#M206533</link>
      <description>&lt;P&gt;Should be no problem.&lt;/P&gt;
&lt;P&gt;But I don't know Coolprop and the syntax that is needed there.&lt;/P&gt;
&lt;P&gt;Is it necessary to include names with a mol_frac of zero or could we simply omit them?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 18:56:34 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Creating-a-string-from-a-table-for-Coolprop-programming/m-p/873008#M206533</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2023-05-02T18:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a string from a table for Coolprop, programming ?</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Creating-a-string-from-a-table-for-Coolprop-programming/m-p/873012#M206534</link>
      <description>&lt;P&gt;Many thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The string syntax is "component_name[mol%]&amp;amp;component_name[mol%]&amp;amp; ... etc".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The requirements are, the sum must be = 1 and the component name must follow the Coolprop library.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the mol fraction is zero, both show or omit is ok, For example:&lt;/P&gt;&lt;P&gt;Air: "O2[0.21]&amp;amp;N2[0.79]"&lt;/P&gt;&lt;P&gt;Only oxygen: "O2[1]&amp;amp;N2[0]" or "O2[1]", all ok&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In advance, many thanks for the help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fred.&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 19:07:47 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Creating-a-string-from-a-table-for-Coolprop-programming/m-p/873012#M206534</guid>
      <dc:creator>frederico.cms</dc:creator>
      <dc:date>2023-05-02T19:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a string from a table for Coolprop, programming ?</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Creating-a-string-from-a-table-for-Coolprop-programming/m-p/873019#M206535</link>
      <description>&lt;P&gt;Here is a function which creates the string, including zero values&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Werner_E_0-1683058306700.png" style="width: 869px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/81310iA339F3B03A739274/image-dimensions/869x344?v=v2" width="869" height="344" role="button" title="Werner_E_0-1683058306700.png" alt="Werner_E_0-1683058306700.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a slight modification so that zero values are omitted&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Werner_E_1-1683058344587.png" style="width: 880px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/81311i48BC7E06AB99D476/image-dimensions/880x357?v=v2" width="880" height="357" role="button" title="Werner_E_1-1683058344587.png" alt="Werner_E_1-1683058344587.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And here is a function which can do both, depending on its third argument&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Werner_E_2-1683058393518.png" style="width: 809px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/81312i21E0FD27E5D05A98/image-dimensions/809x475?v=v2" width="809" height="475" role="button" title="Werner_E_2-1683058393518.png" alt="Werner_E_2-1683058393518.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Werner_E_3-1683058438972.png" style="width: 813px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/81313i09A54353782B18EE/image-dimensions/813x397?v=v2" width="813" height="397" role="button" title="Werner_E_3-1683058438972.png" alt="Werner_E_3-1683058438972.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Attached file is in format P9. Maybe someone ( &lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/14826"&gt;@LucMeekes&lt;/a&gt;&amp;nbsp; ?) can convert it to P8 format or lower.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: There were copy &amp;amp; paste errors in the first version of the functions. Is now fixed.&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 20:16:35 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Creating-a-string-from-a-table-for-Coolprop-programming/m-p/873019#M206535</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2023-05-02T20:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a string from a table for Coolprop, programming ?</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Creating-a-string-from-a-table-for-Coolprop-programming/m-p/873036#M206537</link>
      <description>&lt;P&gt;Here's the file in Prime6.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Success!&lt;/P&gt;
&lt;P&gt;Luc&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 21:03:16 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Creating-a-string-from-a-table-for-Coolprop-programming/m-p/873036#M206537</guid>
      <dc:creator>LucMeekes</dc:creator>
      <dc:date>2023-05-02T21:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a string from a table for Coolprop, programming ?</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Creating-a-string-from-a-table-for-Coolprop-programming/m-p/873124#M206544</link>
      <description>&lt;P&gt;Dear Werner,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can´t thank you enough, it is just perfect and elegant. It also helped me a lot to learn more about programming.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fred.&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 09:36:52 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Creating-a-string-from-a-table-for-Coolprop-programming/m-p/873124#M206544</guid>
      <dc:creator>frederico.cms</dc:creator>
      <dc:date>2023-05-03T09:36:52Z</dc:date>
    </item>
  </channel>
</rss>

