-
Notifications
You must be signed in to change notification settings - Fork 0
/
redist_p.py
41 lines (30 loc) · 1.07 KB
/
redist_p.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from proteus.default_p import *
from proteus.mprans import RDLS
from proteus import Context
ct = Context.get()
domain = ct.domain
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=int(ct.movingDomain)+2,
rdModelId=int(ct.movingDomain)+3,
useMetrics=ct.useMetrics,
backgroundDiffusionFactor=ct.backgroundDiffusionFactor)
def getDBC_rd(x, flag):
pass
dirichletConditions = {0: getDBC_rd}
weakDirichletConditions = {0: RDLS.setZeroLSweakDirichletBCsSimple}
advectiveFluxBoundaryConditions = {}
diffusiveFluxBoundaryConditions = {0: {}}
class PHI_IC:
def uOfXT(self, x, t):
return x[nd-1] - ct.waterLevel
initialConditions = {0: PHI_IC()}