Commit 5998cf56 authored by Salko Jr, Robert's avatar Salko Jr, Robert
Browse files

Add scripts for plotting three field velocities

parent b9e9e756
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
@@ -332,6 +332,36 @@ class PlotTools(object):
       """
       me._chanPlotMaxWrapper('chan_void_vap', "Void [-]", state, ch, figname)

   def plotChAxialVliq(me, state=None, ch=None, figname=None):
       """ Makes an axial plot of liquid velocity for a channel

       Args:
          state (int): State number to plot (1-based).  If not present, selects state with maximum.
          ch (int): Chan number to plot (1-based). If not present, selects chan with maximum.
          figname (str): Name of the figure.
       """
       me._chanPlotMaxWrapper('chan_velocity_liq', "Velocity [m/s]", state, ch, figname)

   def plotChAxialVvap(me, state=None, ch=None, figname=None):
       """ Makes an axial plot of vapor velocity for a channel

       Args:
          state (int): State number to plot (1-based).  If not present, selects state with maximum.
          ch (int): Chan number to plot (1-based). If not present, selects chan with maximum.
          figname (str): Name of the figure.
       """
       me._chanPlotMaxWrapper('chan_velocity_vap', "Velocity [m/s]", state, ch, figname)

   def plotChAxialVdrp(me, state=None, ch=None, figname=None):
       """ Makes an axial plot of droplet velocity for a channel

       Args:
          state (int): State number to plot (1-based).  If not present, selects state with maximum.
          ch (int): Chan number to plot (1-based). If not present, selects chan with maximum.
          figname (str): Name of the figure.
       """
       me._chanPlotMaxWrapper('chan_velocity_drp', "Velocity [m/s]", state, ch, figname)

   def plotChAxialQuality(me, state=None, ch=None, figname=None):
       """ Makes an axial plot of equilibrium quality for a channel

+18 −0
Original line number Diff line number Diff line
import argparse
from PlotTools import PlotTools

def main():
   parser = argparse.ArgumentParser(description="Plot the axial droplet velocity distribution in a channel.  All indices are 1-based.")
   parser.add_argument('h5name', type=str, help="HDF5 file")
   parser.add_argument('--state', type=int, nargs="?", help="State to plot.  Defaults to state with max droplet velocity.")
   parser.add_argument('--ch', type=int, action='append', help="""Channel to plot.  Defaults to channel with max droplet velocity.
         Can plot multiple channels (e.g. --ch 1 --ch 2 --ch 3 ...)""")
   parser.add_argument('--figname', type=str, nargs="?", help="Name of figure.  Defaults to name based on location and dataset type.")
   args = parser.parse_args()

   plotter = PlotTools(args.h5name)

   plotter.plotChAxialVdrp(args.state, args.ch, args.figname)

if __name__=='__main__':
   main()
+18 −0
Original line number Diff line number Diff line
import argparse
from PlotTools import PlotTools

def main():
   parser = argparse.ArgumentParser(description="Plot the axial liquid velocity distribution in a channel.  All indices are 1-based.")
   parser.add_argument('h5name', type=str, help="HDF5 file")
   parser.add_argument('--state', type=int, nargs="?", help="State to plot.  Defaults to state with max liquid velocity.")
   parser.add_argument('--ch', type=int, action='append', help="""Channel to plot.  Defaults to channel with max liquid velocity.
         Can plot multiple channels (e.g. --ch 1 --ch 2 --ch 3 ...)""")
   parser.add_argument('--figname', type=str, nargs="?", help="Name of figure.  Defaults to name based on location and dataset type.")
   args = parser.parse_args()

   plotter = PlotTools(args.h5name)

   plotter.plotChAxialVliq(args.state, args.ch, args.figname)

if __name__=='__main__':
   main()
+18 −0
Original line number Diff line number Diff line
import argparse
from PlotTools import PlotTools

def main():
   parser = argparse.ArgumentParser(description="Plot the axial vapor velocity distribution in a channel.  All indices are 1-based.")
   parser.add_argument('h5name', type=str, help="HDF5 file")
   parser.add_argument('--state', type=int, nargs="?", help="State to plot.  Defaults to state with max vapor velocity.")
   parser.add_argument('--ch', type=int, action='append', help="""Channel to plot.  Defaults to channel with max vapor velocity.
         Can plot multiple channels (e.g. --ch 1 --ch 2 --ch 3 ...)""")
   parser.add_argument('--figname', type=str, nargs="?", help="Name of figure.  Defaults to name based on location and dataset type.")
   args = parser.parse_args()

   plotter = PlotTools(args.h5name)

   plotter.plotChAxialVvap(args.state, args.ch, args.figname)

if __name__=='__main__':
   main()
+3 −0
Original line number Diff line number Diff line
@@ -10,6 +10,9 @@ setup(name='SubKit',
            'skplot_pin_radial_temp=SubKit.process.plotPinRadialTemp:main',
            'skplot_pin_dnbr=SubKit.process.plotPinDNBR:main',
            'skplot_chan_void=SubKit.process.plotChanVoid:main',
            'skplot_chan_vliq=SubKit.process.plotChanVliq:main',
            'skplot_chan_vvap=SubKit.process.plotChanVvap:main',
            'skplot_chan_vdrp=SubKit.process.plotChanVdrp:main',
            'skplot_chan_quality=SubKit.process.plotChanQuality:main',
            'skplot_chan_temp=SubKit.process.plotChanTemp:main',
            'skplot_pin_coupling_tke=SubKit.process.plotCouplingSurfTKE:main',
Loading