Thermolib FAQ 1 ACQUIRING THERMOLIB

Thermolib FAQ
1 ACQUIRING THERMOLIB .....................................................................................................................3 Q: I’m interested in trying out the Thermolib toolbox. Can I get a test or demo license? .......................................... 3 Q: How much does Thermolib cost? ........................................................................................................................ 3 Q: I am a student/professor/work in academic research. Can I get an academic discount? .................................... 3 2 REQUIREMENTS ................................................................................................................................3 Q: Do I need MATLAB/Simulink to use Thermolib?.................................................................................................. 3 Q: What are the software and hardware requirements to use the Thermolib toolbox? ............................................. 3 3 INSTALLATION AND SETUP .................................................................................................................4 Q: How do I setup Thermolib in MATLAB/Simulink? ................................................................................................ 4 Q: I finished installing Thermolib but I cannot find the toolbox in the Simulink Library Browser. .............................. 4 Q: Do I have to run the Thermolib setup every time I start MATLAB? ...................................................................... 5 Q: Can I use multiple Thermolib versions in parallel on one computer?................................................................... 5 4 SPECIES AND MEDIA .........................................................................................................................5 Q: Which compounds/species are available as part of the Thermolib chemical media database? .......................... 5 Q: Can I add new compounds/species to the Thermolib chemical media database? How? .................................... 6 Q: Which thermodynamic values/properties does Thermolib compute?................................................................... 6 Q: Can I model solid states in Thermolib? ................................................................................................................ 7 Q: Can I model liquid/gas states in Thermolib? ........................................................................................................ 7 Q: Can Thermolib handle mixtures? ......................................................................................................................... 7 5 MODELING IN SIMULINK .....................................................................................................................7 Q: In which range, for both temperature and pressure, does Thermolib simulate? .................................................. 7 Q: Can I model pressure feedback in a hydraulic network using Thermolib? ........................................................... 7 Q: How can I model a closed loop system using Thermolib? ................................................................................... 7 Q: Which thermodynamic equations of state are used? ........................................................................................... 8 Q: Can I model dynamic processes with Thermolib? ............................................................................................... 8 Q: What can I do if the component I need is not part of the Thermolib library? ........................................................ 8 Q: I would like to modify a Thermolib component or create a new one. Can I do that? ............................................ 8 Q: Is it possible to view/modify Thermolib source code? .......................................................................................... 8 Q: What are the recommended solver setting for Thermolib in Simulink? ................................................................ 8 6 TROUBLESHOOTING ..........................................................................................................................9 Q: I get a “Certified time error /license error” when I try to run Thermolib. What can I do? ...................................... 9 Q: I have an algebraic loop in my Thermolib model. What can I do to eliminate it? ................................................. 9 Q: My Thermolib model is very slow. Is there anything I can do to speed it up? ...................................................... 9 1
ACQUIRING THERMOLIB
Q: I’M INTERESTED IN TRYING OUT THE THERMOLIB TOOLBOX. CAN I GET A TEST OR DEMO
LICENSE?
A: Yes. Fill out the form on our website (http://www.eutech-scientific.de/productsservices/tools/thermolib/thermolib-demo-request.html). You will receive an offer for test
license that lasts in general 30 days from the day of activation. In this time, you will be able
to try out all the features of a fully-licensed Thermolib.
Q: HOW MUCH DOES THERMOLIB COST?
A: Please send us a request for Thermolib. If you are working in academic research, make
sure to mention this in your request so that we can offer you the academic discounts. For
users from certain countries, we will redirect you to your respective reseller.
Q: I AM A STUDENT/PROFESSOR/WORK IN ACADEMIC RESEARCH. CAN I GET AN ACADEMIC
DISCOUNT?
A: Yes. We have an attractive academic licensing model. Please send us a request for more
information.
2
REQUIREMENTS
Q: DO I NEED MATLAB/SIMULINK TO USE THERMOLIB?
A: Yes. At the time being, it is essential to have a running license of MATLAB/Simulink to use
the Thermolib toolbox. If you have no Simulink license available, you can only use Thermolib
command line functions like some basic thermodynamic state calculations and species
diagram functions, however you cannot use the modeled components like pumps,
compressors, heat exchangers, valves etc.
Q: WHAT ARE THE SOFTWARE AND HARDWARE REQUIREMENTS TO USE THE THERMOLIB
TOOLBOX?
A:
Software:
Thermolib has been developed with MATLAB 7.5 (R2007b) and works with the following
MATLAB versions (and later versions):
R2007b (32 bit) R2008a (32 bit) R2008b (32 bit) R2009a (32 bit) R2009b (32 bit, 64 bit) R2010a (32 bit, 64 bit) R2010b (32 bit, 64 bit) R2011a (32 bit, 64 bit) R2011b (32 bit, 64 bit) R2012a (32 bit, 64 bit) You will need a Windows operating system (XP, 7, Vista). If you have a different operating
system and want to use Thermolib, please send us an e-mail to support@thermolib.de, that
we can keep track of interest for other operating system support.
Optional: MS Excel is a spreadsheet program from Microsoft. Maintenance of species
thermophysical data and use of balancing functionality in Thermolib is much easier if you
have MS Excel installed. Thermolib uses Excel-File format .xls (MS-Excel 2003).
Hardware:
Hardware requirement depends on the licensing scheme you want to use. Thermolib can be
licensed with software activation (binding to the hardware called CodeMeterAct) or with a
USB Dongle (CodeMeter Dongle). For the latter you need a free USB port. Trial versions, we
offer only with software activation.
Hard Disk Space:
A Thermolib installation requires approximately 120 MB on your hard disc.
3
INSTALLATION AND SETUP
Q: HOW DO I SETUP THERMOLIB IN MATLAB/SIMULINK?
Q: I FINISHED INSTALLING THERMOLIB BUT I CANNOT FIND THE TOOLBOX IN THE SIMULINK
LIBRARY BROWSER.
A: After installation of Thermolib, the MATLAB environment has to be notified of the paths to
the Thermolib toolbox. To do that, start the MATLAB version you wish to use Thermolib in,
and go to the “Bin” folder of the Thermolib installation directory. Run “Thermolib_Setup”
from the command line (step 11 in the Thermolib Installation Guide).
So as not to repeat the same procedure every time you open MATLAB, choose “Yes” when
asked “Do you want to store the settings permanently?”.
Q: DO I HAVE TO RUN THE THERMOLIB SETUP EVERY TIME I START MATLAB?
A: No. When you run “Thermolib_Setup” from the command line (step 11 in the Thermolib
Installation Guide), choose “Yes” when asked “Do you want to store the settings
permanently?”.
If the settings are not being saved, it is possible that you do not have write-permission on
your MATLAB installation. Please contact your IT administrator.
If for some reason it is not possible to save the settings, we suggest creating a MATLAB
shortcut that will navigate to the Thermolib Bin directory and run the setup script. Consult
the MATLAB help by searching for “shortcut”.
Q: CAN I USE MULTIPLE THERMOLIB VERSIONS IN PARALLEL ON ONE COMPUTER?
A: Yes. To this end, we recommend to not permanently store the path settings in your
MATLAB installation, but rather create a "shortcut" for each Thermolib version, which you
want to use. After starting MATLAB you choose the shortcut of the version, which you want
to use today. The shortcut should call the Thermolib_Setup-script of the corresponding
Thermolib installation and could look like the following:
cd('c:\Program Files\EUtech SE\Thermolib\5.1.1\Bin');
Thermolib_Setup('ShowDialog','off','SavePaths','off')
cd ..
The additional arguments for Thermolib_Setup avoid the pop-up dialog asking the "save path
question" and by default do not save the path settings.
4
SPECIES AND MEDIA
Q: WHICH COMPOUNDS/SPECIES ARE AVAILABLE AS PART OF THE THERMOLIB CHEMICAL MEDIA
DATABASE?
A: Thermolib is currently with data for the following species. Additional species can be added
(Please refer to chapter 4 “Chemical Media Database” in the Thermolib user manual.)
•
•
•
•
•
•
•
•
•
•
•
•
CH4 H2O H2O‐IF97 CO CO2 H2 N2 O2 isooctane Methanol 1‐Buten 1,3‐Butadien •
•
•
•
•
•
•
•
•
•
•
•
R134a, no chem. NH3 NO Ethanol n‐Propane n‐Butane i‐Pentane R12 R407C, no chem R125, no chem R32, no chem R1234yf, no chem. Q: CAN I ADD NEW COMPOUNDS/SPECIES TO THE THERMOLIB CHEMICAL MEDIA DATABASE?
HOW?
A: Yes. You can adjust the Thermolib chemical media database by adding either new
properties or new species, or both. One feature of Thermolib is that the chemical media data
can be viewed and adjusted in Microsoft Excel. Thermolib offers a tool where it automatically
imports the chemical media data from Excel into a structure SMediaData into the MATLAB
workspace. If you do not have Microsoft Excel available, you can adjust the SMediaData
structure in MATLAB directly.
Please refer to chapter 4 “Chemical Media Database” in the Thermolib user manual. There
you will find specific instruction on how to add a new species and new properties (section
4.3), and where to find the thermo-physical properties for new compounds (section 4.5).
Q: WHICH THERMODYNAMIC VALUES/PROPERTIES DOES THERMOLIB COMPUTE?
A: Thermolib describes the medium flow between blocks using a flow bus. The bus contains
a set of the most important properties defining the flow:
•
•
•
•
•
•
•
•
•
molar flow rate (ndot), pressure (p), temperature (T), enthalpy flow (Hdot), entropy flow (Sdot), flow of the Gibbs free energy (Gdot), capacity flow (Cpdot=ndot*cpm), vapor fractions (x) and the molar species concentrations (psi). See section 1.3.3 in the Thermolib user manual.
Q: CAN I MODEL SOLID STATES IN THERMOLIB?
A: No. Thermolib models mainly liquid and gas flows. The exception is solid compounds that
behave similar to gas, for instance pulverized coal or dust in a gas flow. It is possible to
model these in Thermolib with some restrictions.
As a workaround to model solid state of dust, solid fuels or ash in gas flows, we recommend
to model the solid species as "liquid", as typically in such flows no liquid state appears. That
means the "x=0" on the Thermolib flow bus changes meaning from "liquid" to "solid". To this
end, the vapor-pressure curve for this species has to be manipulated accordingly. The
species properties like "liquid density" then represent the solid property instead. The "Gas
Dryer" component can be used as a "Filter" to separate the solid dust/ash/coal from the gas
flow.
Q: CAN I MODEL LIQUID/GAS STATES IN THERMOLIB?
A: Yes. Thermolib also covers 2-phase region and supercritical states.
Q: CAN THERMOLIB HANDLE MIXTURES?
A: Yes. Thermolib can handle mixtures. E. g. wet air is modeled by mixing the compounds
oxygen, nitrogen and water. Especially combustion products and refrigerant mixtures can be
modeled. However the thermodynamic mixture model in Thermolib does not handle
interactions between the species and aceotropic effects.
5
MODELING IN SIMULINK
Q: IN WHICH RANGE, FOR BOTH TEMPERATURE AND PRESSURE, DOES THERMOLIB SIMULATE?
A: The global range for temperature is between 1 and 6000 Kelvin. The global range for
pressure is between 1 Pa and 1000 bar. The valid range in a Thermolib model, however, is
dependent on the species being used in that model.
Q: CAN I MODEL PRESSURE FEEDBACK IN A HYDRAULIC NETWORK USING THERMOLIB?
A: Yes. Please refer to chapter 5 in the user manual (\Help\Thermolib-UserManual.pdf) for
further help on pressure feedback in Thermolib.
Q: HOW CAN I MODEL A CLOSED LOOP SYSTEM USING THERMOLIB?
A: There are two options to build a closed loop with Thermolib: either use an initialconditions block, or make sure there a buffer (a tank) in the loop. See the Demo Loops
under Demos/Simulink/Thermodynamic Systems Library/ Pressure Feedback or the Carnot
Cycle under Demos/Simulink/Thermodynamic Systems Library/ Basic Thermodynamic Cycle.
However, keep in mind that an initial-condition block is only a set of memory blocks for the
elements of the Flow Bus. If you create cycles with initial condition blocks make sure, that
you do sufficiently fix the conditions of the cycle to avoid unintended "dynamics".
Q: WHICH THERMODYNAMIC EQUATIONS OF STATE ARE USED?
A: You have a choice between “Ideal Gas” and “Real Gas (Peng-Robinson)” equations of
state. In the Thermolib model setup block, you can choose which equations of states your
model should use for modeling the gas phase.
Q: CAN I MODEL DYNAMIC PROCESSES WITH THERMOLIB?
A: Yes. Most Thermolib components contain thermal masses, which mainly govern the
dynamic behavior of a thermodynamic process. Furthermore you can use a generic tank
block to model mass storage behavior.
Q: WHAT CAN I DO IF THE COMPONENT I NEED IS NOT PART OF THE THERMOLIB LIBRARY?
A: Thermolib offers basic thermodynamic building blocks that simplify building new
components. These building blocks take care of calculating the thermodynamic states and
properties and make sure that all thermodynamic calculations are correct.
You can use these basic building blocks to build more complex components. A good starting
point is to take a look how some of the Thermolib components themselves are built and
modifying them accordingly.
Q: I WOULD LIKE TO MODIFY A THERMOLIB COMPONENT OR CREATE A NEW ONE. CAN I DO THAT?
A: Yes. All the Simulink code in Thermolib is visible for users and can be modified as they
see fit. Only the code for the basic building blocks (Thermodynamic States and Properties) is
not visible and cannot be modified. The Simulink code constitutes a large part of the
Thermolib library and is generally a good starting point to modify and create new blocks.
Q: IS IT POSSIBLE TO VIEW/MODIFY THERMOLIB SOURCE CODE?
A: Yes and no. Please see the answer for the question “I would like to modify a Thermolib
component or create a new one. Can I do that?”.
Q: WHAT ARE THE RECOMMENDED SOLVER SETTING FOR THERMOLIB IN SIMULINK?
A: There is no general solver setting recommendation for Thermolib models as it strongly
depends on the problem.
6
TROUBLESHOOTING
Q: I GET A “CERTIFIED TIME ERROR /LICENSE ERROR” WHEN I TRY TO RUN THERMOLIB. WHAT
CAN I DO?
A: These are the steps to update a certified time on a CodeMeter USB-stick (e.g. for
Thermolib licenses):
1. Open the CodeMeter Control Center from your taskbar by double clicking on the
CodeMeter icon.
2. Start the WebAdmin interface from the CodeMeter Control Center by clicking on the
button "WebAdmin".
3. Now your web browser should open and you can navigate to "Content => CM-Stick" to
initiate a certified time update.
See section 2 in the Thermolib-LicenseUpdate.pdf help file in the \Help folder of your
Thermolib installation. You have to make sure, that the certified timestamp is not older than
90 days. The days remaining are displayed by the Thermolib_Version command.
Q: I HAVE AN ALGEBRAIC LOOP IN MY THERMOLIB MODEL. WHAT CAN I DO TO ELIMINATE IT?
A: See the answer for the question “How can I model a closed loop system using Thermolib”.
Q: MY THERMOLIB MODEL IS VERY SLOW. IS THERE ANYTHING I CAN DO TO SPEED IT UP?
A: Thermolib provides a convenient way of displaying the content of the FlowBus signals
using the FlowDisplay block. Unfortunately this visualization slows down the simulation time.
To disable the update of the FlowDisplay blocks, create a base workspace variable
"th_disable_flow_display". If this variable is present, the FlowDisplay blocks will not be
updated any more.
Second typical source of slow down is fast dynamics. Check if you modeled very small
volumes compared to big volume flows of media. This might lead the solver to decrease the
simulation step size. Consider simplifying the model.