@@ -153,15 +153,15 @@ def main(inflow: 'inflow velocity' = 10,
153
153
interface .mark_action_fulfilled (precice .action_write_iteration_checkpoint ())
154
154
155
155
# solve fluid equations
156
- lhs1 = solver .newton ('lhs' , res , lhs0 = lhs0 , constrain = cons ,
156
+ lhs = solver .newton ('lhs' , res , lhs0 = lhs0 , constrain = cons ,
157
157
arguments = dict (lhs0 = lhs0 , dt = dt , meshdofs = meshdofs , meshdofs0 = meshdofs0 ,
158
158
meshdofs00 = meshdofs00 , meshdofs000 = meshdofs000 , meshdofs0000 = meshdofs0000 )
159
159
).solve (tol = 1e-6 )
160
160
161
161
# write forces to interface
162
162
if interface .is_write_data_required (dt ):
163
163
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 ,
165
165
meshdofs0 = meshdofs0 , meshdofs00 = meshdofs00 ,
166
166
meshdofs000 = meshdofs000 , meshdofs0000 = meshdofs0000 ))
167
167
# writedata = couplingsample.eval(ns.F, F=F) # for stresses
@@ -176,7 +176,7 @@ def main(inflow: 'inflow velocity' = 10,
176
176
# advance variables
177
177
timestep += 1
178
178
lhs00 = lhs0
179
- lhs0 = lhs1
179
+ lhs0 = lhs
180
180
meshdofs0000 = meshdofs000
181
181
meshdofs000 = meshdofs00
182
182
meshdofs00 = meshdofs0
@@ -188,7 +188,7 @@ def main(inflow: 'inflow velocity' = 10,
188
188
interface .mark_action_fulfilled (precice .action_read_iteration_checkpoint ())
189
189
190
190
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 ,
192
192
meshdofs00 = meshdofs00 , meshdofs000 = meshdofs000 , meshdofs0000 = meshdofs0000 , dt = dt )
193
193
export .triplot ('velocity.jpg' , x , numpy .linalg .norm (u , axis = 1 ), tri = bezier .tri , cmap = 'jet' )
194
194
export .triplot ('pressure.jpg' , x , p , tri = bezier .tri , cmap = 'jet' )
0 commit comments