Beispiel #1
0
    def _init__fvPatch__DimensionedField_vector_volMesh( self, *args ) :
        if len( args ) != 2 :
            raise AssertionError( "len( args ) != 2" )
        argc = 0

        from Foam.finiteVolume import fvPatch
        try:
            fvPatch.ext_isinstance( args[ argc ] )
        except TypeError:
            raise AssertionError( "args[ argc ].__class__ != fvPatch" )
        p = args[ argc ]; argc += 1
        
        from Foam.finiteVolume import DimensionedField_vector_volMesh
        try:
            DimensionedField_vector_volMesh.ext_isinstance( args[ argc ] )
        except TypeError:
            raise AssertionError( "args[ argc ].__class__ != DimensionedField_Vector_volMesh" )
        iF = args[ argc ]; argc += 1
        
        fixedGradientFvPatchVectorField.__init__( self, p, iF )
        
        from Foam.OpenFOAM import word
        from Foam.OpenFOAM import vectorField, vector, scalarField
        self.UName_ = word( "undefined" )
        self.rheologyName_ = word( "undefined" )
        self.traction_ = vectorField( p.size(), vector.zero)
        self.pressure_ = scalarField(p.size(), 0.0)
                
        return self
    def _init__fvPatch__dictionary(self, *args):
        if len(args) != 2:
            raise AssertionError("len( args ) != 1")
        argc = 0

        from Foam.finiteVolume import fvPatch
        try:
            fvPatch.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError("args[ argc ].__class__ != fvPatch")
        patch = args[argc]
        argc = argc + 1

        from Foam.OpenFOAM import dictionary
        try:
            dictionary.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError("args[ argc ].__class__ != dictionary")
        dict_ = args[argc]

        self.patch_ = patch
        from Foam.OpenFOAM import word
        self.neighbourRegionName_ = word(
            dict_.lookup(word("neighbourRegionName")))
        self.neighbourPatchName_ = word(
            dict_.lookup(word("neighbourPatchName")))
        self.neighbourFieldName_ = word(
            dict_.lookup(word("neighbourFieldName")))
        self.localRegion_ = self.patch_.boundaryMesh().mesh()

        return self
Beispiel #3
0
    def _init__fvPatch__DimensionedField_vector_volMesh(self, *args):
        if len(args) != 2:
            raise AssertionError("len( args ) != 2")
        argc = 0

        from Foam.finiteVolume import fvPatch
        try:
            fvPatch.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError("args[ argc ].__class__ != fvPatch")
        p = args[argc]
        argc += 1

        from Foam.finiteVolume import DimensionedField_vector_volMesh
        try:
            DimensionedField_vector_volMesh.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError(
                "args[ argc ].__class__ != DimensionedField_Vector_volMesh")
        iF = args[argc]
        argc += 1

        fixedGradientFvPatchVectorField.__init__(self, p, iF)

        from Foam.OpenFOAM import word
        from Foam.OpenFOAM import vectorField, vector, scalarField
        self.UName_ = word("undefined")
        self.rheologyName_ = word("undefined")
        self.traction_ = vectorField(p.size(), vector.zero)
        self.pressure_ = scalarField(p.size(), 0.0)

        return self
Beispiel #4
0
    def _init__fvPatch__DimensionedField_scalar_volMesh(self, *args):
        if len(args) != 2:
            raise AssertionError("len( args ) != 2")
        argc = 0

        from Foam.finiteVolume import fvPatch
        try:
            fvPatch.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError("args[ argc ].__class__ != fvPatch")
        p = args[argc]
        argc += 1

        from Foam.finiteVolume import DimensionedField_scalar_volMesh
        try:
            DimensionedField_scalar_volMesh.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError(
                "args[ argc ].__class__ != DimensionedField_scalar_volMesh")
        iF = args[argc]
        argc += 1

        mixedFvPatchScalarField.__init__(self, p, iF)
        self.refValue().ext_assign(0.0)
        self.refGrad().ext_assign(0.0)
        self.valueFraction().ext_assign(0.0)

        return self
Beispiel #5
0
    def _init__fvPatch__DimensionedField_scalar_volMesh__dictionary(
            self, *args):
        if len(args) != 3:
            raise AssertionError("len( args ) != 3")
        argc = 0

        from Foam.finiteVolume import fvPatch
        try:
            fvPatch.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError("args[ argc ].__class__ != fvPatch")
        p = args[argc]
        argc += 1

        from Foam.finiteVolume import DimensionedField_scalar_volMesh
        try:
            DimensionedField_scalar_volMesh.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError(
                "args[ argc ].__class__ != DimensionedField_scalar_volMesh")
        iF = args[argc]
        argc += 1

        from Foam.OpenFOAM import dictionary
        try:
            dictionary.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError("args[ argc ].__class__ != dictionary")
        dict_ = args[argc]

        fixedValueFvPatchScalarField.__init__(self, p, iF, dict_)

        return self
    def _init__fvPatch__DimensionedField_scalar_volMesh(self, *args):
        if len(args) != 2:
            raise AssertionError("len( args ) != 2")
        argc = 0

        from Foam.finiteVolume import fvPatch
        try:
            fvPatch.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError("args[ argc ].__class__ != fvPatch")
        p = args[argc]
        argc += 1

        from Foam.finiteVolume import DimensionedField_scalar_volMesh
        try:
            DimensionedField_scalar_volMesh.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError(
                "args[ argc ].__class__ != DimensionedField_scalar_volMesh")
        iF = args[argc]

        fixedGradientFvPatchScalarField.__init__(self, p, iF)
        from chtMultiRegionFlux.r1_5.coupleManager import coupleManager
        self.coupleManager_ = coupleManager(p)
        self.KName_ = word("undefined-K")

        return self
    def _init__fvPatch__DimensionedField_scalar_volMesh( self, *args ) :
        if len( args ) != 2 :
            raise AssertionError( "len( args ) != 2" )
        argc = 0

        from Foam.finiteVolume import fvPatch
        try:
            fvPatch.ext_isinstance( args[ argc ] )
        except TypeError:
            raise AssertionError( "args[ argc ].__class__ != fvPatch" )
        p = args[ argc ]; argc += 1
        
        from Foam.finiteVolume import DimensionedField_scalar_volMesh
        try:
            DimensionedField_scalar_volMesh.ext_isinstance( args[ argc ] )
        except TypeError:
            raise AssertionError( "args[ argc ].__class__ != DimensionedField_scalar_volMesh" )
        iF = args[ argc ]; argc += 1
        
        mixedFvPatchScalarField.__init__( self, p, iF )
        self.refValue().ext_assign( 0.0 )
        self.refGrad().ext_assign( 0.0 )
        self.valueFraction().ext_assign( 0.0 )
       
        return self
    def _init__fvPatch__DimensionedField_scalar_volMesh( self, *args ):
        if len( args ) != 2 :
            raise AssertionError( "len( args ) != 2" )
        argc = 0

        from Foam.finiteVolume import fvPatch
        try:
            fvPatch.ext_isinstance( args[ argc ] )
        except TypeError:
            raise AssertionError( "args[ argc ].__class__ != fvPatch" )
        p = args[ argc ]; argc += 1
        
        from Foam.finiteVolume import DimensionedField_scalar_volMesh
        try:
            DimensionedField_scalar_volMesh.ext_isinstance( args[ argc ] )
        except TypeError:
            raise AssertionError( "args[ argc ].__class__ != DimensionedField_scalar_volMesh" )
        iF = args[ argc ]
        
        fixedValueFvPatchScalarField.__init__( p, iF )
        from chtMultiRegionFlux.r1_5.coupleManager import coupleManager
        self.coupleManager_ = coupleManager( p )
        self.KName_ = word( "undefined-K" )
        
        return self
Beispiel #9
0
 def _init__self__fvPatch__DimensionedField_scalar_volMesh__fvPatchFieldMapper( self, *args ):
     if len( args ) != 4 :
        raise AssertionError( "len( args ) != 4" )
     argc = 0
    
     if args[ argc ].__class__ != self.__class__ :
        raise AssertionError( "args[ argc ].__class__ != self.__class__" )
     ptf = args[ argc ]; argc += 1
    
     from Foam.finiteVolume import fvPatch        
     try:
         fvPatch.ext_isinstance( args[ argc ] )
     except TypeError:
         raise AssertionError( "args[ argc ].__class__ != fvPatch" )
     p = args[ argc ]; argc += 1
    
     from Foam.finiteVolume import DimensionedField_scalar_volMesh
     try:
         DimensionedField_scalar_volMesh.ext_isinstance( args[ argc ] )
     except TypeError:
        raise AssertionError( "args[ argc ].__class__ != DimensionedField_scalar_volMesh" )
     iF = args[ argc ]; argc += 1
    
     from Foam.finiteVolume import fvPatchFieldMapper
     try:
         fvPatchFieldMapper.ext_isinstance( args[ argc ] )
     except TypeError:
         raise AssertionError( "args[ argc ].__class__ != fvPatchFieldMapper" )
     mapper = args[ argc ]
     
     fixedValueFvPatchScalarField.__init__( self, ptf, p, iF, mapper )
     
     return self
Beispiel #10
0
 def _init__fvPatch__DimensionedField_scalar_volMesh__dictionary( self, *args ):
     if len( args ) != 3 :
        raise AssertionError( "len( args ) != 3" )
     argc = 0
     
     from Foam.finiteVolume import fvPatch        
     try:
         fvPatch.ext_isinstance( args[ argc ] )
     except TypeError:
         raise AssertionError( "args[ argc ].__class__ != fvPatch" )
     p = args[ argc ]; argc += 1
     
     from Foam.finiteVolume import DimensionedField_scalar_volMesh
     try:
         DimensionedField_scalar_volMesh.ext_isinstance( args[ argc ] )
     except TypeError:
         raise AssertionError( "args[ argc ].__class__ != DimensionedField_scalar_volMesh" )
     iF = args[ argc ]; argc += 1
     
     from Foam.OpenFOAM import dictionary
     try:
         dictionary.ext_isinstance( args[ argc ] )
     except TypeError:
         raise AssertionError( "args[ argc ].__class__ != dictionary" )
     dict_ = args[ argc ]
     
     fixedValueFvPatchScalarField.__init__( self, p, iF, dict_ )
     
     return self
 def _init__fvPatch__dictionary( self, *args ):
     if len ( args ) != 2 :
        raise AssertionError( "len( args ) != 1" )
     argc = 0
     
     from Foam.finiteVolume import fvPatch
     try:
         fvPatch.ext_isinstance( args[ argc ] )
     except TypeError:
         raise AssertionError( "args[ argc ].__class__ != fvPatch" )
     patch = args [ argc ]; argc = argc + 1
     
     from Foam.OpenFOAM import dictionary
     try:
         dictionary.ext_isinstance( args[ argc ] )
     except TypeError:
         raise AssertionError( "args[ argc ].__class__ != dictionary" )
     dict_ = args[ argc ]
     
     self.patch_ = patch
     from Foam.OpenFOAM import word
     self.neighbourRegionName_ = word( dict_.lookup( word( "neighbourRegionName" ) ) )
     self.neighbourPatchName_ = word( dict_.lookup( word( "neighbourPatchName" ) ) )
     self.neighbourFieldName_ = word( dict_.lookup( word( "neighbourFieldName" ) ) )
     self.localRegion_ = self.patch_.boundaryMesh().mesh()
     
     return self
 def _init__self__fvPatch__DimensionedField_scalar_volMesh__fvPatchFieldMapper( self, *args ):
     if len( args ) != 4 :
        raise AssertionError( "len( args ) != 4" )
     argc = 0
    
     if args[ argc ].__class__ != self.__class__ :
        raise AssertionError( "args[ argc ].__class__ != self.__class__" )
     ptf = args[ argc ]; argc += 1
    
     from Foam.finiteVolume import fvPatch        
     try:
         fvPatch.ext_isinstance( args[ argc ] )
     except TypeError:
         raise AssertionError( "args[ argc ].__class__ != fvPatch" )
     p = args[ argc ]; argc += 1
    
     from Foam.finiteVolume import DimensionedField_scalar_volMesh
     try:
         DimensionedField_scalar_volMesh.ext_isinstance( args[ argc ] )
     except TypeError:
        raise AssertionError( "args[ argc ].__class__ != DimensionedField_scalar_volMesh" )
     iF = args[ argc ]; argc += 1
    
     from Foam.finiteVolume import fvPatchFieldMapper
     try:
         fvPatchFieldMapper.ext_isinstance( args[ argc ] )
     except TypeError:
         raise AssertionError( "args[ argc ].__class__ != fvPatchFieldMapper" )
     mapper = args[ argc ]
     
     fixedGradientFvPatchScalarField.__init__( self, ptf, p, iF, mapper )
     
     return self
    def _init__fvPatch__DimensionedField_scalar_volMesh( self, *args ) :
        if len( args ) != 2 :
            raise AssertionError( "len( args ) != 2" )
        argc = 0

        from Foam.finiteVolume import fvPatch
        try:
            fvPatch.ext_isinstance( args[ argc ] )
        except TypeError:
            raise AssertionError( "args[ argc ].__class__ != fvPatch" )
        p = args[ argc ]; argc += 1
        
        from Foam.finiteVolume import DimensionedField_scalar_volMesh
        try:
            DimensionedField_scalar_volMesh.ext_isinstance( args[ argc ] )
        except TypeError:
            raise AssertionError( "args[ argc ].__class__ != DimensionedField_scalar_volMesh" )
        iF = args[ argc ]; argc += 1
        
        mixedFvPatchScalarField.__init__( self, p, iF )
        
        from Foam.OpenFOAM import word
        self.neighbourFieldName_ = word( "undefined-neighbourFieldName" ) 
        self.KName_ = word( "undefined-K" )
        
        self.refValue().ext_assign( 0.0 )
        self.refGrad().ext_assign( 0.0 )
        self.valueFraction().ext_assign( 1.0 )
        self.fixesValue_ = True
        
        return self
    def _init__fvPatch__DimensionedField_scalar_volMesh__dictionary(
            self, *args):
        if len(args) != 3:
            raise AssertionError("len( args ) != 3")
        argc = 0

        from Foam.finiteVolume import fvPatch
        try:
            fvPatch.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError("args[ argc ].__class__ != fvPatch")
        p = args[argc]
        argc += 1

        from Foam.finiteVolume import DimensionedField_scalar_volMesh
        try:
            DimensionedField_scalar_volMesh.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError(
                "args[ argc ].__class__ != DimensionedField_scalar_volMesh")
        iF = args[argc]
        argc += 1

        from Foam.OpenFOAM import dictionary
        try:
            dictionary.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError("args[ argc ].__class__ != dictionary")
        dict_ = args[argc]
        argc += 1

        mixedFvPatchScalarField.__init__(self, p, iF)
        from Foam.OpenFOAM import word
        self.neighbourFieldName_ = word(
            dict_.lookup(word("neighbourFieldName")))
        self.KName_ = word(dict_.lookup(word("K")))

        from Foam.finiteVolume import fvPatchScalarField
        from Foam.OpenFOAM import word, scalarField, readBool
        fvPatchScalarField.ext_assign(
            self, scalarField(word("value"), dict_, p.size()))

        if dict_.found(word("refValue")):
            #Full restart
            self.refValue().ext_assign(
                scalarField(word("refValue"), dict_, p.size()))
            self.refGrad().ext_assign(
                scalarField(word("refGradient"), dict_, p.size()))
            self.valueFraction().ext_assign(
                scalarField(word("valueFraction"), dict_, p.size()))
        else:
            # Start from user entered data. Assume fixedValue.
            self.refValue().ext_assign(self)
            self.refGrad().ext_assign(0.0)
            self.valueFraction().ext_assign(1.0)
            pass

        return self
    def _init__fvPatch__DimensionedField_scalar_volMesh__dictionary( self, *args ) :
        if len( args ) != 3 :
            raise AssertionError( "len( args ) != 3" )
        argc = 0
        
        from Foam.finiteVolume import fvPatch        
        try:
            fvPatch.ext_isinstance( args[ argc ] )
        except TypeError:
            raise AssertionError( "args[ argc ].__class__ != fvPatch" )
        p = args[ argc ]; argc += 1
        
        from Foam.finiteVolume import DimensionedField_scalar_volMesh
        try:
            DimensionedField_scalar_volMesh.ext_isinstance( args[ argc ] )
        except TypeError:
            raise AssertionError( "args[ argc ].__class__ != DimensionedField_scalar_volMesh" )
        iF = args[ argc ]; argc += 1
        
        from Foam.OpenFOAM import dictionary
        try:
            dictionary.ext_isinstance( args[ argc ] )
        except TypeError:
            raise AssertionError( "args[ argc ].__class__ != dictionary" )
        dict_ = args[ argc ]; argc += 1
        
        mixedFvPatchScalarField.__init__( self, p, iF )
        from Foam.OpenFOAM import word
        self.neighbourFieldName_ = word( dict_.lookup( word( "neighbourFieldName" ) ) )
        self.KName_ = word( dict_.lookup( word( "K" ) ) )
       
        from Foam.finiteVolume import fvPatchScalarField
        from Foam.OpenFOAM import word, scalarField, readBool
        fvPatchScalarField.ext_assign( self, scalarField( word( "value" ), dict_, p.size() ) )
        
        if dict_.found( word( "refValue" ) ) :
            #Full restart
            self.refValue().ext_assign( scalarField( word( "refValue" ), dict_, p.size() ) )
            self.refGrad().ext_assign( scalarField( word( "refGradient" ), dict_, p.size() ) )
            self.valueFraction().ext_assign( scalarField( word( "valueFraction" ), dict_, p.size() ) )
            self.fixesValue_ = readBool( dict_.lookup( word( "fixesValue" ) ) )
        else:
            # Start from user entered data. Assume fixedValue.
            self.refValue().ext_assign( self )
            self.refGrad().ext_assign( 0.0 )
            self.valueFraction().ext_assign( 1.0 )
            self.fixesValue_ = True
            pass

        return self
    def _init__fvPatch__DimensionedField_scalar_volMesh__dictionary(
            self, *args):
        if len(args) != 3:
            raise AssertionError("len( args ) != 3")
        argc = 0

        from Foam.finiteVolume import fvPatch
        try:
            fvPatch.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError("args[ argc ].__class__ != fvPatch")
        p = args[argc]
        argc += 1

        from Foam.finiteVolume import DimensionedField_scalar_volMesh
        try:
            DimensionedField_scalar_volMesh.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError(
                "args[ argc ].__class__ != DimensionedField_scalar_volMesh")
        iF = args[argc]
        argc += 1

        from Foam.OpenFOAM import dictionary
        try:
            dictionary.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError("args[ argc ].__class__ != dictionary")
        dict_ = args[argc]

        fixedGradientFvPatchScalarField.__init__(self, p, iF)
        from chtMultiRegionFlux.r1_5.coupleManager import coupleManager
        self.coupleManager_ = coupleManager(p, dict_)
        from Foam.OpenFOAM import word
        self.KName_ = word(dict_.lookup(word("K")))

        if dict_.found(word("value")):
            from Foam.finiteVolume import fvPatchScalarField
            from Foam.OpenFOAM import scalarField
            fvPatchScalarField.ext_assign(
                self, scalarField(word("value"), dict_, p.size()))
            pass
        else:
            self.evaluate()
            pass

        return self
Beispiel #17
0
    def _init__self__fvPatch__DimensionedField_vector_volMesh__mapper(
            self, *args):
        if len(args) != 4:
            raise AssertionError("len( args ) != 4")
        argc = 0

        if args[argc].__class__ != self.__class__:
            raise AssertionError("args[ argc ].__class__ != self.__class__")
        tdpvf = args[argc]
        argc += 1

        from Foam.finiteVolume import fvPatch
        try:
            fvPatch.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError("args[ argc ].__class__ != fvPatch")
        p = args[argc]
        argc += 1

        from Foam.finiteVolume import DimensionedField_vector_volMesh
        try:
            DimensionedField_vector_volMesh.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError(
                "args[ argc ].__class__ != DimensionedField_Vector_volMesh")
        iF = args[argc]
        argc += 1

        from Foam.finiteVolume import fvPatchFieldMapper
        try:
            fvPatchFieldMapper.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError(
                "args[ argc ].__class__ != fvPatchFieldMapper")
        mapper = args[argc]
        argc += 1

        fixedGradientFvPatchVectorField.__init__(self, tdpvf, p, iF, mapper)

        from Foam.OpenFOAM import word
        from Foam.OpenFOAM import vectorField, scalarField
        self.UName_ = tdpvf.UName_
        self.rheologyName_ = tdpvf.rheologyName_
        self.traction_ = vectorField(tdpvf.traction_, mapper)
        self.pressure_ = scalarField(tdpvf.pressure_, mapper)

        return self
    def _init__fvPatch__DimensionedField_scalar_volMesh__dictionary(self, *args):
        if len(args) != 3:
            raise AssertionError("len( args ) != 3")
        argc = 0

        from Foam.finiteVolume import fvPatch

        try:
            fvPatch.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError("args[ argc ].__class__ != fvPatch")
        p = args[argc]
        argc += 1

        from Foam.finiteVolume import DimensionedField_scalar_volMesh

        try:
            DimensionedField_scalar_volMesh.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError("args[ argc ].__class__ != DimensionedField_scalar_volMesh")
        iF = args[argc]
        argc += 1

        from Foam.OpenFOAM import dictionary

        try:
            dictionary.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError("args[ argc ].__class__ != dictionary")
        dict_ = args[argc]

        fixedGradientFvPatchScalarField.__init__(self, p, iF)

        if dict_.found(word("gradient")):
            from Foam.OpenFOAM import scalarField

            self.gradient().ext_assign(scalarField(word("gradient"), dict_, p.size()))
            fixedGradientFvPatchScalarField.updateCoeffs(self)
            fixedGradientFvPatchScalarField.evaluate()
            pass
        else:
            self.ext_assign(self.patchInternalField())
            self.gradient().ext_assign(0.0)
            pass

        return self
Beispiel #19
0
    def _init__fvPatch__DimensionedField_vector_volMesh__dictionary(
            self, *args):
        if len(args) != 3:
            raise AssertionError("len( args ) != 3")
        argc = 0

        from Foam.finiteVolume import fvPatch
        try:
            fvPatch.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError("args[ argc ].__class__ != fvPatch")
        p = args[argc]
        argc += 1

        from Foam.finiteVolume import DimensionedField_vector_volMesh
        try:
            DimensionedField_vector_volMesh.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError(
                "args[ argc ].__class__ != DimensionedField_Vector_volMesh")
        iF = args[argc]
        argc += 1

        from Foam.OpenFOAM import dictionary
        try:
            dictionary.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError("args[ argc ].__class__ != dictionary")
        dict_ = args[argc]
        argc += 1

        fixedGradientFvPatchVectorField.__init__(self, p, iF)

        from Foam.OpenFOAM import word
        from Foam.OpenFOAM import vectorField, vector, scalarField
        self.UName_ = word(dict_.lookup(word("U")))
        self.rheologyName_ = word(dict_.lookup(word("rheology")))
        self.traction_ = vectorField(word("traction"), dict_, p.size())
        self.pressure_ = scalarField(word("pressure"), dict_, p.size())

        self.ext_assign(self.patchInternalField())
        self.gradient().ext_assign(vector.zero)

        ext_Info() << "rf: " << self.rheologyName_ << nl

        return self
Beispiel #20
0
    def _init__fvPatch__DimensionedField_scalar_volMesh__dictionary(
            self, *args):
        if len(args) != 3:
            raise AssertionError("len( args ) != 3")
        argc = 0

        from Foam.finiteVolume import fvPatch
        try:
            fvPatch.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError("args[ argc ].__class__ != fvPatch")
        p = args[argc]
        argc += 1

        from Foam.finiteVolume import DimensionedField_scalar_volMesh
        try:
            DimensionedField_scalar_volMesh.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError(
                "args[ argc ].__class__ != DimensionedField_scalar_volMesh")
        iF = args[argc]
        argc += 1

        from Foam.OpenFOAM import dictionary
        try:
            dictionary.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError("args[ argc ].__class__ != dictionary")
        dict_ = args[argc]
        argc += 1

        mixedFvPatchScalarField.__init__(self, p, iF)

        if dict_.found(word("value")):
            self.ext_assign(scalarField(word("value"), dict_, p.size()))
            pass
        else:
            self.ext_assign(self.patchInternalField())
            pass

        self.refValue().ext_assign(self)
        self.refGrad().ext_assign(0.0)
        self.valueFraction().ext_assign(0.0)

        return self
 def _init__fvPatch__DimensionedField_scalar_volMesh__dictionary( self, *args ):
     if len( args ) != 3 :
         raise AssertionError( "len( args ) != 3" )
     argc = 0
     
     from Foam.finiteVolume import fvPatch        
     try:
         fvPatch.ext_isinstance( args[ argc ] )
     except TypeError:
         raise AssertionError( "args[ argc ].__class__ != fvPatch" )
     p = args[ argc ]; argc += 1
     
     from Foam.finiteVolume import DimensionedField_scalar_volMesh
     try:
         DimensionedField_scalar_volMesh.ext_isinstance( args[ argc ] )
     except TypeError:
         raise AssertionError( "args[ argc ].__class__ != DimensionedField_scalar_volMesh" )
     iF = args[ argc ]; argc += 1
     
     from Foam.OpenFOAM import dictionary
     try:
         dictionary.ext_isinstance( args[ argc ] )
     except TypeError:
         raise AssertionError( "args[ argc ].__class__ != dictionary" )
     dict_ = args[ argc ]
     
     fixedValueFvPatchScalarField.__init__( self, p, iF )
     from chtMultiRegionFlux.r1_5.coupleManager import coupleManager
     self.coupleManager_ = coupleManager( p, dict_ )
     from Foam.OpenFOAM import word
     self.KName_ = word( dict_.lookup( word( "K" ) ) )
     
     if dict_.found( word( "value" ) ):
        from Foam.finiteVolume import fvPatchScalarField
        from Foam.OpenFOAM import scalarField
        fvPatchScalarField.ext_assign( self, scalarField( word( "value" ), dict_, p.size() ) )
        pass
     else:
        self.evaluate()
        pass
     
     return self
    def  _init__fvPatch( self, *args ):
        if len ( args) != 1 :
           raise AssertionError( "len( args ) != 1" )
        argc = 0

        from Foam.finiteVolume import fvPatch
        try:
            fvPatch.ext_isinstance( args[ argc ] )
        except TypeError:
            raise AssertionError( "args[ argc ].__class__ != fvPatch" )
        patch = args[ argc ]
        
        self.patch_ = patch
        from Foam.OpenFOAM import word
        self.neighbourRegionName_ = word( "undefined-neighbourRegionName" )
        self.neighbourPatchName_ = word( "undefined-neighbourPatchName" )
        self.neighbourFieldName_ = word( "undefined-neighbourFieldName" )
        self.localRegion_ = self.patch_.boundaryMesh().mesh()
        
        return self
    def _init__fvPatch(self, *args):
        if len(args) != 1:
            raise AssertionError("len( args ) != 1")
        argc = 0

        from Foam.finiteVolume import fvPatch
        try:
            fvPatch.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError("args[ argc ].__class__ != fvPatch")
        patch = args[argc]

        self.patch_ = patch
        from Foam.OpenFOAM import word
        self.neighbourRegionName_ = word("undefined-neighbourRegionName")
        self.neighbourPatchName_ = word("undefined-neighbourPatchName")
        self.neighbourFieldName_ = word("undefined-neighbourFieldName")
        self.localRegion_ = self.patch_.boundaryMesh().mesh()

        return self
Beispiel #24
0
    def _init__fvPatch__DimensionedField_vector_volMesh__dictionary( self, *args ) :
        if len( args ) != 3 :
            raise AssertionError( "len( args ) != 3" )
        argc = 0
        
        from Foam.finiteVolume import fvPatch
        try:
            fvPatch.ext_isinstance( args[ argc ] )
        except TypeError:
            raise AssertionError( "args[ argc ].__class__ != fvPatch" )
        p = args[ argc ]; argc += 1

        from Foam.finiteVolume import DimensionedField_vector_volMesh
        try:
            DimensionedField_vector_volMesh.ext_isinstance( args[ argc ] )
        except TypeError:
            raise AssertionError( "args[ argc ].__class__ != DimensionedField_Vector_volMesh" )
        iF = args[ argc ]; argc += 1
        
        from Foam.OpenFOAM import dictionary
        try:
            dictionary.ext_isinstance( args[ argc ] )
        except TypeError:
            raise AssertionError( "args[ argc ].__class__ != dictionary" )
        dict_ = args[ argc ]; argc += 1

        fixedGradientFvPatchVectorField.__init__( self, p, iF )
       
        from Foam.OpenFOAM import word
        from Foam.OpenFOAM import vectorField, vector, scalarField
        self.UName_ = word( dict_.lookup( word( "U" ) ) )
        self.rheologyName_ = word( dict_.lookup( word( "rheology" ) ) )
        self.traction_ = vectorField( word( "traction" ) , dict_, p.size() )
        self.pressure_ = scalarField( word( "pressure" ), dict_, p.size() )
        
        self.ext_assign( self.patchInternalField() )
        self.gradient().ext_assign( vector.zero )
        
        ext_Info() << "rf: " << self.rheologyName_ << nl
        
        return self
    def _init__self__fvPatch__DimensionedField_scalar_volMesh__fvPatchFieldMapper(
            self, *args):
        if len(args) != 3:
            raise AssertionError("len( args ) != 3")
        argc = 0

        if args[argc].__class__ != self.__class__:
            raise AssertionError("args[ argc ].__class__ != self.__class__")
        ptf = args[argc]
        argc += 1

        from Foam.finiteVolume import fvPatch
        try:
            fvPatch.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError("args[ argc ].__class__ != fvPatch")
        p = args[argc]
        argc += 1

        from Foam.finiteVolume import DimensionedField_scalar_volMesh
        try:
            DimensionedField_scalar_volMesh.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError(
                "args[ argc ].__class__ != DimensionedField_scalar_volMesh")
        iF = args[argc]
        argc += 1
        print "in the constructor's"
        from Foam.finiteVolume import fvPatchFieldMapper
        try:
            fvPatchFieldMapper.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError(
                "args[ argc ].__class__ != fvPatchFieldMapper")
        mapper = args[argc]

        fixedValueFvPatchScalarField.__init__(self, ptf, p, iF, mapper)
        self.coupleManager_ = ptf.coupleManager_
        self.KName_ = ptf.KName_

        return self
 def _init__fvPatch__DimensionedField_scalar_volMesh( self, *args ):
     if len( args ) != 2 :
         raise AssertionError( "len( args ) != 2" )
     argc = 0
     
     from Foam.finiteVolume import fvPatch
     try:
         fvPatch.ext_isinstance( args[ argc ] )
     except TypeError:
         raise AssertionError( "args[ argc ].__class__ != fvPatch" )
     p = args[ argc ]; argc += 1    
     
     from Foam.finiteVolume import DimensionedField_scalar_volMesh
     try:
         DimensionedField_scalar_volMesh.ext_isinstance( args[ argc ] )
     except TypeError:
         raise AssertionError( "args[ argc ].__class__ != DimensionedField_scalar_volMesh" )
     iF = args[ argc ]
     fixedGradientFvPatchScalarField.__init__( self, p, iF )
     
     return self
    def _init__fvPatch__DimensionedField_scalar_volMesh__dictionary( self, *args ):
        if len( args ) != 3 :
           raise AssertionError( "len( args ) != 3" )
        argc = 0
        
        from Foam.finiteVolume import fvPatch        
        try:
            fvPatch.ext_isinstance( args[ argc ] )
        except TypeError:
            raise AssertionError( "args[ argc ].__class__ != fvPatch" )
        p = args[ argc ]; argc += 1
        
        from Foam.finiteVolume import DimensionedField_scalar_volMesh
        try:
            DimensionedField_scalar_volMesh.ext_isinstance( args[ argc ] )
        except TypeError:
            raise AssertionError( "args[ argc ].__class__ != DimensionedField_scalar_volMesh" )
        iF = args[ argc ]; argc += 1
        
        from Foam.OpenFOAM import dictionary
        try:
            dictionary.ext_isinstance( args[ argc ] )
        except TypeError:
            raise AssertionError( "args[ argc ].__class__ != dictionary" )
        dict_ = args[ argc ]
        
        fixedGradientFvPatchScalarField.__init__( self, p, iF )
        
        if dict_.found( word( "gradient" ) ):
           from Foam.OpenFOAM import scalarField
           self.gradient().ext_assign( scalarField( word( "gradient" ) , dict_, p.size() ) )
           fixedGradientFvPatchScalarField.updateCoeffs( self )
           fixedGradientFvPatchScalarField.evaluate()
           pass
        else:
           self.ext_assign( self.patchInternalField() )
           self.gradient().ext_assign( 0.0 )
           pass

        return self
Beispiel #28
0
    def _init__self__fvPatch__DimensionedField_vector_volMesh__mapper( self, *args ) :
        if len( args ) != 4 :
            raise AssertionError( "len( args ) != 4" )
        argc = 0
        
        if args[ argc ].__class__ != self.__class__ :
            raise AssertionError( "args[ argc ].__class__ != self.__class__" )
        tdpvf = args[ argc ]; argc += 1
        
        from Foam.finiteVolume import fvPatch
        try:
            fvPatch.ext_isinstance( args[ argc ] )
        except TypeError:
            raise AssertionError( "args[ argc ].__class__ != fvPatch" )
        p = args[ argc ]; argc += 1

        from Foam.finiteVolume import DimensionedField_vector_volMesh
        try:
            DimensionedField_vector_volMesh.ext_isinstance( args[ argc ] )
        except TypeError:
            raise AssertionError( "args[ argc ].__class__ != DimensionedField_Vector_volMesh" )
        iF = args[ argc ]; argc += 1
        
        from Foam.finiteVolume import fvPatchFieldMapper
        try:
            fvPatchFieldMapper.ext_isinstance( args[ argc ] )
        except TypeError:
            raise AssertionError( "args[ argc ].__class__ != fvPatchFieldMapper" )
        mapper = args[ argc ]; argc += 1
        
        fixedGradientFvPatchVectorField.__init__( self, tdpvf, p, iF, mapper )
        
        from Foam.OpenFOAM import word
        from Foam.OpenFOAM import vectorField, scalarField
        self.UName_ = tdpvf.UName_
        self.rheologyName_ = tdpvf.rheologyName_
        self.traction_ = vectorField( tdpvf.traction_ , mapper )
        self.pressure_ = scalarField( tdpvf.pressure_ , mapper )
        
        return self
    def _init__fvPatch__DimensionedField_scalar_volMesh__dictionary( self, *args ) :
        if len( args ) != 3 :
            raise AssertionError( "len( args ) != 3" )
        argc = 0
        
        from Foam.finiteVolume import fvPatch        
        try:
            fvPatch.ext_isinstance( args[ argc ] )
        except TypeError:
            raise AssertionError( "args[ argc ].__class__ != fvPatch" )
        p = args[ argc ]; argc += 1
        
        from Foam.finiteVolume import DimensionedField_scalar_volMesh
        try:
            DimensionedField_scalar_volMesh.ext_isinstance( args[ argc ] )
        except TypeError:
            raise AssertionError( "args[ argc ].__class__ != DimensionedField_scalar_volMesh" )
        iF = args[ argc ]; argc += 1
        
        from Foam.OpenFOAM import dictionary
        try:
            dictionary.ext_isinstance( args[ argc ] )
        except TypeError:
            raise AssertionError( "args[ argc ].__class__ != dictionary" )
        dict_ = args[ argc ]; argc += 1
        
        mixedFvPatchScalarField.__init__( self, p, iF )
        
        if dict_.found( word( "value" ) ):
           self.ext_assign( scalarField( word( "value" ), dict_, p.size() ) )
           pass
        else:
           self.ext_assign( self.patchInternalField() )
           pass
        
        self.refValue().ext_assign( self )
        self.refGrad().ext_assign( 0.0 )
        self.valueFraction().ext_assign( 0.0 )

        return self
    def _init__fvPatch__DimensionedField_scalar_volMesh(self, *args):
        if len(args) != 2:
            raise AssertionError("len( args ) != 2")
        argc = 0

        from Foam.finiteVolume import fvPatch

        try:
            fvPatch.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError("args[ argc ].__class__ != fvPatch")
        p = args[argc]
        argc += 1

        from Foam.finiteVolume import DimensionedField_scalar_volMesh

        try:
            DimensionedField_scalar_volMesh.ext_isinstance(args[argc])
        except TypeError:
            raise AssertionError("args[ argc ].__class__ != DimensionedField_scalar_volMesh")
        iF = args[argc]
        fixedGradientFvPatchScalarField.__init__(self, p, iF)

        return self