<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:tocPath="Multiflash reference|Multiflash commands" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-ca" xml:lang="en-ca" MadCap:PathToHelpSystem="../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
    <!-- saved from url=(0016)http://localhost -->
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Defining models</title>
        <link href="../SkinSupport/Slideshow.css" rel="stylesheet" />
        <link href="../SkinSupport/MadCap.css" rel="stylesheet" />
        <link href="../Resources/Stylesheets/mfwman.css" rel="stylesheet" />
        <script src="../SkinSupport/jquery.min.js">
        </script>
        <script src="../SkinSupport/MadCapAll.js">
        </script>
        <script src="../SkinSupport/MadCapTopicAll.js">
        </script>
    </head>
    <body>
        <div class="MCBreadcrumbsBox_0"><span class="MCBreadcrumbsPrefix">You are here: </span><span class="MCBreadcrumbsSelf">Multiflash reference</span><span class="MCBreadcrumbsDivider"> &gt; </span><a class="MCBreadcrumbsLink" href="MultiflashCommandsIntroduction.htm">Multiflash commands</a><span class="MCBreadcrumbsDivider"> &gt; </span><span class="MCBreadcrumbs">Defining models</span>
        </div>
        <h1>Defining models</h1>
        <p class="para">The standard thermodynamic and transport property models available in Multiflash are specified in the model sets and model configuration files supplied. However, you may wish to set up your own model definition, for example you may wish to use an activity style mixing rule with an equation of state model. You may also wish to group together different models to describe different properties, such as using an equation of state to describe the properties of a refrigerant mixture but defining the density in terms of ideal mixing.</p>
        <p class="para">In general the MODELS command defines a thermodynamic or transport property model for mixtures. The command has the format:</p>
        <p class="CodeExplained">MODEL&#160; model_id&#160; MF_model_name&#160; [Model_options]…</p>
        <p class="para">where</p>
        <ol>
            <li class="listnum" value="1"><span class="StyleListLucidaSansTypewriterChar_1">model_id</span> is a<span class="span_2"> user-defined</span> name that will be used to refer to the particular combination of the property model and options specified.</li>
            <li class="listnum" value="2"><span class="StyleListLucidaSansTypewriterChar_1">MF_model_name</span> is the Multiflash name for the basic model. The list of recognised models is given in “<a href="../Reference/ModelsAndComponentDataRequirements.htm#_Ref90115037" class="MCXref_ParaTextOnly_0">See "Models and component data requirements"</a>” on page <a href="../Reference/ModelsAndComponentDataRequirements.htm#_Ref90115037" class="MCXref_PageNumberOnly_0">See "Models and component data requirements"</a>. <span class="StyleListLucidaSansTypewriterChar_1">Model_options</span> are additional keywords that describe model variants, references to other, previously-defined, models or references to the source of binary interaction parameters.</li>
        </ol>
        <p class="para">Many .mfl files are provided and will provide examples of how to set up a model definition.</p>
        <h2>What the model definition means</h2>
        <p class="para">It is not necessary to understand the Multiflash model definition to carry out useful calculations. The explanation in this section is provided so that you can refer to the details when you need to. For example you may wish to change the key component for a phase.</p>
        <p class="para">In the example below the model is Peng-Robinson. The definition of a model configuration file will appear in the results window and includes:</p>
        <p class="para">The source of pure component data, binary interaction parameters and petroleum fraction correlations. The last line below defines the enthalpy and entropy datum point. If it is not included then the default (as shown below) will be taken.</p>
        <p class="CodeExplained">Puredata infodata;<br></br>bipdata oilandgas infobips;<br></br>chardata infochar tbsoereide;<br></br>datum enthalpy compound entropy compound; </p>
        <p class="para">A command to remove all previously loaded models and binary interaction parameters:</p>
        <p class="CodeExplained">remove models; remove bipsets;</p>
        <p class="para">A command to allow for the possibility of user supplied BIPs which are identified by the name PRBIP</p>
        <p class="CodeExplained">bipset PRBIP 1 constant;</p>
        <p class="para">The definition of the thermodynamic model; consists of the command “model” followed by a model name, MPR, and a keyword to identify the model, PR and finally the name for a user supplied <span class="MCTextPopup"><a href="javascript:void(0);" class="MCTextPopupSpot_0" onclick="FMCTextPopup( event, this ); return false;">BIP<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" alt="Closed" MadCap:alt2="Open" class="MCExpandingIcon" /></a><span class="MCTextPopupBody_0" style="display: none; ">Binary interaction parameter</span></span> set, PRBIP.</p>
        <p class="CodeExplained">model MPR PR PRBIP;</p>
        <p class="para">The definition of the default models used for the transport properties:</p>
        <p class="CodeExplained">model MPDVISC pdvisc lfit;</p>
        <p class="CodeExplained">model MCLSMPR cls MPR; model MMCSMPR mcs MPR;</p>
        <p class="para"><a name="kanchor40"></a>A phase descriptor giving an identifier and a phase type for each possible phase which may be considered in the calculation:</p>
        <p class="CodeExplained_6">remove pd;</p>
        <p class="CodeExplained_27">pd Gas gas MPR * * MPDVISC MCLSMPR;</p>
        <p class="CodeExplained_27">pd Liquid1 liquid MPR * * MPDVISC MCLSMPR MMCSMPR;</p>
        <p class="CodeExplained_27">pd Liquid2 liquid MPR * * MPDVISC MCLSMPR MMCSMPR;</p>
        <p class="CodeExplained_27">pd Water liquid MPR * * MPDVISC MCLSMPR MMCSMPR;</p>
        <p class="para">and finally, specification of a key component for each liquid phase so that it can be identified when multiple liquid phases are found.</p>
        <p class="CodeExplained_6">key Water 007732-18-5;</p>
        <p class="CodeExplained_5">key Liquid1 not 007732-18-5;</p>
        <p class="CodeExplained_5">key Liquid2 not 007732-18-5;</p>
        <p class="para">The CAS number is that for water. This format is general and unambiguous and allows, for instance, for cases where the user has chosen the alternative name H2O for water. However, Multiflash will still recognise the original format of</p>
        <p class="CodeExplained">Key Water water;</p>
        <p class="page_footer">© 2013 - 2014 KBC Advanced Technologies plc. All rights reserved.</p>
        <script type="text/javascript" src="../SkinSupport/MadCapBodyEnd.js">
        </script>
        <p class="MCWebHelpFramesetLink MCWebHelpFramesetLinkBottom"><a href="../../Default_CSH.htm#MultiflashCommands/Defining_models.htm" style="">Open topic with navigation</a>
        </p>
    </body>
</html>