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.

Calculating and plotting the fluid flux over a surface

Please login with a confirmed email address before reporting spam

Hello,

I am modeling fluid flow in a network with a single input and multiple parallel outputs. The inlet is at a given pressure and the outlets are at zero pressure. I would like to calculate the fluid flux (volumetric flow rate) across the inlet and the outlets.

I started by going to Definitions > Model Couplings > Integration. I created a separate integration for the inlet and each outlet. I added the respective boundary to each Integration. I basically followed the procedure outlined in this video at around the 10 minute mark: www.comsol.com/video/359/

Following the video, I went to Study > Update Solution (I had already computed the solution), then I went to Results > 1D Plot Group, then 1D Plot Group > Global. In the Global plot I added the Integrations for the inlet and outlets under the y-Axis Data. E.g. inlet(spf.U), outlet1(spf.U), outlet2(spf.U), etc. The plot showed data that seemed to make sense (the outlets summed was about equal to the inlet). However, the ideal form for the data would be a two columned table with the boundary in the first column and the volumetric flow rate in the other. I want the exact numerical value as opposed to a dot on a graph.

Does anyone know how to do this? Using a Table Graph plot instead of a Global plot didn't seem to be what I wanted.

Thanks,
Steve


2 Replies Last Post 09.08.2012, 11:33 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 05.08.2012, 16:34 GMT-4
I believe I have made some progress:

Instead of creating a 1D plot, Under results, I chose Export > Data. In the Data dialogue box, I entered the names of the Integrations as the expressions (e.g. inlet(spf.U), outlet1(spf.U), outlet2(spf.U), etc.) as the expressions.

Under the Output section of the Data box, I chose a filename and location to save the file, and I set
Points to evaluate in: Take from data set
Data format: Spreadsheet
Space dimension: Take from data set
Geometry level: Take from data set

I left the Advanced section as the default parameters.

This yielded what I wanted: the volumetric flow rates of my 1 inlet and 8 individual outlets in numerical form (3 sig fig precision). However, instead of giving me just 9 data points, it gave me those same exact 9 values for about 52 000 different XYZ locations. I do not understand why. (the number of elements in the mesh is only 30,000)

This isn't a big deal, since I get he information I'm looking for, but the file is about 52,000 times larger than it needs to be. Can someone please explain the extraneous information in the file?

I then changed the Data set (in the Data section of the Data box) from Solution 1 to Surface 1 and re-exported. This time there are only ~11,000 redundant rows. This is a little better (I don't understand why), but it's still larger than it needs to be.
I believe I have made some progress: Instead of creating a 1D plot, Under results, I chose Export > Data. In the Data dialogue box, I entered the names of the Integrations as the expressions (e.g. inlet(spf.U), outlet1(spf.U), outlet2(spf.U), etc.) as the expressions. Under the Output section of the Data box, I chose a filename and location to save the file, and I set Points to evaluate in: Take from data set Data format: Spreadsheet Space dimension: Take from data set Geometry level: Take from data set I left the Advanced section as the default parameters. This yielded what I wanted: the volumetric flow rates of my 1 inlet and 8 individual outlets in numerical form (3 sig fig precision). However, instead of giving me just 9 data points, it gave me those same exact 9 values for about 52 000 different XYZ locations. I do not understand why. (the number of elements in the mesh is only 30,000) This isn't a big deal, since I get he information I'm looking for, but the file is about 52,000 times larger than it needs to be. Can someone please explain the extraneous information in the file? I then changed the Data set (in the Data section of the Data box) from Solution 1 to Surface 1 and re-exported. This time there are only ~11,000 redundant rows. This is a little better (I don't understand why), but it's still larger than it needs to be.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 09.08.2012, 11:33 GMT-4
I've made some more progress:

In the Data box, in the Output section, I initially used the following settings:
Pts to evaluate in: Take from data set
Data format: Spreadsheet
Space dimension: Take from data set
Geometry level: Take from data set

Since my model is 3D, the geometry level was a volume and it was creating a row for each volume elelement. I switched this to geometry level "Point" and reduced the number of rows from several tens of thousands to a handful. This is still more than the 1 row I need, but it's nicer.

I also tried changing the "Points to evaluate in" setting from Take from data set to "Grid" or "Regular grid" for the number of X,Y and Z points I choose (1,1,1). This created an output file with a single row. Great! However, something was odd. Typically the data columns had headers like input(spf.U) m^3/s and below it woudl be the value. But with this setting the there were two columns one for "input(spf.U) and the other was "m^3/s". The value under input.(spf.U) looked correct except it had no power of ten + exponent. The value under m^3/s was some odd number that didn't make sense.
I've made some more progress: In the Data box, in the Output section, I initially used the following settings: Pts to evaluate in: Take from data set Data format: Spreadsheet Space dimension: Take from data set Geometry level: Take from data set Since my model is 3D, the geometry level was a volume and it was creating a row for each volume elelement. I switched this to geometry level "Point" and reduced the number of rows from several tens of thousands to a handful. This is still more than the 1 row I need, but it's nicer. I also tried changing the "Points to evaluate in" setting from Take from data set to "Grid" or "Regular grid" for the number of X,Y and Z points I choose (1,1,1). This created an output file with a single row. Great! However, something was odd. Typically the data columns had headers like input(spf.U) m^3/s and below it woudl be the value. But with this setting the there were two columns one for "input(spf.U) and the other was "m^3/s". The value under input.(spf.U) looked correct except it had no power of ten + exponent. The value under m^3/s was some odd number that didn't make sense.

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.