Exemplo n.º 1
0
from __future__ import absolute_import
from builtins import object
from math import *
from proteus import *
from proteus.default_p import *
from .NS_hotstart import *
from proteus.mprans import PresInit

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

coefficients = PresInit.Coefficients(nd=nd,
                                     modelIndex=3,
                                     fluidModelIndex=0,
                                     pressureModelIndex=2)


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


#the advectiveFlux should be zero on any no-flow  boundaries
def getAdvectiveFlux_pInit(x, flag):
    None
    #if flag != boundaryTags['top']:
    #    return lambda x,t: 0.0
Exemplo n.º 2
0
from math import *
from proteus import *
from proteus.default_p import *
from cylinder import *
from proteus.mprans import PresInit

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

coefficients = PresInit.Coefficients(nd=nd,
                                     modelIndex=PINIT_model,
                                     fluidModelIndex=V_model,
                                     pressureModelIndex=PRESSURE_model)


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


#the advectiveFlux should be zero on any no-flow  boundaries
def getAdvectiveFlux_pInit(x, flag):
    if flag != boundaryTags['right']:
        return lambda x, t: 0.0


def getDiffusiveFlux_pInit(x, flag):
    if flag != boundaryTags['right']:
        return lambda x, t: 0.0
Exemplo n.º 3
0
from math import *
from proteus import *
from proteus.default_p import *
from proteus.mprans import PresInit
from proteus import Context
from tank import *

ct = Context.get()
name = "pressureInitial"

coefficients = PresInit.Coefficients(nd=nd,
                                     modelIndex=ct.PI_model,
                                     fluidModelIndex=ct.V_model,
                                     pressureModelIndex=ct.P_model)

#pressure increment should be zero on any pressure dirichlet boundaries

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


class getIBC_pInit:
    def __init__(self):
        pass

    def uOfXT(self, x, t):
        return 0.0


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