Example #1
0
    def __init__(self,args=None):
        description="""\
Runs an OpenFoam solver needs the usual 3 arguments (<solver>
<directory> <case>) and passes them on (plus additional arguments).
Output is sent to stdout and a logfile inside the case directory
(PyFoamSolver.logfile) Information about the residuals is output as
graphs
        
If the directory contains a file customRegexp this is automatically
read and the regular expressions in it are displayed
        """
        CommonPlotOptions.__init__(self,persist=True)
        CommonPlotLines.__init__(self)
        PyFoamApplication.__init__(self,
                                   exactNr=False,
                                   args=args,
                                   description=description)
Example #2
0
    def __init__(self,args=None):
        description="""\
Gets the name of a logfile which is assumed to be the output of a
OpenFOAM-solver. Parses the logfile for information about the
convergence of the solver and generates gnuplot-graphs. Watches the
file until interrupted.
        """

        CommonPlotOptions.__init__(self,persist=False)
        CommonPlotLines.__init__(self)
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog [options] <logfile>",
                                   changeVersion=False,
                                   interspersed=True,
                                   nr=1)
Example #3
0
    def addOptions(self):
        CommonClearCase.addOptions(self)

        CommonPlotOptions.addOptions(self)
        
        self.parser.add_option("--steady-run",
                               action="store_true",
                               default=False,
                               dest="steady",
                               help="This is a steady run. Stop it after convergence")
        
        CommonReportUsage.addOptions(self)
        CommonReportRunnerData.addOptions(self)
        CommonStandardOutput.addOptions(self)
        CommonParallel.addOptions(self)
        CommonRestart.addOptions(self)
        CommonPlotLines.addOptions(self)
        CommonSafeTrigger.addOptions(self)
        CommonWriteAllTrigger.addOptions(self)
        CommonLibFunctionTrigger.addOptions(self)
        CommonServer.addOptions(self)
        CommonVCSCommit.addOptions(self)
Example #4
0
    def addOptions(self):
        CommonPlotOptions.addOptions(self)

        input=OptionGroup(self.parser,
                           "Input",
                           "Specifics of the input")
        self.parser.add_option_group(input)
        
        input.add_option("--solver-not-running-anymore",
                          action="store_true",
                          dest="solverNotRunning",
                          default=False,
                          help="It makes no sense to wait for further output, because the solver is not running anymore. Watcher ends as soon as he encounters the end of the file. Only makes sense with --persist or --hardcopy")

        output=OptionGroup(self.parser,
                           "Output",
                           "What should be output to the terminal")
        self.parser.add_option_group(output)
        
        output.add_option("--tail",
                          type="long",
                          dest="tail",
                          default=5000L,
                          help="The length at the end of the file that should be output (in bytes. Default: %default)")
        output.add_option("--silent",
                          action="store_true",
                          dest="silent",
                          default=False,
                          help="Logfile is not copied to the terminal")
        output.add_option("--progress",
                          action="store_true",
                          default=False,
                          dest="progress",
                          help="Only prints the progress of the simulation, but swallows all the other output")
        output.add_option("--replot-frequency",
                          action="store",
                          default=10,
                          type="float",
                          dest="replotFrequency",
                          help="If the tail of the file is not yet reached, how often the data should be plotted: Default: %default")

        limit=OptionGroup(self.parser,
                          "Limits",
                          "Where the plots should start and end")
        self.parser.add_option_group(limit)
        
        limit.add_option("--start",
                         action="store",
                         type="float",
                         default=None,
                         dest="start",
                         help="Start time starting from which the data should be plotted. If undefined the initial time is used")

        limit.add_option("--end",
                         action="store",
                         type="float",
                         default=None,
                         dest="end",
                         help="End time until which the data should be plotted. If undefined it is plotted till the end")

        CommonPlotLines.addOptions(self)