# Regarding solution vector of the wave equation

I am simulating the wave equation using FEM. For a 2D wave equation, when I visualise my output in Paraview, I see a separate solution in 'x' and 'y' direction for each node on the mesh. Therefore, if I freeze the time, I will have a solution vector of the size: (No. of nodes x 2). This makes sense to me because when a wave strikes a surface, we represent the time history graphs in all 3 directions (for 3D). So, it is obvious that I should have a displacement solution vector in 2 directions for 2D. However, is it possible to substitute the 2 solution values obtained in 'x' and 'y' direction on each node, by a single value? I believe they are just the projection of a single solution and therefore, is it reasonable to use Pythagoras theorem on the 'x' and 'y' solution value to obtain a single solution value at each node?

• This question makes no sense to me by itself. You appear to be using some code to simulate the wave equation (which?) that appears to write its result in a file format whose content you don't understand (which?). You then visualize it and can't match what the original code wrote with what you think that might represent. I think you need to read up in the manual of that code to figure out what 'x' and 'y' may represent. (I may suggest that these are the amplitude and velocity of the solution, based on the fact that one often solves the wave equation this way. But of course I don't know.) – Wolfgang Bangerth Nov 1 '16 at 1:50
• You can always visualize the magnitude of the vector (single value). – Paul Nov 1 '16 at 18:20

From what you are saying, you are probably visualising the intensity of the electric (?) field inside of your domain. Since you are in 2-D, your electric field $\vec{E}(x,y,t)$ has two components: $\vec{E}(x,y,t)=E_x(x,y,t)\hat{x}+E_y(x,y,t)\hat{y}$.
1. Visualize your $E_x(x,y,t)$ and $E_y(x,y,t)$ separately. If you fix your time $t$, you are going to have a plot with values of the intensity at $\hat{x}$ or $\hat{y}$ direction at the grid points, and you can make it a surface plot by using some kind of interpolation rule in between.
2. Calculate the magnitude of the vector $|\vec{E}(x,y,t)|=E_x^2+E_y^2$ and visualize just one quantity as you mentioned in your question. Such visualization is still useful, but you are certainly loosing a sense of direction here.
3. Plot a vector field using Glyph (or streamlines). By doing that, at each of your 2-D grid points you would see a vector that directed according to the values $E_x(x,y)$ and $E_y(x,y)$. This is the most natural way to visualize a vector quantity. And if you play an animation in time, the vectors would even rotate, showing you the field evolution. You can read about vector field visualization in Paraview on their website.