Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Export water table time series data from periodic Richards equation solution

Please login with a confirmed email address before reporting spam

Hi,

is there an (easy) way to export a time series of the water table elevation (p=0 contour) from a time-dependent (periodic) Richards equation model?

I have a 2D vertical rectangular grid with a periodic boundary condition at one end which drives a pressure wave through the porous media domain and I would like to analyse the characteristics of the water table fluctuations as a function of x and t. At present, I am using mphinterp via the Matlab interface to access the spatio-temporal grid of the pressure distribution from the solution and then interpolating using Matlab to find the watertable, wt(x,t). This is a bit cumbersome and I am wondering if it can be generated as part of the Comsol result processing? It seems I can only export the p=0 contour for a single time step (?)

Any ideas would be appreciated.

Cheers,
Nick

2 Replies Last Post 28 juin 2013, 21:28 UTC−4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 28 juin 2013, 18:47 UTC−4
I have had some success in exporting time series data using the following method:

Method 1: You can right click on your time domain data set under Results>Data Sets>Solution 3 (for example) and click "Add data to export". This will bring up a window which allows you to select the data you want to export and for which time steps. Once configured, don't forget to click the export data button at the top of the window to produce the data file. This is a very streamlined process, however, for time series data sets it exports the time step data in the header information as text and not as a column of data. See below for an alternate method.

Method 2: Right click Data Sets to create a Cut Point evaluation from your time series solution. From the Cut Point window, you can request coordinates that vary over the space interested in your model. This works well for a stationary point. I have not been able to get it to work for a point moving in space and time. Right Click on Derived Values to create a point evaluation from your defined Cut Point data set. Evaluate and display results as a new table. Here your time series appears as the first column in your table. Export the table as a txt file.

If anyone else knows how to specify a point moving in space and time, that would be very helpful.

Merci beaucoup.

--
Heidi Fuqua
I have had some success in exporting time series data using the following method: Method 1: You can right click on your time domain data set under Results>Data Sets>Solution 3 (for example) and click "Add data to export". This will bring up a window which allows you to select the data you want to export and for which time steps. Once configured, don't forget to click the export data button at the top of the window to produce the data file. This is a very streamlined process, however, for time series data sets it exports the time step data in the header information as text and not as a column of data. See below for an alternate method. Method 2: Right click Data Sets to create a Cut Point evaluation from your time series solution. From the Cut Point window, you can request coordinates that vary over the space interested in your model. This works well for a stationary point. I have not been able to get it to work for a point moving in space and time. Right Click on Derived Values to create a point evaluation from your defined Cut Point data set. Evaluate and display results as a new table. Here your time series appears as the first column in your table. Export the table as a txt file. If anyone else knows how to specify a point moving in space and time, that would be very helpful. Merci beaucoup. -- Heidi Fuqua

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 28 juin 2013, 21:28 UTC−4
Hi Heidi,

thanks for your response.

I can export the watertable (p=0 countour) profile as a function of x for a single time step similarly to your method 1 but get an "unable to ..." error message when trying to export multiple time steps at once.

My current work around is essentially the same as your method 2. ie since I know the range of expected (x,y,t) watertable locations based on my boundary condition, I can export results using a Cut Point data set p(x,y,t) grid which covers this range. I then determine the p=0 contour elevation as a function of x and t via interpolation in Matlab.

Would be nice if there was a way to export the p=0 contour as a function of time as well as space directly from Comsol?

Cheers,
Nick

Hi Heidi, thanks for your response. I can export the watertable (p=0 countour) profile as a function of x for a single time step similarly to your method 1 but get an "unable to ..." error message when trying to export multiple time steps at once. My current work around is essentially the same as your method 2. ie since I know the range of expected (x,y,t) watertable locations based on my boundary condition, I can export results using a Cut Point data set p(x,y,t) grid which covers this range. I then determine the p=0 contour elevation as a function of x and t via interpolation in Matlab. Would be nice if there was a way to export the p=0 contour as a function of time as well as space directly from Comsol? Cheers, Nick

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.