from __future__ import absolute_import from builtins import object from proteus import * from proteus.default_p import * from proteus.ctransportCoefficients import smoothedHeaviside from .multiphase import * from proteus.mprans import VOF3P LevelModelType = VOF3P.LevelModel coefficients = VOF3P.Coefficients(LS_model=LS_model, V_model=V_model, RD_model=RD_model, ME_model=VOF_model, VOS_model=VOS_model, checkMass=True, useMetrics=useMetrics, epsFact=epsFact_vof, sc_uref=vof_sc_uref, sc_beta=vof_sc_beta, movingDomain=movingDomain, EXPLICIT_METHOD=EXPLICIT_VOF) def getDBC_vof(x, flag): if flag == boundaryTags['top'] and openTop: return lambda x, t: 1.0 dirichletConditions = {0: getDBC_vof}
from proteus.default_p import * from proteus.ctransportCoefficients import smoothedHeaviside try: from .risingBubble import * except: from risingBubble import * from proteus.mprans import VOF3P LevelModelType = VOF3P.LevelModel coefficients = VOF3P.Coefficients( LS_model=LS_model, V_model=V_model, RD_model=RD_model, ME_model=VOF_model, VOS_model=VOS_model, checkMass=True, useMetrics=useMetrics, epsFact=epsFact_vof, sc_uref=vof_sc_uref, sc_beta=vof_sc_beta, movingDomain=movingDomain, STABILIZATION_TYPE=1 if EXPLICIT_VOF is True else 0) #EXPLICIT_METHOD=EXPLICIT_VOF) def getDBC_vof(x, flag): if flag == boundaryTags['top'] and openTop: return lambda x, t: 1.0 dirichletConditions = {0: getDBC_vof}
RD_model = 3 VOF_model = 1 VOS_model = 0 else: VOS_model = None VOF_model = 0 LS_model = 1 RD_model = 2 V_model = 4 coefficients = VOF3P.Coefficients(LS_model=LS_model, V_model=V_model, RD_model=RD_model, ME_model=VOF_model, VOS_model=VOS_model, checkMass=True, useMetrics=ct.useMetrics, epsFact=ct.epsFact_vof, sc_uref=ct.vof_sc_uref, sc_beta=ct.vof_sc_beta, movingDomain=ct.movingDomain) dirichletConditions = { 0: lambda x, flag: domain.bc[flag].vof_dirichlet.init_cython() } advectiveFluxBoundaryConditions = { 0: lambda x, flag: domain.bc[flag].vof_advective.init_cython() } diffusiveFluxBoundaryConditions = {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 numericalFluxType = VOF3P.NumericalFlux conservativeFlux = None subgridError = VOF3P.SubgridError(coefficients=physics.coefficients, nd=nd) shockCapturing = VOF3P.ShockCapturing( physics.coefficients, nd, shockCapturingFactor=ct.vof_shockCapturingFactor, lag=ct.vof_lag_shockCapturing) fullNewtonFlag = True multilevelNonlinearSolver = NonlinearSolvers.Newton levelNonlinearSolver = NonlinearSolvers.Newton nonlinearSmoother = None linearSmoother = None matrix = LinearAlgebraTools.SparseMatrix