I am afraid revenue generated from Alph has not proven to be sufficient to justify its continued sale. I greatly appreciate the support of the folks who have purchased Alph in the past and hope that it will continue to serve you well in the future.
This and related pages will be maintained for archival purposes only.
This example modifies the completed gas plant example of Tutorial 7 to use models for the gas/gas exchanger and the combined chiller/refrigeration unit. A compressor model with a specified polytropic efficiency is also added to the sales gas.
Using models in problems has two main benefits:
Providing clarity by encapsulating calculations
Providing reusability by allowing complete calculations to be copied and pasted to new problems
For this example the IFD for tutorial 7:
is modified by introducing three models:
gasgas - represents the gas-gas heat exchanger
refrig - represents the chiller and the propane refrigeration unit
polycomp - adds a sales gas compressor with a specified polytropic efficiency.
The resulting IFD now looks like:
Heat Exchanger Model
The IFD for the gasgas model looks like the following:
The side1in and side2in objects are Model Input Tools, which are used to get information from the parent flow diagram. In this case the source for side1in is feed.v and the source for side2in is lts.v. Variables or tools in the parent can also be referenced by prefixing the name with the appropriate type symbol ($ or #).
The side2out fluid is calculated using the side2in composition and flow, a temperature calculated from the side1in temperature plus a delta T specified in the dt variable. The pressure is simply the side2in pressure minus the specified side2dp pressure drop.
The side1out fluid flow, composition and pressure are calculated in a similar manner, but instead of temperature, the enthalpy is calculated by an energy balance of the other three inlets and outlets.
These calculations simply mirror those that were done in the main IFD of Tutorial 7 and of course could be modified for different circumstances.
Only a model's variables can be directly referenced by the parent, so side1out and side2out variables are added with a property type of Reference. This allows the parent to access the outlet fluids by means of these aliases. The duty and lmtd variables are added as convenience values.
Check the notes for the model itself as well as its various objects for additional information.
Polytropic Compressor Model
While the Alph Compressor/Expander tool calculates polytropic efficiency, it does not allow you to specify it directly. However it is easy to create a model which adds that capability, as illustrated by the polycomp tool:
This pairs a standard compressor tool with a single equation function solver that varies the compressor's adiabatic efficiency until the desired polytropic efficiency is obtained.
This model makes use of the if function of formulas in a couple of interesting ways. First the OutletP and PolyEff variables use it to check to see if the corresponding model input tools are actually connected to an object in the parent. If they are, then their values are used, but if not, the values of the POut and PolyE variables are used instead. This allows for optional inputs depending on whether an absolute value is used or one that is calculated by the parent in some fashion.
Also the formula for the comp efficiency uses an if function to first check if the feed fluid is in fact known. The purpose of this is to ensure that any solvers in the parent are triggered before the polysolver as the latter should probably be nested inside the formers solution if that is the case. This will not be an issue for the sales gas compressor, but can be for the Model Example Two case where a copy of this model is used inside a refrigeration model.
A number of variables have been added to allow this model to be referenced in formulas the same way a normal compressor/expander model can be.
The chiller and associated propane refrigeration calculations from the original case have been encapsulated in the refrig tool:
The calculations are the same as discussed in Tutorial 6, with the addition of the appropriate model input tools and variables to communicate with the parent. Note the X model input tool is provided to allow the parent to designate the composition of the refrigerant; pure propane in this case.
This is also a modification of the Model One example to specify the polytropic efficiency of the refrigeration compressor. However in this case solution of the polytropic efficiency is done by adding an equation to the main solver. While not terribly important in this example, the idea is to illustrate that it may sometimes be more efficient to consolidate solver functions and you should give thought to what calculations you are including when you add existing models to your problem.
The models used in Model One are included, along with other models, in the Model Library Case, in a form ready for copying and pasting into new problems. If you have models or ideas for models you would like to see included, please contact me.