コード例 #1
0
from math import *
from proteus import *
from proteus.default_p import *
from NS_hotstart import *

#domain = ctx.domain
#nd = ctx.nd
name = "pressureincrement"

from proteus.mprans import PresInc
coefficients = PresInc.Coefficients(
    rho_f_min=(1.0 - 1.0e-8) * rho_1,
    rho_s_min=(1.0 - 1.0e-8) * rho_s,
    nd=nd,
    modelIndex=1,
    fluidModelIndex=0,
    fixNullSpace=fixNullSpace_PresInc,
    INTEGRATE_BY_PARTS_DIV_U=INTEGRATE_BY_PARTS_DIV_U_PresInc)
LevelModelType = PresInc.LevelModel


def getDBC_phi(x, flag):
    None


def getAdvectiveFlux_qt(x, flag):
    if manufactured_solution == 1:  #u.n!=0
        if (flag == 1):  #left boundary
            return lambda x, t: -np.sin(x[0]) * np.sin(x[1] + t)
        elif (flag == 2):  # right boundary
            return lambda x, t: np.sin(x[0]) * np.sin(x[1] + t)
コード例 #2
0
from math import *
from proteus import *
from proteus.default_p import *
from risingBubble import *

name = "pressureincrement"

from proteus.mprans import PresInc
LevelModelType = PresInc.LevelModel
coefficients = PresInc.Coefficients(rho_f_min=(1.0 - 1.0e-8) * rho_1,
                                    rho_s_min=(1.0 - 1.0e-8) * rho_s,
                                    nd=nd,
                                    modelIndex=PINC_model,
                                    fluidModelIndex=V_model)


#pressure increment should be zero on any pressure dirichlet boundaries
def getDBC_phi(x, flag):
    if flag == boundaryTags['top'] and openTop:
        return lambda x, t: 0.0


#the advectiveFlux should be zero on any no-flow  boundaries
def getAdvectiveFlux_qt(x, flag):
    if not (flag == boundaryTags['top'] and openTop):
        return lambda x, t: 0.0


def getDiffusiveFlux_phi(x, flag):
    if not (flag == boundaryTags['top'] and openTop):
        return lambda x, t: 0.0
コード例 #3
0
name = "pressureincrement"

LevelModelType = PresInc.LevelModel
#from ProjectionScheme import PressureIncrement
#coefficients=PressureIncrement(rho_f_min = rho_1,
#                               rho_s_min = rho_s,
#                               nd = nd,
#                               modelIndex=PINC_model,
#                               fluidModelIndex=V_model)
from proteus.mprans import PresInc
coefficients = PresInc.Coefficients(
    rho_f_min=(1.0 - 1.0e-8) * rho_1,
    rho_s_min=(1.0 - 1.0e-8) * rho_s,
    nd=nd,
    modelIndex=PINC_model,
    fluidModelIndex=V_model,
    sedModelIndex=SED_model,
    VOF_model=VOF_model,
    VOS_model=VOS_model,
    fixNullSpace=fixNullSpace_PresInc,
    INTEGRATE_BY_PARTS_DIV_U=ct.INTEGRATE_BY_PARTS_DIV_U_PresInc)

#pressure increment should be zero on any pressure dirichlet boundaries

#the advectiveFlux should be zero on any no-flow  boundaries


class getIBC_phi:
    def __init__(self):
        pass
コード例 #4
0
from math import *
from proteus import *
from proteus.default_p import *
try:
    from .multiphase import *
except:
    from multiphase import *

name = "pressureincrement"

from proteus.mprans import PresInc
LevelModelType = PresInc.LevelModel
coefficients = PresInc.Coefficients(
    rho_f_min=(1.0 - 1.0e-8) * rho_1,
    rho_s_min=(1.0 - 1.0e-8) * rho_s,
    nd=nd,
    modelIndex=PINC_model,
    fluidModelIndex=V_model,
    fixNullSpace=False,
    nullSpace="NoNullSpace" if openTop else "ConstantNullSpace")


#pressure increment should be zero on any pressure dirichlet boundaries
def getDBC_phi(x, flag):
    if flag == boundaryTags['top'] and openTop:
        return lambda x, t: 0.0


#the advectiveFlux should be zero on any no-flow  boundaries
def getAdvectiveFlux_qt(x, flag):
    if not (flag == boundaryTags['top'] and openTop):
        return lambda x, t: 0.0
コード例 #5
0
from math import *
from proteus import *
from proteus.default_p import *
try:
    from .risingBubble import *
except:
    from risingBubble import *

name = "pressureincrement"

from proteus.mprans import PresInc
LevelModelType = PresInc.LevelModel
coefficients=PresInc.Coefficients(rho_f_min = (1.0-1.0e-8)*rho_1,
                                  rho_s_min = (1.0-1.0e-8)*rho_s,
                                  nd = nd,
                                  modelIndex=PINC_model,
                                  fluidModelIndex=V_model,
                                  fixNullSpace=True,
                                  nullSpace='NoNullSpace')#'ConstantNullSpace')

#pressure increment should be zero on any pressure dirichlet boundaries
def getDBC_phi(x,flag):
    if flag == boundaryTags['top'] and openTop:
        return lambda x,t: 0.0

#the advectiveFlux should be zero on any no-flow  boundaries
def getAdvectiveFlux_qt(x,flag):
    if not (flag == boundaryTags['top'] and openTop):
        return lambda x,t: 0.0

def getDiffusiveFlux_phi(x,flag):