CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Plotting Velocity Components from Probe Data Using Gnuplot

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 30, 2023, 08:49
Post Plotting Velocity Components from Probe Data Using Gnuplot
  #1
New Member
 
Josh
Join Date: Nov 2022
Location: Scotland
Posts: 6
Rep Power: 3
joshc is on a distinguished road
Dear all,

I am running an unsteady single-phase 2D viscoelastic simulation using the rheoFoam solver. To identify whether a solution has reached a steady state, I have placed several probes (9 in total) in the domain (using the relevant function within controlDict) and I would like to check that they do not oscillate over time.

However, the output file for the velocity probes has the following form:

Code:
 # Probe 0 (0.1 4 0)
# Probe 1 (0.1 1.5 0)
# Probe 2 (0.1 -1.5 0)
# Probe 3 (0.1 -4 0)
# Probe 4 (0.1 3 0)
# Probe 5 (0.1 0 0)
# Probe 6 (0.1 -3 0)
# Probe 7 (0.3 4.28 0)
# Probe 8 (-0.3 -4.28 0)
# Time              0                   1                   2                   3                   4                   5                   6                   7                   8                  
300                 (1.63497901423e-05 1.37147164839e-05 0) (1.10471997781e-05 -8.10669816334e-05 0) (1.10472265148e-05 8.10664831717e-05 0) (1.63497726397e-05 -1.37146161646e-05 0) (0.0130657458981 -0.000283639102177 0)(0.0130657401772 5.97955849558e-11 0) (0.0130657459222 0.000283639299117 0) (1.95795959515e-05 3.2456599189e-05 0) (-1.79769313486e+307 -1.79769313486e+307 -1.79769313486e+307)

What I would like to do is create a script which, using Gnuplot, plot the x and y components of velocity for each probe on a separate graph. I appreciate that there are other threads which explain how to do this to some extent (see: Plotting Velocity Probe File with gnuplot), however they are poorly explained and I am unsure of how to extrapolate their scripts to suit my use-case.

Any help would be appreciated!

Thanks in advance,

Josh
joshc is offline   Reply With Quote

Old   February 15, 2023, 10:35
Default
  #2
New Member
 
Josh
Join Date: Nov 2022
Location: Scotland
Posts: 6
Rep Power: 3
joshc is on a distinguished road
Dear all,

For anyone looking for a solution to the same problem I have, there are two possible solutions I have found which do not directly use gnuplot in the manner I have asked for help with.

The first is to modify the rheoFoam solver such that it produces an addition field "magU" for the magnitude of U, therefore getting around the problem of having three velocity components for each probe and therefore making it easy to use gnuplot in the standard fashion. (Credit and thanks to PC for helping me implement this)

Otherwise, KM has helped me produce a python script which is able to plot the probes using matplotlib which I have included in case anyone would like to use it.

In any case, if anybody is able to help to plot the individual velocity components from the probe easily using gnuplot, I would appreciate the additional knowledge.

Regards,
Josh
Attached Files
File Type: zip plot.zip (146.4 KB, 11 views)
joshc is offline   Reply With Quote

Reply

Tags
gnuplot, probes, velocity

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
kindly help me .. i have and error at line number 147.. m zubair Fluent UDF and Scheme Programming 0 February 10, 2019 11:25
UDF comilation error. urgent help please m zubair Fluent UDF and Scheme Programming 4 February 10, 2019 11:19
CFD by anderson, chp 10.... supersonic flow over flat plate varunjain89 Main CFD Forum 18 May 11, 2018 07:31
Variables Definition in CFX Solver 5.6 R P CFX 2 October 26, 2004 02:13
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 09:11


All times are GMT -4. The time now is 05:40.