Skip to content

Commit 628a1e6

Browse files
rename lhs1 to lhs
1 parent 767c19a commit 628a1e6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

perpendicular-flap/fluid-nutils/fluid.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,15 @@ def main(inflow: 'inflow velocity' = 10,
153153
interface.mark_action_fulfilled(precice.action_write_iteration_checkpoint())
154154

155155
# solve fluid equations
156-
lhs1 = solver.newton('lhs', res, lhs0=lhs0, constrain=cons,
156+
lhs = solver.newton('lhs', res, lhs0=lhs0, constrain=cons,
157157
arguments=dict(lhs0=lhs0, dt=dt, meshdofs=meshdofs, meshdofs0=meshdofs0,
158158
meshdofs00=meshdofs00, meshdofs000=meshdofs000, meshdofs0000=meshdofs0000)
159159
).solve(tol=1e-6)
160160

161161
# write forces to interface
162162
if interface.is_write_data_required(dt):
163163
F = solver.solve_linear('F', resF, constrain=consF,
164-
arguments=dict(lhs00=lhs00, lhs0=lhs0, lhs=lhs1, dt=dt, meshdofs=meshdofs,
164+
arguments=dict(lhs00=lhs00, lhs0=lhs0, lhs=lhs, dt=dt, meshdofs=meshdofs,
165165
meshdofs0=meshdofs0, meshdofs00=meshdofs00,
166166
meshdofs000=meshdofs000, meshdofs0000=meshdofs0000))
167167
# writedata = couplingsample.eval(ns.F, F=F) # for stresses
@@ -176,7 +176,7 @@ def main(inflow: 'inflow velocity' = 10,
176176
# advance variables
177177
timestep += 1
178178
lhs00 = lhs0
179-
lhs0 = lhs1
179+
lhs0 = lhs
180180
meshdofs0000 = meshdofs000
181181
meshdofs000 = meshdofs00
182182
meshdofs00 = meshdofs0
@@ -188,7 +188,7 @@ def main(inflow: 'inflow velocity' = 10,
188188
interface.mark_action_fulfilled(precice.action_read_iteration_checkpoint())
189189

190190
if interface.is_time_window_complete():
191-
x, u, p = bezier.eval(['x_i', 'u_i', 'p'] @ ns, lhs=lhs1, meshdofs=meshdofs, meshdofs0=meshdofs0,
191+
x, u, p = bezier.eval(['x_i', 'u_i', 'p'] @ ns, lhs=lhs, meshdofs=meshdofs, meshdofs0=meshdofs0,
192192
meshdofs00=meshdofs00, meshdofs000=meshdofs000, meshdofs0000=meshdofs0000, dt=dt)
193193
export.triplot('velocity.jpg', x, numpy.linalg.norm(u, axis=1), tri=bezier.tri, cmap='jet')
194194
export.triplot('pressure.jpg', x, p, tri=bezier.tri, cmap='jet')

0 commit comments

Comments
 (0)