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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

units for values in tables

ptc-4110960
1-Visitor

units for values in tables

Is there a way to assign units to values in tables?

eg: i would like to use a table for density of air at various pressures and temperatures

t [O C]-50050100150200300400
ρ [kg/m3]







1 bar1.5631.2751.0780.9320.82260.73560.60720.517
5083.7965.253.9646.2540.5736.1829.825.37
100 bar175.6131.4107.191.1379.6670.9258.3749.71
200 bar340.3253.7205.4174.3152.2135.6111.895.41
300 bar449.3350.8288.6246.7216.4193.4160.3137.4

Is there a way i could create such a table with respective units for each of the values so that if I use a lookup function to find

hlookup(300K,table, 150bar)=, mathcad interpolates b/w nearest values in the table and gives me an answer

similarly, is there a function for interpolation and extrapolation from table values such that if i try to look up ρ at 50O C & 10MPa) it should automatically interpolate b/w the nearest actual points present in the table and provide a value.

ACCEPTED SOLUTION

Accepted Solutions

More compact program with remarks:

1-3D-Spline-eng.png

View solution in original post

9 REPLIES 9

In Mathcad Prime - no problem to have a matrix with different dimension (see too my wish - http://communities.ptc.com/docs/DOC-2151).

In Mathcad 15 no problem to solve your task - attach please your tabel as Mathcad matrix or as Excel sheet and I will do it. Now see please a solution one same task -

http://twt.mpei.ac.ru/ochkov/Mathcad_12/4_03_3D_Spline.png

Werner_E
25-Diamond I
(To:ptc-4110960)

It could help to post a worksheet which shows what you have tried so far - no need to retype the tabled values and not necessary to guess which version of Mathcad you would need a solution for.

Is it mandatory that all values have to be in ONE matrix? Then, if you insist on values with units you can not user MC15, as there all values in a matrix must have the same unit.

While it should be possible to write a lookup function which does what you want, I don't believe that you can use any of the provided out of the box. In Mathac Prime you have new modifiers, e.g. "near", but even then there is no interpolation done.

Solution in attach.

See the pictute too:

3D-spline-interpolation--table-units.png

More compact program with remarks:

1-3D-Spline-eng.png

Thanks Valery. It's a really neat piece of code.

vijay ram wrote:

Thanks Valery. It's a really neat piece of code.

You welcome!

One question - what is this substance?

And one compliment from me - two reverse function:

5-Reserve-function-eng.png

Thanks for the inverse functions as well .

The table is for the properties of air. I am using it for calculations related to thermal comfort.

I'm facing a small prob with the code you gave me. If I input the temperature in K, it doesn't work.

Infact even the command

50K/K-273.15= gives an error.

On the other hand

50bar/bar works in non-dimensionalizing it. Why does this happen?

vijay ram wrote:

Thanks for the inverse functions as well .

The table is for the properties of air. I am using it for calculations related to thermal comfort.

At 50-300 bar!!!

vijay ram wrote:

I'm facing a small prob with the code you gave me. If I input the temperature in K, it doesn't work.

Infact even the command

50K/K-273.15= gives an error.

On the other hand

50bar/bar works in non-dimensionalizing it. Why does this happen?

Attach please the sheet!

vijay ram wrote:

The table is for the properties of air.

See please how we can calculate air density with help the WaterSteamPro packadge (www.wsp.ru😞

wspair.png

Announcements

Top Tags