Calculating a Function out of a cloud of points
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Calculating a Function out of a cloud of points
Hallo,
i have a Problem i need to solve fast 😞
Problem:
Density is a function of pressure and temperature
I can create a cloud of points for the density:
Temperature
Pressure 100° 200° 300°
100bar Density Density
200 bar
300 bar
etc
My problem is now, how can i calculate a Density Function depending on these Input Points?
Can anyone help me ?
Thx 😃
- Labels:
-
Other
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Look up "Curve Fitting and Smoothing" and "Interpolation and Prediction" in Help. You may find the cspline 2D example of particular interest.
Stuart
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
There are a number of possibilities.
If you know (from theory or observation) the form of the expression
you can find the least squares values of the coefficients that "fits" the cloud of points.
Or, you can brute-force a fit. Mathcad will do a polynomial least squares fit to the data. "regress" is a function from "old" Mathcad that will do a fit to whatever order polynomial you choose and the data will support. "polyfit" is available in Prime--it will allow you to specify the order of the fit and allow specific combinations of independent variables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You need to fit a surface to your data. You don't say where the data is from though; ideal gas, non-ideal gas, solid, liquid? You could fit a physical equation to the data, for example using minerr, or a multinomial,, using regress. We need more information to go much beyond that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I assume you are ok interpolating between the data points you created. If so, this should be all you need to do:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Yea there is no possible equation i think its from measured data.
Its a mixture of Ehthylen and solid 30% Propylen Particles or so.
A polynomic Interpolation or fitting is what i needed.
Real gas.
@dferry its exactly what i needed THx!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
In love with Mathcad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
See please two picture from the book
Thermal Engineering studies with Excel, Mathcad and Internet
Mathcad-sheets are here
Prime
Mathcad 15
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I got to thinking about plotting the data. Came up with this. Maybe someone knows a simpler way. I couldn't figure out how to get a mesh; not sure if it's possible, particularly in Prime.
fyi, I had to remove the units because it won't plot otherwise.
