Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CHT/flow-over-plate/buoyantPimpleFoam-fenics/Solid/heat.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,17 +178,17 @@ def determine_heat_flux(V_g, u, k, flux):
n = n_cp
else: # update solution
u_n.assign(u_np1)
t += dt
t += float(dt)
n += 1

if precice.is_time_window_complete():
tol = 10e-5 # we need some tolerance, since otherwise output might be skipped.
if abs((float(t)+tol) % dt_out) < 2*tol: # output if t is a multiple of dt_out
if abs((t + tol) % dt_out) < 2*tol: # output if t is a multiple of dt_out
print("output vtk for time = {}".format(float(t)))
file_out << u_n

# Update dirichlet BC
u_D.t = t + dt(0)
u_D.t = t + float(dt)

# Hold plot
precice.finalize()
2 changes: 1 addition & 1 deletion FSI/cylinderFlap/OpenFOAM-FEniCS/Solid/cyl-flap.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def avg(x_old, x_new, alpha):
n = n_cp
else:
u_n.assign(u_np1)
t += dt
t += float(dt)
n += 1

if precice.is_time_window_complete():
Expand Down
2 changes: 1 addition & 1 deletion FSI/flap_perp/OpenFOAM-FEniCS/Solid/perp-flap.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def avg(x_old, x_new, alpha):
n = n_cp
else:
u_n.assign(u_np1)
t += dt
t += float(dt)
n += 1

if precice.is_time_window_complete():
Expand Down
6 changes: 3 additions & 3 deletions HT/partitioned-heat/fenics-fenics/heat.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def determine_gradient(V_g, u, flux):
n = n_cp
else: # update solution
u_n.assign(u_np1)
t += dt
t += float(dt)
n += 1

if precice.is_time_window_complete():
Expand All @@ -243,8 +243,8 @@ def determine_gradient(V_g, u, flux):
error_out << error_pointwise

# Update Dirichlet BC
u_D.t = t + dt(0)
f.t = t + dt(0)
u_D.t = t + float(dt)
f.t = t + float(dt)

# Hold plot
precice.finalize()