Пример #1
0
LevelModelType = NCLS3P.LevelModel

if ct.sedimentDynamics:
    LS_model=2
    RD_model=3
    V_model=6
else:
    LS_model=1
    RD_model=2
    V_model=4

coefficients = NCLS3P.Coefficients(V_model=V_model,
                                   RD_model=RD_model,
                                   ME_model=LS_model,
                                   checkMass=False,
                                   useMetrics=ct.useMetrics,
                                   epsFact=ct.epsFact_consrv_heaviside,
                                   sc_uref=ct.ls_sc_uref,
                                   sc_beta=ct.ls_sc_beta,
                                   movingDomain=ct.movingDomain)

dirichletConditions = {0: lambda x, flag: None}

advectiveFluxBoundaryConditions = {}

diffusiveFluxBoundaryConditions = {0: {}}

class PHI_IC:
    def uOfXT(self, x, t):
        return x[nd-1] - ct.waterLevel
Пример #2
0
# mesh options
nLevels = ct.nLevels
parallelPartitioningType = mesh.parallelPartitioningType
nLayersOfOverlapForParallel = mesh.nLayersOfOverlapForParallel
restrictFineSolutionToAllMeshes = mesh.restrictFineSolutionToAllMeshes
triangleOptions = mesh.triangleOptions

elementQuadrature = ct.elementQuadrature
elementBoundaryQuadrature = ct.elementBoundaryQuadrature

femSpaces = {0: ct.basis}

massLumping = False
conservativeFlux = None
numericalFluxType = NCLS3P.NumericalFlux
subgridError = NCLS3P.SubgridError(coefficients, nd)
shockCapturing = NCLS3P.ShockCapturing(
    coefficients,
    nd,
    shockCapturingFactor=ct.ls_shockCapturingFactor,
    lag=ct.ls_lag_shockCapturing)

fullNewtonFlag = True
multilevelNonlinearSolver = NonlinearSolvers.Newton
levelNonlinearSolver = NonlinearSolvers.Newton

nonlinearSmoother = None
linearSmoother = None

matrix = LinearAlgebraTools.SparseMatrix
Пример #3
0
from __future__ import absolute_import
from builtins import object
from proteus import *
from proteus.default_p import *
from .multiphase import *
from proteus.mprans import NCLS3P

LevelModelType = NCLS3P.LevelModel
coefficients = NCLS3P.Coefficients(V_model=V_model,
                                   RD_model=RD_model,
                                   ME_model=LS_model,
                                   checkMass=False,
                                   useMetrics=useMetrics,
                                   epsFact=epsFact_consrv_heaviside,
                                   sc_uref=ls_sc_uref,
                                   sc_beta=ls_sc_beta,
                                   movingDomain=movingDomain,
                                   EXPLICIT_METHOD=EXPLICIT_NCLS,
                                   outputQuantDOFs=True)


def getDBC_ls(x, flag):
    return None


dirichletConditions = {0: getDBC_ls}

advectiveFluxBoundaryConditions = {}
diffusiveFluxBoundaryConditions = {0: {}}

Пример #4
0
from proteus import *
from proteus.default_p import *
from risingBubble import *
from proteus.mprans import NCLS3P

LevelModelType = NCLS3P.LevelModel
coefficients = NCLS3P.Coefficients(V_model=V_model,
                                   RD_model=RD_model,
                                   ME_model=LS_model,
                                   checkMass=False,
                                   useMetrics=useMetrics,
                                   epsFact=epsFact_consrv_heaviside,
                                   sc_uref=ls_sc_uref,
                                   sc_beta=ls_sc_beta,
                                   movingDomain=movingDomain,
                                   PURE_BDF=PURE_BDF_NCLS)


def getDBC_ls(x, flag):
    return None


dirichletConditions = {0: getDBC_ls}

advectiveFluxBoundaryConditions = {}
diffusiveFluxBoundaryConditions = {0: {}}


class PHI_IC:
    def uOfXT(self, x, t):
        return signedDistanceToBubble(x)