## Computing with Thermophysical Data

by: Maple 2016

When Maple 2016 hit the road, I finally relegated my printed Mollier charts and steam tables to a filing cabinet, and moved my carefully-curated spreadsheets of refrigerant properties to a distant part of my hard drive. The new thermophysical data engine rendered those obsolete.

Other than making my desk tidier, what I find exciting is that I can compute with fluid properties in a tool that has numerical integrators, ODE solvers, optimizers, programmatic visualisation and more.

Here are several small examples that demonstrate how you can use fluid properties with Maple’s math and visualization tools (this worksheet contains the complete examples).

## Work Done in Compressing a Gas

The work done (per unit mass) in compressing a fluid at constant temperature is

where V1 and V2 are specific volumes and p is pressure.

You need a relationship between pressure and specific volume (either theoretical or experimental) to calculate the work done.

Assuming the ideal gas law, the work done becomes

where R is the ideal gas constant, T is the temperature (in K) and M is the molecular mass (in kg mol-1), and V is the volume.

Ideal gas constant

Molecular mass of propane

Hence the work done predicted by the Ideal Gas Law is

Let’s now use real fluid properties instead and numerical integrators to compute the work done.

Here, the work done predicted with the Ideal Gas Law and real fluid properties is similar. This isn’t, however, always the case for all gases (try experimenting with ammonia – its strong intermolecular forces result in non-ideal behavior).

## Minimum Specific Heat Capacity of Water

The specific heat capacity of water varies with temperature like so.

Let's find the temperature at which the specific heat capacity of water is the lowest.

The lowest specific heat capacity occurs at 309.4 K; this is the temperature at which water requires the least energy to raise or lower its temperature.

Incidentally, this isn’t that far from the standard human body temperature of 310.1 K (given that the human body is largely water, one might hazard a guess why we have evolved to maintain this temperature).

## Temperature-Entropy Plot for Water

Maple 2016 generates pressure-enthalpy-temperature charts and psychrometric charts out of the box. However, you can create your own customized thermodynamic visualizations.

This, for example, is a temperature-entropy chart for water, together with the two-phase vapor dome (the worksheet contains the code to generate this plot).

I'm also working on a lumped-parameter heat exchanger model with fluid properties (and hence heat transfer coefficients) that change with temperature. That'll be more complex than these simple examples, and will use Maple's numeric ODE solver.

## Bugs in parsing?...

Hello there! Maple 2016.1 sometimes gets crasy about parsing input strings. I managed to capture this behaviour in the attached file. It looks like below. I am not sure what exactly triggers it. It just starts happening all of a sudden. What might be the cause...?

 >
 >
 >
 >

## Polar equations...

Hello

I will try to be as specific as possible.

On my Ti nspire it is possible for me to calculate polar equations like on the buttom picture with the settings on the upper picture. But when I try this in Maple It is not possible. I have worked my way try for two days now and it does not work for me.

Does any body know how to get this solved?

Regards

Heide

## Maple 2016.1 update

by: Maple 2016

An update to Maple 2016 is now available. Maple 2016.1 provides:

• Updated translations for Simplified and Traditional Chinese,  French, Greek, Japanese, Brazilian Portuguese, and Spanish
• Updates to the new Maple Workbook
• Enhancements to Maple’s context-sensitive menus
• A variety of improvements to the math engine and interface

To get this update, use Tools>Check for Updates from within Maple, or visit the Maple 2016.1 downloads page.

eithne

## Colorscheme option: new features and new video

by: Maple 2016

New color schemes for plotting have been added to Maple 2016. They are summarized here. You can also see more details on the plot/colorscheme help pages, which have been reworked (hopefully in a way that makes them more useful to you).

We released a new video a few weeks ago describing one of these features: coloring by value. The worksheet I used for the video is available here: ColorByValueWebinar.mw

## How to put degree symbol on tickmark?...

Suppose that I have a plot:

`plot(sin((1/180)*Pi*x), x = -180 .. 180)`

I want to add a degree symbol after the tickmarks on the x-axis.  One approach which seem promising is to add a plot option for the x-axis:

axis[1] = [tickmarks = [90 = typeset("90", degree)]]

where "degree" is replaced by a code for the degree symbol. Maple is helpful here because I can point and click using the Common Symbols palette and insert a degree symbol. However this does not work delivering an error "Error, invalid neutral operator". This error is undocumented.

I can insert a Pi or an infinity symbol. If I want to I can put a degree sysmbol into ther title, but apparently not on the axes.

## Problem with hot keys...

I should be able to use F3 to break into a multline nested loop and insert a new line of code, and then F4 to close it up again before execution.  The F4 works for closing things up.  But the F3 does NOT work.  Is this a known problem?  Is there another way to do it short of a lot of cutting and pasting?

## Text editor: problem with copy&paste...

I just bought 2016 Maple. For a few days, everything was fine.

The increase of the speed calculations is very significant.

Then copy and paste gave unexpected results: impossible to keep the symbols, systematic conversion in text,in mode MathML,, appearance of ASCII characters in the texts, etc ..

all attempts to change the settings have failed

I spend more time correcting the changes that occur in the copy and paste that to take care of my equations.

Do you have an explanation ?

## Possible bug in colorscheme option?...

Hello everyone!

Is this a bug that the following two commands work differently?:

densityplot(sin(x*y), x = -5 .. 5, y = -5 .. 5, colorscheme = ["zgradient", ["blue", "green", "yellow", "red"], zrange = -5 .. 5], style = surface)

plot3d(sin(x*y), x = -5 .. 5, y = -5 .. 5, view = -10 .. 10, colorscheme = ["zgradient", ["blue", "green", "yellow", "red"], zrange = -5 .. 5], style = surface)

The second one works fine in that if you increase the magnitude of sin(x*y) (e.g. 3sin(x*y)) the coloring changes accordingly. But the first one plots sin(x*y) or 5sin(x*y), etc. just the same!

## How to move file out of Maple workbook?...

Is it possible to view maple workbook content in older versions?

## DataSet retrivial from the Internet...

I have tried to perform the examples given in the help section for DataSet retrival.  I cannot get Maple 2016 to access the internet available databases.  It does not return any outside of PC resources, like Maple 2015 did, on search items. Is there a setup item that I am missing or is there something amiss in Maple 2016.

This is the Error that I am getting: "Error, (in DataSets:-Search) invalid input: find_count expects its 1st argument, lst, to be of type list(nonnegint), but received [FAIL["total_count"], 0]. "

I was able to run this example in Maple 2105.  The example is the "Average Global Temperature"

Thanks

Bill Tolrud

## Calling xlsx file from Maple workbook for another ...

Hi,

I would like to start using maple workbook to manage my projects but i can't figure out the paths. suppose i have a workbook named: WorkBookTest.maple

and inside this i have a folder containing Data in which i have an excel workbook DataTest.xlsx

and also i have a folder containing Documents in which i have a maple worksheet Document.mw

and also i have a folder containing Code in which i have a mathematica notebook Code.nb

Now inside the maple worksheet, to import the excel data i use the command: Import("this:///Data/DataTest.xlsx")

and it works

Now inside the mathematica workbook, to import the excel data i use the command: Import["this:///Data//DataTest.xlsx"]

and it fails

so if i have other program like mathematica notebook inside maple workbook that wants to call a file with data, how should i define the path?

## Undesired expansion in solving...

In working on an answer to a recent question on MaplePrimes:
http://mapleprimes.com/questions/210948-Can-We-Trust-Maple

I noticed that in solving a "simple" system of two equations in two unknowns, potentially undesirable expansion occurs.
The two equations were only simple in the sense that the solving was very trivial, since the two unknowns occurred (almost) already isolated on the left:
eq1:=diff(x(t),t)=rhs1;
eq2:=1.2345*diff(v(t),t)=rhs2; #rhs2 is very complicated in the link given.
So in isolating I tried:
solve({eq1,eq2},{diff(x(t),t),diff(v(t),t)});
The resulting ode system took considerably longer to solve numerically than an unexpanded version.
It is trivial (of course) to do the solving without solve in this case.

Here is an extremely simple example, where the unknowns are already isolated, so that the equations themselves are actually the solution.

restart;
eq1:=a=b*(c+d);
solve(eq1,a); #No expansion
eq2:=e=b*(c+d)+f*(8+k);
solve({eq1,eq2},{a,e}); #Expanded:
{a = b*c+b*d, e = b*c+b*d+f*k+8*f}

Can expansion be avoided?

## Can this be simplified from a given rule...

Hello there,

I want to simplify this for a given rule in Maple

(-(1/2)*ib-(1/2)*ia+ic)*vc+(-(1/2)*ia-(1/2)*ic+ib)*vb+(-(1/2)*ic-(1/2)*ib+ia)*va

rule :  ia+ib+ic=0

A desired result should be

3/2*ic*vc+3/2*ib*vb+3/2*ia*va

but I can't apply this rule in Maple...  it seems like recursive and goes back again and again.

Can it break the recursive routine and make it as a desired result?

Thank you

## Fitting of surface from matrix data...

Hey guys,

I want to fit experimental data and I was wondering if there is a special PolynomialFit function for a surface.

My data consist of a X,Y, Matrix of densities and I want to have a function describing the surface of the values. On matlab the following code will do so:

[x, y, z] = prepareSurfaceData(temps, concs, densities);
ft = fittype('poly33');
fitresult = fit([x, y], z, ft);

Maybe that gives you a better view of what I want.

Best regards

 First 55 56 57 58 59 Page 57 of 59
﻿