Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Hello,
As the title suggests, I'm looking at trying to plot the flow rate or diameter for an orifice plate for a range of temperatures and pressures. I'd like to get a contour or 3D plot. However, whenever I do try the 3D or contour plots, I can't seem to get them to work unless I drop all units before hand and remember as I do the inputs, what my scale is. When dealing with anything temperature wise, this is rather frustrating.
Attached is my worksheet, of which I'm looking to get the plot working for a range of Temps & Pressures. I'm currently looking at sonic flows, and am wondering to what extent does the temperature and the pressure have an impact on the flow rate that will be produced for a given diameter, or vise versa. I'd also be curious, if say temperature over a range isn't very impactful, the graph of the mass flow rate vs. Pressure and Diameter. I'm interested in plotting it this way as a jet engine will change its output of T&P, and the mass flow you get out will vary over that range for a given diameter.
I can get 2D plots of the data to work out alright, just not the 3D or contour. I must be missing something either trivial or just not seeing it currently.
There are two functions in the sheet, one for calculating the Diameter as a function: D(m,T,P) and the Mass Flow as a function: M(D,T,P).
Would it be wiser to attempt some sort of demensional analysis?
Solved! Go to Solution.
There is no multiplication sign between T.g and °C. You have to enter (or copy) it the same way as the 300 °C in the call of m.cr410(...). °C is not a normal unit which is just a factor.
If you want to do a contourplot of a function and don't want to bother with CreateMesh(), you can define a dummy function with unitless parameters for T and P. You will then have to set the limits manually (or you could also use variables) in the plot.
Oddly enough, it won't work with °C, but it will work with Kelvin. Is there a reason why it wouldn't work with Deg C as you have it in your solution. I did try just inserting °C, but it would then make the entire selection of Tg°C as either a variable or a unit.
I feel like I may be missing something simple here.
There is no multiplication sign between T.g and °C. You have to enter (or copy) it the same way as the 300 °C in the call of m.cr410(...). °C is not a normal unit which is just a factor.
Thank you Werner, it is working now. Out of question, how would I express this as a CreateMesh so I could specify the boundaries more easily?
Jake Roth wrote:
Thank you Werner, it is working now. Out of question, how would I express this as a CreateMesh so I could specify the boundaries more easily?
See attachment.
Werner,
Could you save a copy in the original Mathcad 15 format. I probably have a license for Prime somewhere, but we don't use it as it will not run our historical worksheets or work with the dll libraries we use for the properties of fluids.
Thanks,
Gerard
Could you save a copy in the original Mathcad 15 format.
I wish I could, but PTC decided that there should be no way back. Incredible as it may sound they provide no means to save a file in any older format (not even from P3 to P2). So the best I can do is providing a pdf print of Jake's file - find it attached.
, but we don't use it as it will not run our historical worksheets or work with the dll libraries we use for the properties of fluids.
Quite understandable. I don't use Prime on a regular basis for work either because of its severe limitations and drawbacks compared to Mathcad 15. But being curious by nature I have installed Prime in parallel with MC15 to have look what the future may look like (and am still hoping the future will look differently than what I see now).
Ah, OK. I forgot about that problem! While Prime has it's good features, there's so much I like in Mathcad that's not replicated in Prime; more and more I find myself thinking of switching to SMath rather than Prime for non-symbolic math calculations - or maybe go the whole way to Mathematica and get SystemModeller too.
Thanks for the pdf; I should be able to follow it from that.
Just as an FYI, here is the full eqn for the orifice plate. It does go off the screen (which I really hope they fix and have a 'wrap around' feature).
My thinking is by MathCad Prime 5 or so when I graduate it will be much better. Although, I did get a free 15 version.
(I've always been curious about the .dll libraries and how they work).
I forgot to comment on dll libraries and how they can be used in Mathcad.
The simplest example is the one I use most, WaterSteamPro from http://www.wsp.ru/. Valery Ochkov in this forum is closely involved in the development of WaterSteamPro; Konstantin Orlov, one of his former students and now one of his professorial colleagues at Moscow Power Engineering Institute, was, I believe, the lead programmer. WSP allows me to calculate the thermophysical properties of water and steam and a variety of gases involved in combustion by calling additional functions made available from WSP. WSP works with Excel, Mathcad, Scilab, Mathlab, Maple and a variety of other systems; with a little mangling, it will also work with SMath. As a boiler systems design engineer and boiler designer, I find it incredibly useful. For example, if I want the enthalpy of steam at a pressure P and a temperature T, in Mathcad I can simply call
h:=wspHPT(P,T)
and the enthalpy is returned in h.
Another library which I use occasionally from Mathcad for refrigeration system calculations is CoolProp (http://coolprop.sourceforge.net/). Not so easy to use (the callable functions and the list of fluids do not appear in the functions list in Mathcad or Excel; you have to know these from the documentation and example code), but it is powerful.
More recently I also tried FluidProp (http://www.fluidprop.com/, or http://www.asimptote.nl/software/fluidprop/ for a free version) and Nature (http://nature.codeplex.com/), but was unable to call them from Mathcad, only from Excel or Windows PowerShell.
At it's simplest, any dll can be put in C:\Program Files (x86)\Mathcad\Mathcad 15\userefi and Mathcad will find it. But simply doing that makes calling the functions tedious; you have to know the names of all the functions. The better libraries such as WSP provide wrappers for Mathcad (and for other common numerical applications) so that the callable functions appear in the functions menu, and provide help on their use.
I had Prime installed on my last PC, but never bothered to transfer the license when that PC was skipped. I suppose I should retrieve the license so that I can keep up with future releases of Prime, but the last two releases I looked at still had, as you say, severe limitations for serious engineering use.