Skip to content
Snippets Groups Projects
Commit ba6ba1ea authored by Kutalmış Berçin's avatar Kutalmış Berçin
Browse files

ENH: add grid-line option into foamMonitor (#1197)

    foamMonitor -g
    foamMonitor -grid
parent e6238a5c
No related branches found
No related tags found
1 merge request!315MISC: RANS model, TUT, BUG, DOC changes
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
# \\ / A nd | www.openfoam.com # \\ / A nd | www.openfoam.com
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# | Copyright (C) 2015 OpenFOAM Foundation # Copyright (C) 2015 OpenFOAM Foundation
# Copyright (C) 2019 OpenCFD Ltd.
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
# This file is part of OpenFOAM. # This file is part of OpenFOAM.
...@@ -40,11 +41,12 @@ usage() { ...@@ -40,11 +41,12 @@ usage() {
Usage: ${0##*/} [OPTION] <file> Usage: ${0##*/} [OPTION] <file>
options: options:
-h | -help print the usage -h | -help prints the usage
-i | -idle <time> stops if <file> unchanging for <time> sec (default = 60) -i | -idle <time> stops if <file> unchanging for <time> sec (default = 60)
-l | -logscale plots data (y-axis) on log scale, e.g. for residuals -l | -logscale plots data (y-axis) on log scale, e.g. for residuals
-r | -refresh <time> refreshes display every <time> sec (default = 10) -r | -refresh <time> refreshes display every <time> sec (default = 10)
-y | -yrange <range> sets data (y-axis) <range>, format "[0:1]" -y | -yrange <range> sets data (y-axis) <range>, format "[0:1]"
-g | -grid draws grid lines on the plot
Monitor data with Gnuplot from time-value(s) graphs written by OpenFOAM Monitor data with Gnuplot from time-value(s) graphs written by OpenFOAM
e.g. by functionObjects e.g. by functionObjects
...@@ -62,6 +64,7 @@ plotFileHeader() { ...@@ -62,6 +64,7 @@ plotFileHeader() {
set term x11 1 font "helvetica,17" linewidth 1.5 persist noraise set term x11 1 font "helvetica,17" linewidth 1.5 persist noraise
$LOGSCALE $LOGSCALE
$YRANGE $YRANGE
$GRID
set title "Data Monitoring" set title "Data Monitoring"
set xlabel "$XLABEL" set xlabel "$XLABEL"
plot \\ plot \\
...@@ -82,6 +85,7 @@ IDLE=60 ...@@ -82,6 +85,7 @@ IDLE=60
REFRESH=10 REFRESH=10
LOGSCALE="" LOGSCALE=""
YRANGE="" YRANGE=""
GRID=""
GNUPLOT=$(which gnuplot) GNUPLOT=$(which gnuplot)
! [ "x$GNUPLOT" = "x" ] || usage "Gnuplot not installed" ! [ "x$GNUPLOT" = "x" ] || usage "Gnuplot not installed"
...@@ -111,6 +115,10 @@ do ...@@ -111,6 +115,10 @@ do
YRANGE="set yrange $2" YRANGE="set yrange $2"
shift 2 shift 2
;; ;;
-g | -grid)
GRID="set grid"
shift 1
;;
-*) -*)
usage "unknown option: '$*'" usage "unknown option: '$*'"
;; ;;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment