forked from erdc/proteus-notebooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sw_2d_n.py
58 lines (43 loc) · 1.32 KB
/
sw_2d_n.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
from proteus import *
from proteus.default_n import *
from sw_2d_p import *
timeIntegration = BackwardEuler_cfl
stepController = Min_dt_controller
runCFL=0.33
rtol_u[0] = 1.0e-4
rtol_u[1] = 1.0e-4
rtol_u[2] = 1.0e-4
atol_u[0] = 1.0e-4
atol_u[1] = 1.0e-4
atol_u[2] = 1.0e-4
femSpaces = {0:C0_AffineLinearOnSimplexWithNodalBasis,
1:C0_AffineLinearOnSimplexWithNodalBasis,
2:C0_AffineLinearOnSimplexWithNodalBasis}
elementQuadrature = SimplexGaussQuadrature(nd,3)
elementBoundaryQuadrature = SimplexGaussQuadrature(nd-1,3)
multilevelNonlinearSolver = Newton
levelNonlinearSolver = Newton
fullNewtonFlag = True
nDTout=201
nnx=51
nny=51
he = L[0]/float(nnx-1)
triangleOptions="pAq30Dena%f" % (0.5*he**2,)
#added flag for using SUPG stabilization based on Berger and Stockstill, 95
try_supg_stabilization = True
subgridError = SW2D.SubgridError(coefficients,nd,lag=True)
massLumping=False
shockCapturing = SW2D.ShockCapturing(coefficients,nd,shockCapturingFactor=0.1,lag=True)
numericalFluxType = SW2D.NumericalFlux
tolFac = 0.0
levelNonlinearSolverConvergenceTest = 'r'
linearSolverConvergenceTest = 'r-true'
maxLineSearches=0
nl_atol_res = 1.0e-5
nl_rtol_res = 0.0
l_atol_res = 1.0e-7
l_rtol_res = 0.0
matrix = SparseMatrix
multilevelLinearSolver = LU
levelLinearSolver = LU
#conservativeFlux = {0:'pwl'}