Tracking variables while solving #433
-
Hi I am solving the heat equation with temperature dependent coefficients, such as E.g. Is there a way to track the value of such coefficients in order to plot them afterwards? I need to verify that their values are actually correct. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You can't directly track internal variables, but you could use a |
Beta Was this translation helpful? Give feedback.
-
I updated the def transform(field, t):
return FieldCollection([field, 200 - field])
term_1 = f"3 * laplace(T)"
eq = PDE({"T": f"({term_1}) / ({rho} * {c})"}, bc = [bc_x_left, bc_x_right])
res = eq.solve(field, t_end, dt, tracker = self.storage.tracker(dt, transformation=transform)) |
Beta Was this translation helpful? Give feedback.
You can't directly track internal variables, but you could use a
DataTracker
to track arbitrary data. I realize that it might be very useful to have an option to storage tracker, which allows to transform fields and calculated derived quantities. I'll think about it.