How to use the proteus.TransportCoefficients.TC_base.__init__ function in proteus

To help you get started, we’ve selected a few proteus examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github erdc / proteus / proteus / mprans / VOF3P.py View on Github external
cK=0.0,
                 LUMPED_MASS_MATRIX=False,
                 FCT=True,
                 outputQuantDOFs=False,
                 #NULLSPACE INFO
                 nullSpace='NoNullSpace'):

        self.variableNames = ['vof']
        nc = 1
        mass = {0: {0: 'linear'}}
        advection = {0: {0: 'linear'}}
        hamiltonian = {}
        diffusion = {}
        potential = {}
        reaction = {}
        TC_base.__init__(self,
                         nc,
                         mass,
                         advection,
                         diffusion,
                         potential,
                         reaction,
                         hamiltonian,
                         self.variableNames,
                         movingDomain=movingDomain)        
        self.LS_modelIndex = LS_model
        self.V_model = V_model
        self.RD_modelIndex = RD_model
        self.modelIndex = ME_model
        self.VOS_model=VOS_model
        self.checkMass = checkMass
        self.epsFact = epsFact
github erdc / proteus / proteus / mprans / Pres.py View on Github external
def __init__(self,
                 modelIndex=None,
                 fluidModelIndex=None,
                 pressureIncrementModelIndex=None,
                 useRotationalForm=False,
                 initialize=True):
        """Construct a coefficients object

        :param pressureIncrementModelIndex: The index into the model list
        """
        TC_base.__init__(self,
                         nc=1,
                         variableNames=['p'],
                         reaction={0: {0: 'linear'}},  # = p - p_last - phi
                         advection={0: {0: 'constant'}})  # div  (\mu velocity)
        self.modelIndex = modelIndex
        self.fluidModelIndex = fluidModelIndex
        self.pressureIncrementModelIndex = pressureIncrementModelIndex
        self.useRotationalForm = useRotationalForm
        if initialize:
            self.initialize()
github erdc / proteus / proteus / mprans / RANS3PSed.py View on Github external
1: {1: {1: 'constant'}, 0: {0: 'constant'}}}
            sdInfo = {(0, 0): (np.array([0, 1, 2], dtype='i'),
                               np.array([0, 1], dtype='i')),
                      (0, 1): (np.array([0, 0, 1], dtype='i'),
                               np.array([0], dtype='i')),
                      (1, 1): (np.array([0, 1, 2], dtype='i'),
                               np.array([0, 1], dtype='i')),
                      (1, 0): (np.array([0, 1, 1], dtype='i'),
                               np.array([1], dtype='i'))}
            potential = {0: {0: 'u'},
                         1: {1: 'u'}}
            reaction = {0: {0: 'nonlinear', 1: 'nonlinear'},
                        1: {0: 'nonlinear', 1: 'nonlinear'}}
            hamiltonian = {0: {0: 'linear'},
                           1: {1: 'linear'}}
            TC_base.__init__(self,
                             2,
                             mass,
                             advection,
                             diffusion,
                             potential,
                             reaction,
                             hamiltonian,
                             variableNames,
                             sparseDiffusionTensors=sdInfo,
                             useSparseDiffusion=sd,
                             movingDomain=movingDomain)
            self.vectorComponents = [0, 1]
            self.vectorName = "sediment_velocity"
        elif nd == 3:
            variableNames = ['us', 'vs', 'ws']
            mass = {0: {0: 'linear'},
github erdc / proteus / proteus / mprans / RANS3PSed.py View on Github external
(1, 0): (np.array([0, 1, 1, 1], dtype='i'), np.array([1], dtype='i')),
                      (1, 1): (np.array([0, 1, 2, 3], dtype='i'), np.array([0, 1, 2], dtype='i')),
                      (1, 2): (np.array([0, 0, 0, 1], dtype='i'), np.array([1], dtype='i')),
                      (2, 0): (np.array([0, 1, 1, 1], dtype='i'), np.array([2], dtype='i')),
                      (2, 1): (np.array([0, 0, 1, 1], dtype='i'), np.array([2], dtype='i')),
                      (2, 2): (np.array([0, 1, 2, 3], dtype='i'), np.array([0, 1, 2], dtype='i'))}
            potential = {0: {0: 'u'},
                         1: {1: 'u'},
                         2: {2: 'u'}}
            reaction = {0: {0: 'nonlinear', 1: 'nonlinear', 2: 'nonlinear'},
                        1: {0: 'nonlinear', 1: 'nonlinear', 2: 'nonlinear'},
                        2: {0: 'nonlinear', 1: 'nonlinear', 2: 'nonlinear'}}
            hamiltonian = {0: {0: 'linear'},
                           1: {1: 'linear'},
                           2: {2: 'linear'}}
            TC_base.__init__(self,
                             3,
                             mass,
                             advection,
                             diffusion,
                             potential,
                             reaction,
                             hamiltonian,
                             variableNames,
                             sparseDiffusionTensors=sdInfo,
                             useSparseDiffusion=sd,
                             movingDomain=movingDomain)
            self.vectorComponents = [0, 1, 2]
            self.vectorName = "sediment_velocity"
github erdc / proteus / proteus / mprans / VOF.py View on Github external
def initialize(self):
        nc = 1
        mass = {0: {0: 'linear'}}
        advection = {0: {0: 'linear'}}
        hamiltonian = {}
        diffusion = {}
        potential = {}
        reaction = {}
        TC_base.__init__(self,
                         nc,
                         mass,
                         advection,
                         diffusion,
                         potential,
                         reaction,
                         hamiltonian,
                         self.variableNames,
                         movingDomain=self.movingDomain)
github erdc / proteus / proteus / mprans / PresInit.py View on Github external
def initialize(self):
        if self.nd == 2:
            sdInfo = {(0, 0): (np.array([0, 1, 2], dtype='i'),
                               np.array([0, 1], dtype='i'))}
        else:
            sdInfo = {(0, 0): (np.array([0, 1, 2, 3], dtype='i'),
                               np.array([0, 1, 2], dtype='i'))}
        TC_base.__init__(self,
                         nc=1,
                         variableNames=['pInit'],
                         advection={0: {0: 'constant'}},
                         potential={0: {0: 'u'}},
                         diffusion={0: {0: {0: 'linear'}}},
                         sparseDiffusionTensors=sdInfo,
                         useSparseDiffusion = True)
github erdc / proteus / proteus / mprans / RANS3PF.py View on Github external
(1, 0): (numpy.array([0, 1, 1, 1], dtype='i'), numpy.array([1], dtype='i')),
                        (1, 1): (numpy.array([0, 1, 2, 3], dtype='i'), numpy.array([0, 1, 2], dtype='i')),
                        (1, 2): (numpy.array([0, 0, 0, 1], dtype='i'), numpy.array([1], dtype='i')),
                        (2, 0): (numpy.array([0, 1, 1, 1], dtype='i'), numpy.array([2], dtype='i')),
                        (2, 1): (numpy.array([0, 0, 1, 1], dtype='i'), numpy.array([2], dtype='i')),
                        (2, 2): (numpy.array([0, 1, 2, 3], dtype='i'), numpy.array([0, 1, 2], dtype='i'))}
                potential = {0: {0: 'u'},
                            1: {1: 'u'},
                            2: {2: 'u'}}
                reaction = {0: {0: 'nonlinear', 1: 'nonlinear', 2: 'nonlinear'},
                            1: {0: 'nonlinear', 1: 'nonlinear', 2: 'nonlinear'},
                            2: {0: 'nonlinear', 1: 'nonlinear', 2: 'nonlinear'}}
                hamiltonian = {0: {0: 'linear'},
                            1: {1: 'linear'},
                            2: {2: 'linear'}}
                TC_base.__init__(self,
                                3,
                                mass,
                                advection,
                                diffusion,
                                potential,
                                reaction,
                                hamiltonian,
                                variableNames,
                                sparseDiffusionTensors=sdInfo,
                                useSparseDiffusion=sd,
                                movingDomain=movingDomain)
                self.vectorComponents = [0, 1, 2]
                self.vectorName="velocity"
github erdc / proteus / proteus / mprans / PresInc.py View on Github external
def initialize(self):
        assert(self.nd in [2,3])        
        if self.nd == 2:
            sdInfo = {(0, 0): (np.array([0, 1, 2], dtype='i'),
                               np.array([0, 1], dtype='i'))}
        else:
            sdInfo = {(0, 0): (np.array([0, 1, 2, 3], dtype='i'),
                               np.array([0, 1, 2], dtype='i'))}
        TC_base.__init__(self,
                         nc=1,
                         variableNames=['pInc'],
                         diffusion={0: {0: {0: 'constant'}}},
                         potential={0: {0: 'u'}},
                         advection={0: {0: 'constant'}},
                         sparseDiffusionTensors=sdInfo,
                         useSparseDiffusion=True)
github erdc / proteus / proteus / mprans / NCLS3P.py View on Github external
self.EXPLICIT_METHOD=EXPLICIT_METHOD
        self.outputQuantDOFs=outputQuantDOFs
        self.PURE_BDF=PURE_BDF
        self.movingDomain = movingDomain
        self.useMetrics = useMetrics
        self.epsFact = epsFact
        self.variableNames = ['phi']
        nc = 1
        mass = {0: {0: 'linear'}}
        hamiltonian = {0: {0: 'linear'}}
        advection = {}
        diffusion = {}
        potential = {}
        reaction = {}
        TC_base.__init__(self,
                         nc,
                         mass,
                         advection,
                         diffusion,
                         potential,
                         reaction,
                         hamiltonian,
                         ['phi'],
                         movingDomain=movingDomain)
        self.flowModelIndex = V_model
        self.modelIndex = ME_model
        self.RD_modelIndex = RD_model
        self.checkMass = checkMass
        self.sc_uref = sc_uref
        self.sc_beta = sc_beta
        self.waterline_interval = waterline_interval