CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Gnuplot to monitor the torque while running (https://www.cfd-online.com/Forums/openfoam-solving/195810-gnuplot-monitor-torque-while-running.html)

elomri November 17, 2017 13:56

Gnuplot to monitor the torque while running
 
2 Attachment(s)
Hello everyone,

I've been trying to monitor the torque of the rotating blades during the running of the solver via Gnuplot.

All the residuals can be plotted with no problems. But when i introduce a line of code to monitor the torque (written every 5 iterations) gnuplot woudn't even start and gives no error out.
In the foto log_file is the placement of the value of torque i would like to monitor and in the file gnuplot is my code for it. I don't know what i'm missing or what i'm am doing wrong.

For the sake of comparison i included the line of code for mintoring the pressure residuals of the third loop by using the command " sed 'p;n;n' " which i tried to reuse to monitor the torque but doesn't seem to be the right choice.

Your help is much appreciated

me3840 November 21, 2017 00:28

Have you tried just using foamMonitor?

elomri November 21, 2017 10:55

No i didn't use FoamMonitor.
Should it be easier to follow the simulation using FoamMonitor ?

Carno January 27, 2018 21:54

I use following code to monitor Torque in gnuplot.

Code:

set key bottom right
set xlabel "Iterations"
set title "Plot of Torque & Flow Rate over Simulationtime"
set grid

##### First plot: Torque Plot
#set ytics
set  yr [-70:-40]

set ylabel "Torque [Nm]" textcolor rgb "red"

plot "< sed s/[\\(\\)]//g ./postProcessing/forces/0/forces.dat" using 1:11 with lines title "Torque",\

##### Second plot: Flow Rate
set y2tics
set  y2r [0.035:0.045]

set y2label "Flow Rate [m3/s]" textcolor rgb "blue"

plot "< sed s/[\\(\\)]//g ./postProcessing/patchMassFlows_massFlow/2/massFlow" using 1:2 with lines title "Flow Rate" linecolor 3 axes x1y2

set multiplot
pause 1
reread



All times are GMT -4. The time now is 17:15.