Пример #1
0
 def __init__(self):
     description = """Starts the MetaServer"""
     PyFoamApplication.__init__(self,
                                description=description,
                                usage="%prog",
                                interspersed=True,
                                nr=0)
    def __init__(self,
                args=None,
                 **kwargs):
        description="""\
This utility extrudes  2D blockMeshDict to 3DblockMeshDict appropriate for OpenFOAM blockMesh utility. Application requires a blockMesh2D file representing
        the two dimensional domain and converts it to 3D domain by extruding or rotating the domain.
                """
        examples="""\
%prog blockMeshDict2D --extrude --distance-front=0.2 --distance-back=0.2 --division=10

  Extrudes the 2D-mesh by 0.5 on both sides (with 10 divisions) and writes it to blockMeshDict

%prog blockMeshDict2D --y-rotate --angle-front=5 --angle-back=5  --print

  Rotates around the y-axis with and angle of 5 degree on both sides and prints the result to the console
"""
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   examples=examples,
                                   usage="%prog <blockMeshDict2D>",
                                   changeVersion=False,
                                   nr=1,
                                   interspersed=True,
                                   subcommands=False,
                                   **kwargs)
Пример #3
0
    def __init__(self,args=None):
        description="""\
Clone an Eulerian case. The directories 'domain' and
'lagrangian.org' are copied. The shell scripts to run the simulation
are also copied.\n
\n
Most files are copied using symlinks. The following\n
files are replaced by a copy of the original.\n
\n
domain/0.org\n
lagrangian.org/0.org\n
domain/system/controlDict\n
domain/system/fvSchemes\n
domain/system/fvSolution\n
domain/constant/polyMesh/blockMeshDict\n
domain/constant/polyMesh/blockMeshDict\n
config_vars\n
geometricData\n
initialConditions\n
simParams.json\n
.gitignore"""
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog [options] <source caseDirectory> <destination caseDirectory>",
                                   interspersed=True,
                                   changeVersion=False,
                                   nr=2)
Пример #4
0
    def __init__(self):
        description="""\
Lists all the processes known to a meta-server
        """
        self.defaultHost=config().get("Metaserver","ip")
        self.defaultPort=config().getint("Metaserver","port")

        PyFoamApplication.__init__(self,description=description,usage="%prog [options]",interspersed=True,nr=0)
Пример #5
0
    def __init__(self):
        description = """\
Lists all the processes known to a meta-server
        """
        self.defaultHost = config().get("Metaserver", "ip")
        self.defaultPort = config().getint("Metaserver", "port")

        PyFoamApplication.__init__(self, description=description, usage="%prog [options]", interspersed=True, nr=0)
Пример #6
0
    def __init__(self):
        description = """\
Connects to a running pyFoam-Server and executes commands via remote
procedure calls
        """
        PyFoamApplication.__init__(self,
                                   description=description,
                                   usage="%prog <host> <port>",
                                   interspersed=True,
                                   nr=2)
    def __init__(self,args=None):
        description="""
Change MixingPlane boundary condition parameters
"""
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog <caseDirectory> mixingPlanePatchName",
                                   interspersed=True,
                                   changeVersion=False,
                                   nr=2)
Пример #8
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)
Пример #9
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)
Пример #10
0
    def __init__(self):
        description="""\
Either connects to a running pyFoam-Server and gets all the
information for plotting or reads the relevant data from a pickle file
and either displays the plot or writes the plots to file
        """
        PyFoamApplication.__init__(self,
                                   description=description,
                                   usage="%prog [options] (<host> <port>|<pickleFile>)",
                                   interspersed=True,
                                   nr=1,
                                   exactNr=False)
Пример #11
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)
Пример #12
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)
Пример #13
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)
Пример #14
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)
Пример #15
0
    def __init__(self):
        description="""\
Reads the contents of a blockMeshDict-file and displays the vertices
as spheres (with numbers). The blocks are sketched by lines. One block
can be seceted with a slider. It will be displayed as a green cube
with the local directions x1,x2 and x3. Also a patch that is selected
by a slider will be sketched by blue squares.  This implementation
uses Tkinter and is no longer activly developed.  Use the QT-version.
        """
        PyFoamApplication.__init__(self,
                                   description=description,
                                   usage="%prog [options] <blockMeshDict>",
                                   interspersed=True,
                                   nr=1)
Пример #16
0
    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)
Пример #17
0
    def __init__(self, args=None, **kwargs):

        description = """
            Some description needed
            """
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   usage="%prog [<directories>]",
                                   interspersed=True,
                                   changeVersion=False,
                                   nr=0,
                                   exactNr=False,
                                   **kwargs)
Пример #18
0
    def __init__(self, args=None, **kwargs):
        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,
            **kwargs)
Пример #19
0
    def __init__(self, args=None):
        description = """
Clone an graph case in the CBF framework. The directories 'domain'
'RBC' and 'RBCSource' are copied. The shell scripts to run the simulation
are also copied.\n
Files can be copied using symlinks.
"""
        PyFoamApplication.__init__(
            self,
            args=args,
            description=description,
            usage=
            "%prog [options] <source caseDirectory> <destination caseDirectory>",
            interspersed=True,
            changeVersion=False,
            nr=2)
Пример #20
0
    def __init__(self, args=None):
        description = """\
Copies the contents of the last time-step of the source case to the
first time-step of the destination case (thus using it as initial
conditions). 

Additionally, copies the Lagrangian meshes and the RBC meshes of the 
source directory to the destination case."""
        PyFoamApplication.__init__(
            self,
            args=args,
            description=description,
            usage=
            "%prog [options] <source caseDirectory> <destination caseDirectory>",
            interspersed=True,
            changeVersion=False,
            nr=2)
Пример #21
0
    def __init__(self, args=None, **kwargs):
        description = """\
Either connects to a running pyFoam-Server and gets all the
information for plotting or reads the relevant data from a pickle file
and either displays the plot or writes the plots to file
        """
        if args:
            self.quiet = True
        else:
            self.quiet = False

        PyFoamApplication.__init__(
            self,
            args=args,
            description=description,
            usage="%prog [options] (<host> <port>|<pickleFile>)",
            interspersed=True,
            nr=1,
            exactNr=False,
            **kwargs)
    def __init__(self, args=None, **kwargs):
        description = """\
This utility extrudes  2D blockMeshDict to 3DblockMeshDict appropriate for OpenFOAM blockMesh utility. Application requires a blockMesh2D file representing
        the two dimensional domain and converts it to 3D domain by extruding or rotating the domain.
                """
        examples = """\
%prog blockMeshDict2D --extrude --distance-front=0.2 --distance-back=0.2 --division=10

  Extrudes the 2D-mesh by 0.5 on both sides (with 10 divisions) and writes it to blockMeshDict

%prog blockMeshDict2D --y-rotate --angle-front=5 --angle-back=5  --print

  Rotates around the y-axis with and angle of 5 degree on both sides and prints the result to the console
"""
        PyFoamApplication.__init__(self,
                                   args=args,
                                   description=description,
                                   examples=examples,
                                   usage="%prog <blockMeshDict2D>",
                                   changeVersion=False,
                                   nr=1,
                                   interspersed=True,
                                   subcommands=False,
                                   **kwargs)
Пример #23
0
 def __init__(self):
     description = """Starts the MetaServer"""
     PyFoamApplication.__init__(self, description=description, usage="%prog", interspersed=True, nr=0)
Пример #24
0
    def __init__(self):
        description="""\
Connects to a running pyFoam-Server and executes commands via remote
procedure calls
        """
        PyFoamApplication.__init__(self,description=description,usage="%prog <host> <port>",interspersed=True,nr=2)