Skip to content

Commit 929c494

Browse files
change umesh to first order accuracy
1 parent 5d6d339 commit 929c494

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

perpendicular-flap/fluid-nutils/fluid.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ def main(inflow: 'inflow velocity' = 10,
4040
= lambda f: theta * f + (1 - theta) * t0(f)
4141
# 1st order FD
4242
δt = lambda f: (f - t0(f)) / function.Argument('dt', ())
43-
# extrapolation for pressure
44-
tp = lambda f: (1.5 * f - 0.5 * t0(f))
45-
# 2nd order FD
46-
tt = lambda f: tp(δt(f))
4743

4844
# Nutils namespace
4945
ns = function.Namespace()
@@ -53,7 +49,7 @@ def main(inflow: 'inflow velocity' = 10,
5349
ns.x0 = geom # reference geometry
5450
ns.dbasis = domain.basis('std', degree=1).vector(2)
5551
ns.d_i = 'dbasis_ni ?meshdofs_n'
56-
ns.umesh = tt(ns.d) # mesh velocity
52+
ns.umesh = δt(ns.d) # mesh velocity
5753
ns.x_i = 'x0_i + d_i' # moving geometry
5854
ns.ubasis, ns.pbasis = function.chain([domain.basis('std', degree=2).vector(2), domain.basis('std', degree=1), ])
5955
ns.F_i = 'ubasis_ni ?F_n' # stress field
@@ -118,7 +114,7 @@ def main(inflow: 'inflow velocity' = 10,
118114
timestep = 0
119115
arguments = dict(lhs=numpy.zeros(len(ns.ubasis)), F=numpy.zeros(len(ns.ubasis)), meshdofs=numpy.zeros(len(ns.dbasis)), dt=timestepsize)
120116

121-
nhist = 4 # history length required by the formulation
117+
nhist = 2 # history length required by the formulation
122118
arguments.update((k+'0'*i, v) for k, v in tuple(arguments.items()) for i in range(nhist))
123119

124120
while interface.is_coupling_ongoing():

0 commit comments

Comments
 (0)