Abstract Operations on Discrete Data #3211
-
Hi, I have a question about using abstract operations on discrete data, specifically FieldTimeSeries objects. I understand that you can use these operations (like the spatial derivatives) before running a simulation to calculate and store additional variables like the following:
Due mainly to storage concerns, I only save the basic variables in my output file, so my question is can the same thing (or an analogous operation) be done after the simulation with the FieldTimeSeries data? Something like:
I know I could define a discrete derivative myself separately, but I would like to ensure consistency in the discretization, and ideally would like to include the whole domain (using the boundary conditions). Is this possible? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 11 replies
-
Yes, except that you cannot perform ut = FieldTimeSeries(filename, "u")
vt = FieldTimeSeries(filename, "v")
for n = 1:length(ut.times)
un = ut[n]
vn = vt[n]
ζn = ∂x(vn) - ∂y(un)
end Also note that you probably want to save your data using |
Beta Was this translation helpful? Give feedback.
Yes, except that you cannot perform
AbstractOperations
directly onFieldTimeSeries
. Instead, you have to extract aField
at a particular time from theFieldTimeSeries
and perform operations on that:Also note that you probably want to save your data using
with_halo = true
so that you have halo points (which will allow you to compute derivatives on the boundaries).