<commit_before>from proteus import *
from proteus.default_p import *
from proteus.ctransportCoefficients import smoothedHeaviside
from sluice_gate import *
from proteus.mprans import VOF

LevelModelType = VOF.LevelModel
if useOnlyVF:
    RD_model = None
    LS_model = None
else:
    RD_model = 3
    LS_model = 2
coefficients = VOF.Coefficients(LS_model=LS_model,V_model=0,RD_model=RD_model,ME_model=1,
                                checkMass=False,useMetrics=useMetrics,
                                epsFact=epsFact_vof,sc_uref=vof_sc_uref,sc_beta=vof_sc_beta)
 
def getDBC_vof(x,flag):
   if flag == boundaryTags['top']:
       return lambda x,t: 1.0
   elif flag == boundaryTags['right']:
       return lambda x,t: 1.0
   elif flag == boundaryTags['left'] and x[1] > waterLine_z:
       return lambda x,t: 1.0
   elif flag == boundaryTags['left'] and x[1] <=  waterLine_z:
       return lambda x,t: 0.0
  

dirichletConditions = {0:getDBC_vof}

def getAFBC_vof(x,flag):
    if flag == boundaryTags['top']:
        return None
    elif flag == boundaryTags['left']:
        return None
    elif flag == boundaryTags['right']:
        return None<commit_msg>added sluice gage BC's to VOF--every boundary needs a boundary condition<commit_after>from proteus import *
from proteus.default_p import *
from proteus.ctransportCoefficients import smoothedHeaviside
from sluice_gate import *
from proteus.mprans import VOF

LevelModelType = VOF.LevelModel
if useOnlyVF:
    RD_model = None
    LS_model = None
else:
    RD_model = 3
    LS_model = 2
coefficients = VOF.Coefficients(LS_model=LS_model,V_model=0,RD_model=RD_model,ME_model=1,
                                checkMass=False,useMetrics=useMetrics,
                                epsFact=epsFact_vof,sc_uref=vof_sc_uref,sc_beta=vof_sc_beta)
 
def getDBC_vof(x,flag):
   if flag == boundaryTags['top']:
       return lambda x,t: 1.0
   elif flag == boundaryTags['right']:
       return lambda x,t: 1.0
   elif flag == boundaryTags['left'] and x[1] > waterLine_z:
       return lambda x,t: 1.0
   elif flag == boundaryTags['left'] and x[1] <=  waterLine_z:
       return lambda x,t: 0.0
  

dirichletConditions = {0:getDBC_vof}

def getAFBC_vof(x,flag):
    if flag == boundaryTags['top']:
        return None
    elif flag == boundaryTags['left']:
        return None
    elif flag == boundaryTags['right']:
        return None
    elif flag == boundaryTags['gate_v'] or  flag == boundaryTags['gate_h']:
        return lambda x,t: 0.0
{'fraction_non_alphanumeric': 0.10216346153846154, 'fraction_numerical': 0.01282051282051282, 'mean_word_length': 3.1547420965058235, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4296624', 'n_tokens_mistral': 889, 'n_tokens_neox': 846, 'n_words': 197}