CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   How to do linear fit to some points in Openfoam? (https://www.cfd-online.com/Forums/openfoam/179685-how-do-linear-fit-some-points-openfoam.html)

bigfeather November 5, 2016 05:40

How to do linear fit to some points in Openfoam?
 
Hi All

At each calculating time step, I obtain the positions for some particular points in OpenFoam. For example, these points have velocity larger than 100 m/s. Their positions change with run-time.

The format of the postions of these points are as follows:

point 1 (x1, y1)
point 2 (x2, y2)
point 3 (x3, y3)
point 4 (x4, y4)
.....

I need to do a linear fit to all of these points and get the slope of the fitting line.

Is there any existing function or library in OpenFOAM I can directly use?

Many thanks!

bigfeather November 7, 2016 05:39

Anyone knows how to do it? Thanks.

khedar November 14, 2016 17:19

Maybe you can try 'probes':

http://cfd.direct/openfoam/user-guid...hs-monitoring/


All times are GMT -4. The time now is 19:06.