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.

Space-Time plots

Please login with a confirmed email address before reporting spam

Hello,

do you know if there is a way to produce space-time plots in COMSOL 4.3?

I'll explain better my problem. I am simulating a rection-transport problem in 2D geometry with the time dependent solver. COMSOL can straightforwardly plot the concentration variable as a funcion of the space as a color map in a 2D surface plot, for each time step. I could also easily define a cut line in the solution, so that I can have a 1D plot of the concentration vs arc length of the cut line, always at a specific time step. Now what I want to have is a 2D space-time plot of the concentration, where the x axis is the arc length of the cut line, the y axis is the time, and the concentration is plotted as a color map. This kind of plot is widely used in the study of chemical instabilities like formation of patterns or travelling waves.

Should this not be possible directly "out of the box", is there any way I can save the "cut line" solution at all times in a file and then access it with Matlab or another program to create the space-time plot?

Thanks in advance for your help.

Best

Domenico

4 Replies Last Post 15.11.2013, 08:54 GMT-5
Gunnar Andersson COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 11.11.2013, 02:35 GMT-5
You can do this using a Parametric Extrusion data set:

1. Data Sets > More Data Sets: Add a Parametric Extrusion 1D
2. Change the "Data set" combobox to point to the cut line in the parametric extrusion data set.

If you make a surface plot on this data set, then you get a surface where the x-axis is the cut line's parametrization and the y-axis is the parameter, which in your case is time. You can control the scaling on the y-axis in the Settings section in the parametric extrusion data set.
You can do this using a Parametric Extrusion data set: 1. Data Sets > More Data Sets: Add a Parametric Extrusion 1D 2. Change the "Data set" combobox to point to the cut line in the parametric extrusion data set. If you make a surface plot on this data set, then you get a surface where the x-axis is the cut line's parametrization and the y-axis is the parameter, which in your case is time. You can control the scaling on the y-axis in the Settings section in the parametric extrusion data set.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 15.11.2013, 08:04 GMT-5
Thanks a lot Gunnar, that totally did the trick. Now I have to figure out how can I invert the y axis to have the time pointing downwards.

Also I was wondering how can I change the parameter. I mean, COMSOL automatically chose the parameter as soon as I added the Parametric Extrusion 1D: I could understand it was time because of the values in the y-axis, but I could not see it written anywhere. Now what if I want to have another parameter (like for example a funcion of time - ex. for log plots - or anything else)? But that's just for the sake of knowledge, I already solved my original problem.

Thanks again for your useful help.

Best

Domenico
Thanks a lot Gunnar, that totally did the trick. Now I have to figure out how can I invert the y axis to have the time pointing downwards. Also I was wondering how can I change the parameter. I mean, COMSOL automatically chose the parameter as soon as I added the Parametric Extrusion 1D: I could understand it was time because of the values in the y-axis, but I could not see it written anywhere. Now what if I want to have another parameter (like for example a funcion of time - ex. for log plots - or anything else)? But that's just for the sake of knowledge, I already solved my original problem. Thanks again for your useful help. Best Domenico

Gunnar Andersson COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 15.11.2013, 08:24 GMT-5

Thanks a lot Gunnar, that totally did the trick. Now I have to figure out how can I invert the y axis to have the time pointing downwards.

Also I was wondering how can I change the parameter. I mean, COMSOL automatically chose the parameter as soon as I added the Parametric Extrusion 1D: I could understand it was time because of the values in the y-axis, but I could not see it written anywhere. Now what if I want to have another parameter (like for example a funcion of time - ex. for log plots - or anything else)? But that's just for the sake of knowledge, I already solved my original problem.


The parameter is chosen automatically as the parameter that you solved for (time in your case). It currently isn't possible to transform the extrusion such as negating or taking the logarithm. This is something that we have considered but not yet implemented.



[QUOTE] Thanks a lot Gunnar, that totally did the trick. Now I have to figure out how can I invert the y axis to have the time pointing downwards. Also I was wondering how can I change the parameter. I mean, COMSOL automatically chose the parameter as soon as I added the Parametric Extrusion 1D: I could understand it was time because of the values in the y-axis, but I could not see it written anywhere. Now what if I want to have another parameter (like for example a funcion of time - ex. for log plots - or anything else)? But that's just for the sake of knowledge, I already solved my original problem. [/QUOTE] The parameter is chosen automatically as the parameter that you solved for (time in your case). It currently isn't possible to transform the extrusion such as negating or taking the logarithm. This is something that we have considered but not yet implemented.

Gunnar Andersson COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 15.11.2013, 08:54 GMT-5

Thanks a lot Gunnar, that totally did the trick. Now I have to figure out how can I invert the y axis to have the time pointing downwards.


You can probably achieve this transformation by using a Mirror data set and let the mirror axis be the t=0-axis.


[QUOTE] Thanks a lot Gunnar, that totally did the trick. Now I have to figure out how can I invert the y axis to have the time pointing downwards. [/QUOTE] You can probably achieve this transformation by using a Mirror data set and let the mirror axis be the t=0-axis.

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.