I'm creating a pipe model in OpenModelica using the method of characteristics. The method is currently working, but the results are displayed as single variables stored in several arrays. The arrays store variables as H_array[T,N] (head) where T is time and N is space.
I would like to view the results as a plot (shown in the image below on the right hand side) with head H on the y-axis and time T on the x-axis in the "Plotting" tab in OpenModelica, but as previously mentioned, the results are displayed as single variables as shown below. More specifically, I would like to look at a certain place (meaning N), say N=3, and observe how H_array[k,3] for k=2:T vary on the y-axis as a function of time T on the x-axis.
I'm expecting to observe a (semi)square pressure pulse as seen on the right side of the picture below. I know how to pick out every element with N=3 and put them in a separate array, but I do not know how to continuously display the values as a function of time. Can this be done with a derivative function in some way? Any tips?
