from proteus import * from proteus.default_p import * from math import * from vortex2D import * from proteus.mprans import RDLS import ncls_p name = soname+"_rdls" LevelModelType = RDLS.LevelModel coefficients = RDLS.Coefficients(applyRedistancing=True, epsFact=epsFactRedistance, nModelId=0, rdModelId=1, useMetrics=useMetrics, ELLIPTIC_REDISTANCING=ct.ELLIPTIC_REDISTANCING, ELLIPTIC_REDISTANCING_TYPE=ct.ELLIPTIC_REDISTANCING_TYPE, alpha=ct.alpha) #now define the Dirichlet boundary conditions def getDBC(x,flag): pass dirichletConditions = {0:getDBC} if LevelModelType == RDLS.LevelModel: weakDirichletConditions = {0:RDLS.setZeroLSweakDirichletBCsSimple} else: weakDirichletConditions = {0:coefficients.setZeroLSweakDirichletBCs} #weakDirichletConditions = {0:coefficients.setZeroLSweakDirichletBCs2} #weakDirichletConditions = None
from proteus import * from proteus.default_p import * from math import * from wavesloshing_laminar_unstruct_medium import * from proteus.mprans import RDLS """ The redistancing equation in the sloshbox test problem. """ LevelModelType = RDLS.LevelModel coefficients = RDLS.Coefficients(applyRedistancing=True, epsFact=epsFact_redistance, nModelId=2, rdModelId=3, useMetrics=useMetrics) def getDBC_rd(x,flag): pass dirichletConditions = {0:getDBC_rd} weakDirichletConditions = {0:RDLS.setZeroLSweakDirichletBCsSimple} advectiveFluxBoundaryConditions = {} diffusiveFluxBoundaryConditions = {0:{}} class PerturbedSurface_phi: def uOfXT(self,x,t): return signedDistance(x) initialConditions = {0:PerturbedSurface_phi()}
from proteus import * from proteus.default_p import * from math import * from proteus.mprans import RDLS try: from .rotation2D import * from . import ls_rotation_2d_p except: from rotation2D import * import ls_rotation_2d_p name = soname + "_rdls" LevelModelType = RDLS.LevelModel coefficients = RDLS.Coefficients(applyRedistancing=applyRedistancing, epsFact=epsFactRedistance, nModelId=0, rdModelId=1, useMetrics=useMetrics) #now define the Dirichlet boundary conditions def getDBC(x, flag): pass dirichletConditions = {0: getDBC} if LevelModelType == RDLS.LevelModel: #weakDirichletConditions = {0:RDLS.setZeroLSweakDirichletBCs} weakDirichletConditions = {0: RDLS.setZeroLSweakDirichletBCsSimple}
nd = domain.nd mesh = domain.MeshOptions genMesh = mesh.genMesh movingDomain = ct.movingDomain T = ct.T """ The redistancing equation in the sloshbox test problem. """ LevelModelType = RDLS.LevelModel coefficients = RDLS.Coefficients( applyRedistancing=ct.applyRedistancing, epsFact=ct.epsFact_redistance, nModelId=2, rdModelId=3, useMetrics=ct.useMetrics, backgroundDiffusionFactor=ct.backgroundDiffusionFactor) def getDBC_rd(x, flag): pass dirichletConditions = {0: getDBC_rd} weakDirichletConditions = {0: RDLS.setZeroLSweakDirichletBCsSimple} advectiveFluxBoundaryConditions = {} diffusiveFluxBoundaryConditions = {0: {}}
LevelModelType = RDLS.LevelModel #V2.OneLevelRDLSV2 """ The redistancing equation in the sloshbox test problem. """ ## ##\ingroup test #\brief The redistancing equation in the sloshbox test problem. # if applyCorrection: # coefficients = RedistanceLevelSet(applyRedistancing=applyRedistancing, # epsFact=epsFact_redistance, # nModelId=1, # rdModelId=3) coefficients = RDLS.Coefficients(applyRedistancing=applyRedistancing, epsFact=epsFact_redistance, nModelId=1, rdModelId=3) else: # coefficients = RedistanceLevelSet(applyRedistancing=applyRedistancing, # epsFact=epsFact_redistance, # nModelId=1, # rdModelId=2) coefficients = RDLS.Coefficients(applyRedistancing=applyRedistancing, epsFact=epsFact_redistance, nModelId=1, rdModelId=2) #now define the Dirichlet boundary conditions def getDBC_rd(x, flag):
from math import * from floating_bar import * from proteus.mprans import RDLS from proteus import Context ct = Context.get() """ The redistancing equation in the sloshbox test problem. """ LevelModelType = RDLS.LevelModel coefficients = RDLS.Coefficients( applyRedistancing=applyRedistancing, epsFact=epsFact_redistance, nModelId=int(ct.movingDomain) + 2, rdModelId=int(ct.movingDomain) + 3, useMetrics=useMetrics, backgroundDiffusionFactor=ct.backgroundDiffusionFactor) def getDBC_rd(x, flag): pass dirichletConditions = {0: getDBC_rd} weakDirichletConditions = {0: RDLS.setZeroLSweakDirichletBCsSimple} advectiveFluxBoundaryConditions = {} diffusiveFluxBoundaryConditions = {0: {}}
from __future__ import absolute_import from proteus import * from proteus.default_p import * from math import * from .cons_ls import * from proteus.mprans import RDLS from . import ncls_p LevelModelType = RDLS.LevelModel coefficients = RDLS.Coefficients(applyRedistancing=True, epsFact=epsFactRedistance, nModelId=0, rdModelId=1) #now define the Dirichlet boundary conditions def getDBC(x, flag): pass dirichletConditions = {0: getDBC} if LevelModelType == RDLS.LevelModel: #weakDirichletConditions = {0:RDLS.setZeroLSweakDirichletBCs} weakDirichletConditions = {0: RDLS.setZeroLSweakDirichletBCsSimple} else: weakDirichletConditions = {0: coefficients.setZeroLSweakDirichletBCs} #weakDirichletConditions = {0:coefficients.setZeroLSweakDirichletBCs2}
from proteus.default_p import * from math import * try: from .risingBubble import * except: from risingBubble import * from proteus.mprans import RDLS """ The redistancing equation in the sloshbox test problem. """ LevelModelType = RDLS.LevelModel coefficients = RDLS.Coefficients(applyRedistancing=applyRedistancing, epsFact=epsFact_redistance, nModelId=LS_model, rdModelId=RD_model, useMetrics=useMetrics, ELLIPTIC_REDISTANCING=ELLIPTIC_REDISTANCING, alpha=alpha_REDISTANCING, copyList=rdls_copyList) def getDBC_rd(x, flag): pass dirichletConditions = {0: getDBC_rd} weakDirichletConditions = {0: RDLS.setZeroLSweakDirichletBCsSimple} advectiveFluxBoundaryConditions = {} diffusiveFluxBoundaryConditions = {0: {}}
from math import * try: from .vortex2D import * from . import ls_vortex_2d_p except: from vortex2D import * import ls_vortex_2d_p from proteus.mprans import RDLS name = soname + "_rdls" LevelModelType = RDLS.LevelModel coefficients = RDLS.Coefficients(applyRedistancing=applyRedistancing, epsFact=epsFactRedistance, nModelId=0, rdModelId=1, useMetrics=useMetrics, backgroundDiffusionFactor=0.01, weakDirichletFactor=1.0e3, useExact=useExact) #now define the Dirichlet boundary conditions def getDBC(x, flag): pass dirichletConditions = {0: getDBC} if True: #not useExact: if LevelModelType == RDLS.LevelModel:
from __future__ import absolute_import from proteus import * from proteus.default_p import * from math import * from .vortex2D import * from proteus.mprans import RDLS from . import ncls_p name = soname + "_rdls" LevelModelType = RDLS.LevelModel coefficients = RDLS.Coefficients( applyRedistancing=True, epsFact=epsFactRedistance, nModelId=0, rdModelId=1, useMetrics=useMetrics, ELLIPTIC_REDISTANCING=ct.ELLIPTIC_REDISTANCING, backgroundDissipationEllipticRedist=1.0, alpha=1E9) #now define the Dirichlet boundary conditions def getDBC(x, flag): pass dirichletConditions = {0: getDBC} if LevelModelType == RDLS.LevelModel: weakDirichletConditions = {0: RDLS.setZeroLSweakDirichletBCsSimple}
from proteus import * from proteus.default_p import * from math import * from floatingCylinder import * from proteus.mprans import RDLS LevelModelType = RDLS.LevelModel coefficients = RDLS.Coefficients(applyRedistancing=applyRedistancing, epsFact=epsFact_redistance, nModelId=1, rdModelId=3, useConstantH=useConstantH) #now define the Dirichlet boundary conditions def getDBC_rd(x, flag): pass dirichletConditions = {0: getDBC_rd} if freezeLevelSet: if LevelModelType == RDLS.LevelModel: weakDirichletConditions = {0: RDLS.setZeroLSweakDirichletBCs} else: weakDirichletConditions = {0: coefficients.setZeroLSweakDirichletBCs} class PerturbedSurface_phi: def __init__(self, waterLevel, slopeAngle): self.waterLevel = waterLevel