CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums

Gnuplot Vector Probes from the funtionObject

Register Blogs Members List Search Today's Posts Mark Forums Read

In this blog, quick reference notes about OpenFOAM are posted in a form of a summary to address a specific topic per post, which I think could be helpful as a reminder for my Alzheimer condition
Rate this Entry

Gnuplot Vector Probes from the funtionObject

Posted June 9, 2012 at 15:27 by Hisham

When using the functionObject to probe a vector (e.g. velocity) at a location, the output is in the format:
Code:
# Time  vector
1.20   (2.14   8.512   1.005)
.
.
.
Unlike sampling or using probeLocations, until now AFAIK it is not possible to use U.component(0) to spit only the X-component. To resolve that using gnuplot, one can use:
Code:
plot 'probeFile' using "%lf (%lf %*lf %*lf)"
to plot the Ux component and:
Code:
plot 'probeFile' using "%lf (%*lf %*lf %lf)"
to plot the Uz component. %lf --> read a double and %*f --> skip number ... So it translates to: read (ignore ignore read)
Or:
Code:
plot 'probeFile' using 1:2 '%lf (%lf %lf %lf)'
plot 'probeFile' using 1:4 '%lf (%lf %lf %lf)'
Thereby, other data manipulation can be introduced.
Posted in Uncategorized
Views 495 Comments 2 Edit Tags Email Blog Entry
« Prev     Main     Next »
Total Comments 2

Comments

  1. Old Comment
    Hi Hisham
    Thanks for your Post. Right now I got a Problem with plotting those vectors.

    My file looks like:
    # Time vector01 vector02 1.20 (2.14 8.512 1.005) (2.15 0.23 1.24))Could you please give me some tipps?
    permalink
    Posted August 8, 2012 at 08:19 by iznal iznal is offline
  2. Old Comment
    Hisham's Avatar
    Quote:
    Originally Posted by iznal View Comment
    Hi Hisham
    Thanks for your Post. Right now I got a Problem with plotting those vectors.

    My file looks like:
    # Time vector01 vector02 1.20 (2.14 8.512 1.005) (2.15 0.23 1.24))Could you please give me some tipps?
    Hi

    I think it should be something like:
    Code:
    plot 'File' using "%lf (%lf %*lf %*lf) (%*lf %*lf %*lf)"

    for plotting the X component of the first vector and so on!
    permalink
    Posted September 4, 2012 at 09:01 by Hisham Hisham is offline
 

All times are GMT -4. The time now is 13:59.