cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Plot Failing due to 'Not evaluating to real values?"

jroth
5-Regular Member

Plot Failing due to 'Not evaluating to real values?"

Hello,

I'm unsure why the plot isn't plotting, either a 3D or a 2D Contour Plot. I'm wanting to show what is basically a T vs. P graph for an isentropic senario. I'd like to plot either the surface or a contour. (A couple curves in a 2D graph would work as well). I'm just unsure what is incorrect in the syntax.

ACCEPTED SOLUTION

Accepted Solutions
RogerYeh
12-Amethyst
(To:jroth)

Because you want to plot the function, you just need to put 'S' on the contour. I've re-defined 'S' to add in the units.

View solution in original post

9 REPLIES 9
Fred_Kohlhepp
23-Emerald I
(To:jroth)

3D plot wants a matrix.

Fred Kohlhepp wrote:

3D plot wants a matrix.

Not necessarily. It would also be happy with a more complex nested arrays structure created by CreateMesh or a simple function of two arguments. The point in the latter case is that the arguments are not allowed to have units and as we cannot specify arguments in the 3D plot placeholder we are forced to either rewrite the functiion to be plotted or create an auxiliary function as Roger and I have shown.

BTW, is there a delay in the appearance of postings here? I think I haven't seen neither Fred's nor Roger's post before I sent mine. But then, I may have been sloppy and didn't look carefully enough.

RogerYeh
12-Amethyst
(To:jroth)

Because you want to plot the function, you just need to put 'S' on the contour. I've re-defined 'S' to add in the units.

Werner_E
25-Diamond I
(To:jroth)

A better way to deal with 3D-plots would be the use of CreateMesh() as it gives you better control.

If you want to use the functions directly, you have to define an auxiliary function. While Prime is making progress in that respect, units still are not generally accepted and you have to get rid of them for abcissa and ordinate. Units are only allowed for the applicate ("z"-axis). You tried to get rid of them, but the syntax of 3D-plots does not allow to state arguments but only the function name.

01.04.png

Sorry, what is the substance. What is its Origin of formula?

For water/steam - IAPWS-IF97:on the Mathcad 15 Server:

wspSPT.png

I have a lot of same plots for a others substances..

Sorry, but I see the word "water" in the file name.

See please www.wsp.ru

wspSPT-F.png

jroth
5-Regular Member
(To:jroth)

Sorry for the late answer all, and thank you for the responses.

To start with, this is part of my homework for my graduate thermodynamics course. It is more focused on the fundemental equations of state and the maxwell relations and bridgeman's table and looking at table generation. Current text is Advanced Engineering Thermodynamics by Adrian Bejan (3rd Ed.)

I have fixed the values to more closely align with the values in my current thermo text by Shapiro; sheet attached. The two equations displayed are curve fit lines to model water near its density maximum. I had an error of using a high temperature and pressure input is to be from 1atm to 100 atm.

I'm not so much as concerned about the value outputs as I am in proving the isentopic curves are 'cup-shaped'. My initial intent was to just show through a basic graph (regarless of the units) that the isentropic curves would be parabola's in the T-P plane. But, it seems that the graphs displayed are not doing that, but rather I shall need to modify my entropy expression algebraically.

I have also attached the article refererence to the equations and is the reference used by Bejan.

Sorry, it is one old equations.

Now we use IAPWS-IF97

See please for water (region 1 - for Mathcad 15, Prime and SMath)

http://twt.mpei.ac.ru/rbtpp/Region1/eng-index.html

jroth
5-Regular Member
(To:jroth)

Here is the specific volume plot plotted on the 2nd page.

Announcements

Top Tags