Example #1
0
    def __init__(self,
                 args=None,
                 **kwargs):
        description="""\
Generates snapshots of an OpenFOAM-case and a predefined
paraview-State-File using the PV3FoamReader that comes with OpenFOAM.

The state-file can be generated using a different case (the script
adjusts it before using) but the original case has to have a similar
structure to the current one. Also exactly one PV3Reader has to be
used in the state-file (this requirement is fullfilled if the
StateFile was generated using paraFoam)

In TextSources the string "%(casename)s" gets replaced by the
casename. Additional replacements can be specified
"""
        CommonSelectTimesteps.__init__(self)

        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog [options] <case>",
                                   interspersed=True,
                                   nr=1,
                                   **kwargs)
Example #2
0
    def __init__(self,
                 args=None,
                 **kwargs):
        description="""\
Generates snapshots of an OpenFOAM-case and a predefined
paraview-State-File using the PV3FoamReader that comes with OpenFOAM.

The state-file can be generated using a different case (the script
adjusts it before using) but the original case has to have a similar
structure to the current one. Also exactly one PV3Reader has to be
used in the state-file (this requirement is fullfilled if the
StateFile was generated using paraFoam)

In TextSources the string "%(casename)s" gets replaced by the
casename. Additional replacements can be specified
"""
        CommonSelectTimesteps.__init__(self)

        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog [options] <case>",
                                   interspersed=True,
                                   nr=1,
                                   **kwargs)
Example #3
0
    def __init__(self,args=None):
        description="""\
Runs a OpenFoam Utility that only supports being run for one or all
times to be run at multiple selected times
        """
        PyFoamApplication.__init__(self,
                                   exactNr=False,
                                   args=args,
                                   description=description)
Example #4
0
    def __init__(self,args=None):
        description="""\
Reads an XML-file that specifies a base case and a parameter-variation
and executes all the variations of that case
        """
        
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog [options] <xmlfile>",nr=1,interspersed=True)
Example #5
0
    def __init__(self,args=None):
        description="""\
Changes the type of a boundary in the boundary-file
        """
        PyFoamApplication.__init__(self,args=args,
                                   description=description,
                                   usage="%prog <caseDirectory> <boundaryName> <new type>",
                                   changeVersion=False,
                                   nr=3,
                                   interspersed=True)
Example #6
0
    def __init__(self,args=None):
        description="""
Create a Modules modulefile for OpenFOAM. Input parameter 'OpenFOAM configuration file': bashrc or cshrc file for OpenFOAM; usually $WM_PROJECT_DIR/etc/bashrc or $WM_PROJECT_DIR/etc/cshrc. Output parameter 'modulefile': the resulting module file. For more information on Modules,  visit the Environment  Modules Project:  http://http://modules.sourceforge.net
"""
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog OpenFOAM_cfgFile modulefile",
                                   interspersed=True,
                                   changeVersion=False,
                                   nr=2)
    def __init__(self,args=None):
        description="""\
Change GGI boundary condition parameters
"""
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog <caseDirectory> ggiPatchName",
                                   interspersed=True,
                                   changeVersion=False,
                                   nr=2)
Example #8
0
    def __init__(self, args=None):
        description = """\
Change GGI boundary condition parameters
"""
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog <caseDirectory> ggiPatchName",
                                   interspersed=True,
                                   changeVersion=False,
                                   nr=2)
    def __init__(self,args=None):
        description="""
Change MixingPlane boundary condition parameters
"""
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog <caseDirectory>",
                                   interspersed=True,
                                   changeVersion=False,
                                   nr=1)
Example #10
0
    def __init__(self, args=None):
        description = """
Change MixingPlane boundary condition parameters
"""
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog <caseDirectory>",
                                   interspersed=True,
                                   changeVersion=False,
                                   nr=1)
Example #11
0
    def __init__(self,args=None):
        description="""\
Changes the name of a boundary in the boundary-file. Also if a
time-step is specified
        """
        PyFoamApplication.__init__(self,args=args,
                                   description=description,
                                   usage="%prog <caseDirectory> <boundaryName> <new name>",
                                   changeVersion=False,
                                   nr=3,
                                   interspersed=True)
    def __init__(self,args=None):
        description="""
Init MixingPlane boundary condition parameters
"""
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog <caseDirectory> mixingPlane_MasterPatchName mixingPlane_ShadowPatchName",
                                   interspersed=True,
                                   changeVersion=False,
                                   nr=3)
Example #13
0
    def __init__(self,args=None):
        description="""\
Generates a decomposeParDict for a case and runs the decompose-Utility
on that case
"""
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog [options] <case> <procnr>",
                                   interspersed=True,
                                   nr=2)
Example #14
0
    def __init__(self,args=None):
        description="""\
Gets a XML-file that describes how to build a case from a case
template and some parameters
"""
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog <DescriptionFile>",
                                   interspersed=True,
                                   nr=0,
                                   exactNr=False)
Example #15
0
    def __init__(self,args=None):
        description="""\
Runs a command, but first switches the environment to a specific
OpenFOAM-version. Is of use for using wmake for a specific version
        """
        
        PyFoamApplication.__init__(self,
                                   nr=1,
                                   exactNr=False,
                                   args=args,
                                   usage="%prog [options] <command> [arguments]",
                                   description=description)
Example #16
0
    def __init__(self,args=None):
        description="""\
Reads data from the sample-dictionary and generates appropriate
gnuplot-commands
        """
        
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog [options] <casedir>",
                                   nr=1,
                                   interspersed=True)
Example #17
0
    def __init__(self,args=None):
        description="""\
This utility does some basic manipulations with STL-files        
"""
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog <source1.stl> <source2.stl> ...",
                                   interspersed=True,
                                   changeVersion=False,
                                   nr=1,
                                   exactNr=False)
Example #18
0
    def __init__(self,args=None):
        description="""\
Packs a case into a tar-file copying the system, constant and
0-directories.  Excludes all .svn-direcotries and all files ending
with ~
"""
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog <case>",
                                   interspersed=True,
                                   changeVersion=False,
                                   nr=1)
Example #19
0
    def __init__(self,args=None):
        description="""\
Reads data from the sample-dictionary and generates appropriate
gnuplot-commands. As an option the data can be written to a CSV-file.
        """
        
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog [options] <casedir>",
                                   nr=1,
                                   changeVersion=False,
                                   interspersed=True)
Example #20
0
    def __init__(self,args=None):
        description="""\
Reads a Foam-Dictionary and prints it to the screen. Mainly for
reformatting unformated dictionaries and debugging the parser
        """
        
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog [options] <dictfile>",
                                   nr=1,
                                   changeVersion=False,
                                   interspersed=True)
Example #21
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) The Directory PyFoamSolver.analyzed contains
this information: a) Residuals and other information of the linear
solvers b Execution time c) continuity information d) bounding of
variables
        """

        CommonPlotLines.__init__(self)
        PyFoamApplication.__init__(self, exactNr=False, args=args, description=description)
Example #22
0
    def __init__(self, args=None):
        description = """
Init MixingPlane boundary condition parameters
"""
        PyFoamApplication.__init__(
            self,
            args=args,
            description=description,
            usage=
            "%prog <caseDirectory> mixingPlane_MasterPatchName mixingPlane_ShadowPatchName",
            interspersed=True,
            changeVersion=False,
            nr=3)
Example #23
0
    def __init__(self,args=None):
        description="""\
Searches for sampled surface in the VTK-format in a directory and
makes pictures from them
        """
        
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog [options] <casedir>",
                                   nr=1,
                                   changeVersion=False,
                                   interspersed=True)
Example #24
0
    def __init__(self,args=None):
        description="""\
APoMaFoX is "A Poor Mans FoamX".

A small text interface to the CaseBuilder-Functionality
"""
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog <caseBuilderFile>",
                                   interspersed=True,
                                   nr=0,
                                   exactNr=False)
Example #25
0
    def __init__(self,args=None):
        description="""\
Takes a field-file and makes the whole internal field uniform. Either
taking the value from a patch or using a user-specified value
        """
        
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog [options] <fieldfile>",
                                   changeVersion=False,
                                   nr=1,
                                   interspersed=True)
Example #26
0
    def __init__(self,args=None):
        description="""\
Removes all timesteps but the first from a case-directory.  Also
removes other data that is generated by sovers/utilities/PyFoam
"""
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog <caseDirectory>",
                                   interspersed=True,
                                   changeVersion=False,
                                   nr=1,
                                   exactNr=False)
    def __init__(self,args=None):
        description="""
Init GGI boundary condition parameters in boundary file. 
Init GGI boundary fields in time directories.
Generate faceSet scripts for ggi zones.
Modify GGI zones information in decomposeParDict file.
"""
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog <caseDirectory> ggi_MasterPatchName ggi_ShadowPatchName",
                                   interspersed=True,
                                   changeVersion=False,
                                   nr=3)
Example #28
0
    def __init__(self,args=None):
        description="""\
List the valid OpenFOAM-cases in a number of directories along with
some basic information (number of timesteps, last timestep,
etc). Currently doesn't honor the parallel data
"""
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog [<directories>]",
                                   interspersed=True,
                                   changeVersion=False,
                                   nr=0,
                                   exactNr=False)
Example #29
0
    def __init__(self,args=None):
        description="""\
Runs the potentialFoam solver on a case to get a decent initial
condition.

Copies the current fields for U and p to backup-files.
        """

        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog [options] <caseDirectory>",
                                   interspersed=True,
                                   nr=1)
Example #30
0
    def __init__(self,args=None):
        description="""\
Tests what value a section/option pair gives for a specific
OpenFOAM-version

Used to find configuration problems
        """
        
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog [options] <section> <option>",
                                   nr=2,
                                   interspersed=True)
Example #31
0
    def __init__(self,args=None):
        description="""\
Searches a directory for timelines that were generated by some
functionObject and generates the commands to gnuplot it. As an option
the data can be written to a CSV-file.
        """
        
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog [options] <casedir>",
                                   nr=1,
                                   changeVersion=False,
                                   interspersed=True)
Example #32
0
    def __init__(self,args=None):
        description="""\
Takes a field-file. Looks up the polyMesh/boundary-file of the case
and adds the corresponding patches to the boundary field setting it to
zeroGradient for all patches and walls
        """
        
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog [options] <fieldfile>",
                                   changeVersion=False,
                                   nr=1,
                                   interspersed=True)
Example #33
0
    def __init__(self,args=None,inputApp=None):
        description="""\ Reads a file with pickled application data
and if asked for prints it. Mainly used for testing the exchange of
data via pickled data
        """
        
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog [options]",
                                   nr=0,
                                   changeVersion=False,
                                   interspersed=True,
                                   inputApp=inputApp)
Example #34
0
    def __init__(self, args=None):
        description = """\
Join together two or more CSV-files. Data is resampled to fit the
timescale of the the first CSV-file
"""
        PyFoamApplication.__init__(
            self,
            args=args,
            description=description,
            usage="%prog <source1.csv> <source2.csv> ... <dest.csv>",
            interspersed=True,
            changeVersion=False,
            nr=3,
            exactNr=False,
        )
    def __init__(self, args=None):
        description = """
Init GGI boundary condition parameters in boundary file. 
Init GGI boundary fields in time directories.
Generate faceSet scripts for ggi zones.
Modify GGI zones information in decomposeParDict file.
"""
        PyFoamApplication.__init__(
            self,
            args=args,
            description=description,
            usage=
            "%prog <caseDirectory> ggi_MasterPatchName ggi_ShadowPatchName",
            interspersed=True,
            changeVersion=False,
            nr=3)
Example #36
0
    def __init__(self, args=None, **kwargs):
        description = """\
Starts paraview with an OpenFOAM-case and a predefined
paraview-State-File modifieing the state-File in such a way that it is
usable with the case

The state-file can be generated using a different case (the script
adjusts it before using) but the original case has to have a similar
structure to the current one. Also exactly one PV3Reader has to be
used in the state-file (this requirement is fullfilled if the
StateFile was generated using paraFoam)
"""
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog [options] <case>",
                                   interspersed=True,
                                   nr=1,
                                   **kwargs)