Previous: Watching phase volumes in Up: Test case modification Next: Test case: multiRegionHeater

This is an automatically generated documentation by LaTeX2HTML utility. In case of any issue, please, contact us at info@cfdsupport.com.

44 Watching phase volumes in the domain

  • For interFoam solvers is useful to watch fraction of phases volumes
  • Liquid phase volume fraction is part of solver output
  • Write two small scripts showing Liquid phase volume fraction during computation
  • Create bash script named writeVolumePhaseFraction.sh:
cat log | grep "Phase-1" | cut -d " " -f5 > writeVolumePhaseFraction.dat
  • Cygwin therefore OpenFOAM for Windows supports only files in Unix format (i.e. with \n for newlines as opposed to the DOS/Windows \r\n newline). If there is a problem with running script writeResiduals.sh add following line into your script just after the #! line
(set -o igncr) 2>/dev/null && set -o igncr; # this comment is required
  • Create file named volumePhaseFraction:
# Gnuplot script file for plotting data from file "log"
set title "Convergence process"
set xlabel "Iterations"
set ylabel "Liquid phase volume fraction"
set grid
plot 'writeVolumePhaseFraction.dat' with lines title 'Liquid phase volume fraction'
pause mouse
  • Run writeVolumePhaseFraction.sh, which creates data file
    # bash writeVolumePhaseFraction.sh
  • Run volumePhaseFraction.gp, by opening the script file in gnuplot program
volumePhaseFraction 1

Figure: Water fraction in domain