Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Plot the results of multiple time steps in one graph

Please login with a confirmed email address before reporting spam

Hi,

I would like to plot the 2D contour plots of different time steps in one graph, is it possible? For example, in a time-dependent FSI model, at t=0.1s, I plot colour contour with an expression: solid.mises>100, which shows the regions have stress larger than 100 Pa in different colour. With the same expression, I plot the graph for t=0.2s. They have different parts that have stress>100 Pa, which means I cannot see the failed zones appears at t=0.1s. Is there any way that I can plot the them in one graph, showing the results of all time steps? Thanks a lot for any help.

Regards,
Tianhang

7 Replies Last Post Dec 20, 2015, 6:11 p.m. EST

Please login with a confirmed email address before reporting spam

Posted: 9 years ago Nov 19, 2015, 1:23 a.m. EST
For advanced post-processing you can use, e.g. Matlab. Export your model in Matlab code (*.m) and you can edit that code according to your needs.

BR
Lasse
For advanced post-processing you can use, e.g. Matlab. Export your model in Matlab code (*.m) and you can edit that code according to your needs. BR Lasse

Gunnar Andersson COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago Nov 19, 2015, 2:31 a.m. EST
I don't understand exactly what you want to do, but maybe you can use a Parametric 2D data set: By using this data set you get a 3D space where time is the third dimension. By using e.g. surface or contour plots on the parametric data set you can see all times at once.
I don't understand exactly what you want to do, but maybe you can use a Parametric 2D data set: By using this data set you get a 3D space where time is the third dimension. By using e.g. surface or contour plots on the parametric data set you can see all times at once.

Please login with a confirmed email address before reporting spam

Posted: 9 years ago Nov 19, 2015, 5:51 p.m. EST
Hi Lasse,

Thank you very much for your suggestion.

Regards,
Tianhang
Hi Lasse, Thank you very much for your suggestion. Regards, Tianhang

Please login with a confirmed email address before reporting spam

Posted: 9 years ago Nov 19, 2015, 6:13 p.m. EST
Hi Gunnar,

Thank you very much for the help. I tried your suggestion, and it worked. I can plot a 3D graph showing all time steps. However, as I have got more than 10 time steps, I could not clearly visualize the results in the middle range, even if I made them transparency. Is there a way to plot the results on a 2D graph? Thanks.

Tianhang
Hi Gunnar, Thank you very much for the help. I tried your suggestion, and it worked. I can plot a 3D graph showing all time steps. However, as I have got more than 10 time steps, I could not clearly visualize the results in the middle range, even if I made them transparency. Is there a way to plot the results on a 2D graph? Thanks. Tianhang

Gunnar Andersson COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago Nov 23, 2015, 8:02 a.m. EST
You can use a 3D contour plot pointing to the parametric extrusion data set and use a view that is chosen such that all the 2D slices coincide: Click on "Go to XY View" in the graphics window's toolbar. Then go to the view's camera node, probably located in Components 1 > Definitions > View 1 > Camera, and change Projection to Orthographic. Click Update in the settings window's toolbar.
You can use a 3D contour plot pointing to the parametric extrusion data set and use a view that is chosen such that all the 2D slices coincide: Click on "Go to XY View" in the graphics window's toolbar. Then go to the view's camera node, probably located in Components 1 > Definitions > View 1 > Camera, and change Projection to Orthographic. Click Update in the settings window's toolbar.

Please login with a confirmed email address before reporting spam

Posted: 9 years ago Nov 23, 2015, 7:22 p.m. EST
Thank you very much for the help, Gunnar.
Thank you very much for the help, Gunnar.

Please login with a confirmed email address before reporting spam

Posted: 9 years ago Dec 20, 2015, 6:11 p.m. EST
Hi Lasse,

Is it possible for you to further instruct how to do that in Matlab? For example, to return the largest value of a variable during a time-dependent study (for each point in the domain)? Thanks a lot.

Regards,
Albert
Hi Lasse, Is it possible for you to further instruct how to do that in Matlab? For example, to return the largest value of a variable during a time-dependent study (for each point in the domain)? Thanks a lot. Regards, Albert

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.