|
[Sponsors] |
March 11, 2014, 01:56 |
How to plot this by gnuplot?
|
#1 |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17 |
Hi guys,
I got this force.dat by openfoam function. But I dont know know to plot it. Code:
0.01 ((175.11 -29.1481 -7.68548e-16),(2.75129 -0.0949126 -1.23933e-18),(0 0 0)) ((146.469 879.927 -836.51),(0.476936 13.8252 0.612752),(0 0 0)) 0.02 ((179.722 -75.9252 -3.0539e-16),(2.34419 -0.060192 -1.06484e-18),(0 0 0)) ((381.524 903.101 -931.303),(0.302465 11.7796 0.402727),(0 0 0)) 0.03 ((203.615 -106.208 -7.78895e-17),(2.10338 -0.0642538 -7.93942e-19),(0 0 0)) ((533.698 1023.17 -1123.37),(0.322875 10.5695 0.378691),(0 0 0)) 0.04 ((221.76 -131.418 6.27871e-17),(1.94296 -0.0816487 -8.28315e-19),(0 0 0)) ((660.373 1114.34 -1293.77),(0.410285 9.76335 0.453646),(0 0 0)) Thanks |
|
March 12, 2014, 05:18 |
|
#2 |
Member
Julian Langowski
Join Date: May 2011
Location: Bremen, Germany
Posts: 91
Rep Power: 14 |
Dear Dongyue,
try this: 1.) Copy the forces.dat for saftey Code:
cp postProcessing/forces/0/forces.dat postProcessing/forces/0/forces_plot.dat Code:
sed -i 's/((/(( /g' postProcessing/forces/0/forces_plot.dat Code:
gnuplot plot "postProcessing/forces/0/forces_plot.dat" u 1:($3) w l t "x-force" axis x1y2 Best regards Julian
__________________
πάντα ῥεῖ - Heraclitus |
|
March 12, 2014, 08:48 |
|
#3 | |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17 |
Quote:
Code:
plot "postProcessing/forces/0/forces_plot.dat" u 1:($3) w l t "x-force" axis x1y2 |
||
March 12, 2014, 08:59 |
|
#4 |
Member
Julian Langowski
Join Date: May 2011
Location: Bremen, Germany
Posts: 91
Rep Power: 14 |
Code:
plot "postProcessing/forces/0/forces_plot.dat" u 1:2 w l t "x-force" axis x1y1
__________________
πάντα ῥεῖ - Heraclitus |
|
March 12, 2014, 09:35 |
|
#5 | |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21 |
Quote:
If you want to plot multiple columns, there is no need to retype the filename, i.e. Code:
plot "filename" using 1:2, "" using 1:5, "" using 1:8 |
||
March 12, 2014, 09:42 |
|
#6 |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17 |
Code:
plot "w.dat" using 1:3 w l,"" using 1:11 w l, "" using 1:4 w l |
|
March 20, 2014, 02:24 |
|
#7 |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17 |
Code:
0.01 ((122.847 3.11355 1.99776e-16),(2.35502 0.0580908 -6.78944e-19),(0 0 0)) ((-0.0778387 3.07116 -647.967),(-0.00145227 0.0588756 -3.40765),(0 0 0)) Solved: Code:
awk '{print $2}' forces > t |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] Foam warnings - related to swak4Foam | Salam-H | OpenFOAM Community Contributions | 20 | August 2, 2015 15:40 |
to plot Mach contour using GNUPLOT | killtimm | Main CFD Forum | 2 | December 28, 2009 11:15 |
how to plot contour or vector with "GNUPLOT" | ztdep | Main CFD Forum | 2 | June 19, 2006 12:26 |
how to plot isotherms in gnuplot? | sivasamy | Main CFD Forum | 0 | December 19, 2005 01:26 |
To plot a grid using Gnuplot | Jim | Main CFD Forum | 5 | September 3, 2004 16:32 |