예제 #1
0
    LevelModelType = NCLS.LevelModel  #NCLSV2.OneLevelNCLSV2
"""
The non-conservative level set description of the free surface of a sloshing two-phase flow in a closed box.
"""
##

##\ingroup test
#\file ls_so_sloshbox_3d_p.py
#
#\brief The non-conservative level set description of the free surface of a sloshing two-phase flow in a closed box.
#
#\todo finish ls_so_sloshbox_3d_p.py doc

if applyCorrection:
    coefficients = NCLS.Coefficients(V_model=0,
                                     RD_model=3,
                                     ME_model=1,
                                     checkMass=False)
elif applyRedistancing:
    coefficients = NCLS.Coefficients(V_model=0,
                                     RD_model=2,
                                     ME_model=1,
                                     checkMass=False)
else:
    coefficients = NCLS.Coefficients(V_model=0, ME_model=1, checkMass=False)


def getDBC_ls(x, flag):
    pass


dirichletConditions = {0: getDBC_ls}
예제 #2
0
from proteus import *
from proteus.default_p import *
from tank import *
from proteus.mprans import NCLS

LevelModelType = NCLS.LevelModel

coefficients = NCLS.Coefficients(V_model=0,RD_model=3,ME_model=2,
                                 checkMass=False, useMetrics=useMetrics,
                                 epsFact=epsFact_consrv_heaviside,sc_uref=ls_sc_uref,sc_beta=ls_sc_beta)

def getDBC_ls(x,flag):
    return None

dirichletConditions = {0:getDBC_ls}

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

class PerturbedSurface_phi:
    def uOfXT(self,x,t):
        return signedDistance(x)

initialConditions  = {0:PerturbedSurface_phi()}
예제 #3
0
from proteus import *
from proteus.default_p import *
from floating_bar import *
from proteus.mprans import NCLS
from proteus import Context
ct = Context.get()

LevelModelType = NCLS.LevelModel

coefficients = NCLS.Coefficients(V_model=int(ct.movingDomain) + 0,
                                 RD_model=int(ct.movingDomain) + 3,
                                 ME_model=int(ct.movingDomain) + 2,
                                 checkMass=False,
                                 useMetrics=useMetrics,
                                 epsFact=epsFact_consrv_heaviside,
                                 sc_uref=ls_sc_uref,
                                 sc_beta=ls_sc_beta,
                                 movingDomain=ct.movingDomain)


def getDBC_ls(x, flag):
    if flag in [ct.boundaryTags['left'], ct.boundaryTags['right']]:
        if ct.speed > 0.0:
            return lambda x, t: x[2] - waterLevel


dirichletConditions = {0: getDBC_ls}

advectiveFluxBoundaryConditions = {}
diffusiveFluxBoundaryConditions = {0: {}}
from proteus import *
from proteus.default_p import *
from obstacleInTank3d import *
from proteus.mprans import NCLS

LevelModelType = NCLS.LevelModel

coefficients = NCLS.Coefficients(V_model=0,
                                 RD_model=3,
                                 ME_model=1,
                                 checkMass=False,
                                 useMetrics=useMetrics)


def getDBC_ls(x, flag):
    pass


dirichletConditions = {0: getDBC_ls}


class Shock_phi:
    def uOfXT(self, x, t):
        return shockSignedDistance(x)


initialConditions = {0: Shock_phi()}

fluxBoundaryConditions = {0: 'outFlow'}

advectiveFluxBoundaryConditions = {}
예제 #5
0
파일: ls_p.py 프로젝트: zhishang80/proteus
from __future__ import absolute_import
from builtins import object
from proteus.default_p import *
from proteus.mprans import NCLS
from .multiphase import *

LevelModelType = NCLS.LevelModel
coefficients = NCLS.Coefficients(V_model=int(movingDomain) + 0,
                                 RD_model=int(movingDomain) + 3,
                                 ME_model=int(movingDomain) + 2,
                                 checkMass=False,
                                 useMetrics=useMetrics,
                                 epsFact=ecH,
                                 sc_uref=ls_sc_uref,
                                 sc_beta=ls_sc_beta,
                                 movingDomain=movingDomain)

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


class PerturbedSurface_phi(object):
    def uOfXT(self, x, t):
        return signedDistance(x)


initialConditions = {0: PerturbedSurface_phi()}
예제 #6
0
ct = Context.get()
domain = ct.domain
nd = domain.nd
mesh = domain.MeshOptions

genMesh = mesh.genMesh
movingDomain = ct.movingDomain
T = ct.T

LevelModelType = NCLS.LevelModel

coefficients = NCLS.Coefficients(V_model=0,
                                 RD_model=3,
                                 ME_model=2,
                                 checkMass=False,
                                 useMetrics=ct.useMetrics,
                                 epsFact=ct.ecH,
                                 sc_uref=ct.ls_sc_uref,
                                 sc_beta=ct.ls_sc_beta,
                                 movingDomain=ct.movingDomain)

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


class PerturbedSurface_phi:
    def uOfXT(self, x, t):
        return ct.signedDistance(x)

예제 #7
0
from proteus import *
from proteus.default_p import *
from wigley import *
from proteus.mprans import NCLS

LevelModelType = NCLS.LevelModel

coefficients = NCLS.Coefficients(V_model=0,
                                 RD_model=3,
                                 ME_model=1,
                                 checkMass=checkMass,
                                 useMetrics=useMetrics,
                                 sc_uref=ls_sc_uref,
                                 sc_beta=ls_sc_beta)
#coefficients = NCLevelSetCoefficients(V_model=0,ME_model=1)


class Flat_phi:
    def __init__(self, waterLevel):
        self.waterLevel = waterLevel

    def uOfXT(self, x, t):
        signedDistance = x[2] - self.waterLevel
        return signedDistance


analyticalSolutions = None


def getDBC_ls(x, flag):
    def ls(x, t):
예제 #8
0
from proteus import *
from proteus.default_p import *
from sloshbox3d import *
from proteus.mprans import NCLS

LevelModelType = NCLS.LevelModel

if applyCorrection:
    coefficients = NCLS.Coefficients(V_model=0,
                                     RD_model=3,
                                     ME_model=1,
                                     epsFact=epsFact_consrv_heaviside,
                                     checkMass=checkMass)
elif applyRedistancing:
    coefficients = NCLS.Coefficients(V_model=0,
                                     RD_model=2,
                                     ME_model=1,
                                     epsFact=epsFact_consrv_heaviside,
                                     checkMass=checkMass)
else:
    coefficients = NCLS.Coefficients(V_model=0,
                                     ME_model=1,
                                     epsFact=epsFact_consrv_heaviside,
                                     checkMass=checkMass)


def getDBC_ls(x, flag):
    pass


dirichletConditions = {0: getDBC_ls}
예제 #9
0
                                      V_model=None,
                                      RD_model=None,
                                      ME_model=0,
                                      checkMass=False,
                                      epsFact=0.0,
                                      useMetrics=1.0,
                                      STABILIZATION_TYPE=2,
                                      LUMPED_MASS_MATRIX=False,
                                      ENTROPY_TYPE=2,
                                      FCT=True,
                                      num_fct_iter=1)
elif useNCLS:
    LevelModelType = NCLS.LevelModel
    coefficients = NCLS.Coefficients(V_model=None,
                                     RD_model=None,
                                     ME_model=0,
                                     checkMass=False,
                                     epsFact=0.0,
                                     useMetrics=1.0)
elif useVOF:
    LevelModelType = VOF.LevelModel
    coefficients = VOF.Coefficients(LS_model=None,
                                    V_model=None,
                                    RD_model=None,
                                    ME_model=0,
                                    checkMass=False,
                                    epsFact=0.0,
                                    useMetrics=1.0,
                                    FCT=False)
elif useHJ:
    coefficients = ConstantVelocityLevelSet(b=velocity)
else: