Hi,
I'm solving time-dependent PDE (instationary heat equation) and I want to save the value of a flux functional for every time step to a txt.-File.
But I haven't yet figured out how to do this.
while t < t_end:
# Solve the problem
solver.solve()
# Store solution to file
file_u << (u, t)
# Move to next time step
u0.assign(u)
t += dt
# Report flux
n = FacetNormal(mesh)
flux = assemble(K*dot(grad(u), n)*dsN)
I am very grateful for your attention and for any help.