|
[Sponsors] |
RTD analysis, Plotting average/velocity weighted average concentration at outlet |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 13, 2016, 07:55 |
RTD analysis, Plotting average/velocity weighted average concentration at outlet
|
#1 |
Member
Sing
Join Date: Jan 2016
Posts: 30
Rep Power: 10 |
Hello Everyone,
I am considerable new to openFOAM and I have been trying to do RTD analysis using openFOAM from last few days. I took the example case of scalarTransportFoam (pitzDaily). I wanted to plot the trademark RTD curve for the concentration at the outlet. I read the post from Daniel: http://www.cfd-online.com/Forums/ope...tml#post413277 And accordingly I put the following code in the controlDict to get the velocity weighted average concentration at outlet using patchMassFlowAverged function object from simpleFunctionObjects. Code:
functions ( massFlowAverage { type patchMassFlowAverage; //patchIntegrate; //patchAverage; functionObjectLibs ( "libsimpleFunctionObjects.so" ); verbose true; fields (T); patches ( OUTLET ); factor 1.0; outputControl timeStep; outputInterval 1; } ); Code:
DILUPBiCG: Solving for T, Initial residual = 9.99425e-07, Final residual = 9.99425e-07, No Iterations 0 Averages of T : Time = 8.6019 DILUPBiCG: Solving for T, Initial residual = 9.99425e-07, Final residual = 9.99425e-07, No Iterations 0 Averages of T : Time = 8.602 DILUPBiCG: Solving for T, Initial residual = 9.99425e-07, Final residual = 9.99425e-07, No Iterations 0 Averages of T : Time = 8.6021 In the folder postProcessing I am getting a file with only time values in it (no concentration value). I also tried to run execFlowFunctionObjects and I got following error: Code:
Time = 0.43 Reading phi Reading U Reading p --> FOAM Warning : --> FOAM FATAL IO ERROR: cannot find file file: /home/1016914/Mangal_scalar/pitzDaily/0.43/p at line 0. From function regIOobject::readStream() in file db/regIOobject/regIOobjectRead.C at line 73. Code:
Time = 0.11 Operating in no-flow mode; no models will be loaded. All vol, surface and point fields will be loaded. Reading volScalarField T Reading volVectorField U Reading surfaceScalarField phi I know that I am missing something very basic. I would be very grateful if anyone can help me in this matter. Thanks and regards, Singh. |
|
September 14, 2016, 01:00 |
Found my mistake!
|
#2 |
Member
Sing
Join Date: Jan 2016
Posts: 30
Rep Power: 10 |
Hello Everyone,
Before anyone else makes fun of me, it will be right for me to point out my mistake.. It is all working fine. Sorry for the chaotic post, I just entered wrong patch name. It should be 'outlet' instead of OUTLET. THATS IT!! |
|
August 16, 2018, 19:39 |
Calculating Average T and RTD
|
#3 |
Member
Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9 |
Hello,
I am doing tutorial 10 from the 3 week tutorial series. It is the RTD tutorial in the series but called tutorial 10. The author used "ratio of that scalar mass inlet to the whole mass inlet" to calculate average T: http://cfd.at/downloads/FoamTutV4_10-ExampleTen.pdf on page with "Average value of T on the outlet for two inlets versus time" graph. I would like to know what the scalar mass inlet and whole mass inlet is. Is the scalar the "current" time and the whole mass the value placed in the documentation for "T"? When calculating RTD, the author states: "Next, to obtain the RTD plots, simply calculate the gradient of change in average value of T on the outlet from time 0 to 120s, export the data to Excel, and plot the results." I would like to know how to calculate the gradient of change. Thanks in advance. Last edited by HappyS5; August 16, 2018 at 22:49. |
|
August 21, 2018, 20:03 |
Figured out how to plot integrated variables.
|
#4 | |
Member
Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9 |
Quote:
In truth, I just needed to read the tutorial better. I was blind or something. Anyhow, I was able to Integrate Variables and then plot that data over time after I selected the row of integrated data that I wanted to graph over time. Now, I need to read and understand the description of how to calculate the RTD data but the description is not as clear to me now. See above. |
||
October 15, 2018, 15:21 |
Calculating RTD
|
#5 | |
New Member
Join Date: Oct 2018
Posts: 1
Rep Power: 0 |
Quote:
Thanks. |
||
October 15, 2018, 18:53 |
|
#6 | |
Member
Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9 |
Quote:
If you figure it out, please post it here. |
||
October 16, 2018, 04:26 |
|
#7 |
Member
Sing
Join Date: Jan 2016
Posts: 30
Rep Power: 10 |
Hello Everyone here,
Sorry I have very little experience with multiple inlets and outlets case. I have plotted the RTD graph for a single inlet and outlet case. I used the 'function' utility of OpenFOAM to extract the required data at the outlet. That is: I have defined a funcitonObject: 'massFlowAverage' of type 'patchMassFlowAverage' to calculate the concentration at the 'outlet' patch. Then I did the required calculations in python to plot and analyze the RTD curve obtained like: Melf Flow Characterisation in Continuous Casting Tundishes, Sahai and EMI (1996) Note: In order to normalize the Concentration to E_theta and Time to theta I used exit age function, Tmean. Basically I have multiplied my exit age function with Tmean to get the normalized concentration that is E_theta and I have divided Time by Tmean to get the normalized time that is Theta. Sorry for the confusing post. I did this thing a long time back. Thanks and Regards, PS |
|
November 2, 2018, 16:20 |
|
#8 | |
New Member
Join Date: Nov 2018
Posts: 1
Rep Power: 0 |
Quote:
Hi All, I'm an OpenFOAM newbie too, but found this thread while searching for a solution to this very problem. I was doing the 'Tutorial Ten' for RTD, but I could not work out how to calculate/export the gradient. In the end, I managed it, but I'm not sure how. I thought I would write here what I think I did and perhaps someone can recreate my steps and confirm if this is correct. When I integrated the variables, this worked as expected and I could create the plots for T against time, within Paraview. However, my spreadsheet window (within Paraview) would only display the single value for the selected timestep. If I exported the data only the single displayed value would be exported into a spreadsheet. Within filters, I found the gradient filter, bit this was greyed out, requesting VTKImage data. I do not know what this is yet, I havent got that far through the tutorials. But, below 'Gradient' is 'Gradient of Unstructured Data' and I thought I would explore to see if this would work. I got myself in a bit of a mess and decided/had to delete from the Pipeline Browser, the outletVTK trees, and start again. This time when I loaded the VTK files for the outlet, and then integrated the variables, the Paraview Spreadsheet window has a complete table with all 120 seconds of data. I could export this to (in my case) Libreoffice and produce the graphs at the end of the tutorial pdf. I honestly have no idea what I changed, but now I can not return to the single data point with in the paraview spreadhsset view of integrated variables - the table is there all the time. Which is good, but I do not know what I did. |
||
November 27, 2018, 04:23 |
|
#9 |
Senior Member
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 11 |
I've done several RTD calculations for single inlet/outlet cases using OpenFoam, Paraview and Matlab on basis of the mentioned tutorial. The workflow is as follows:
1. Conduct your simulation 2. Open your results in paraview and select the cells of your outlet patch. This is done using "select cells on". It's a bit easier if you only load the target patch and not the whole internal mesh. 3. With the cells selected use the "Integrate variables" filter. A spreadsheet window will open. 4. Select the spreadsheet window and use "Plot Selection Over Time". This might take some time, after which a plot window will open. 5. Select the plot window and "Save Data" as .csv . The data can be further processed with Matlab/Python/whateverfloatsyourboat. Calculating the first derivative (e.g. with Matlabs diff() function) of the scalar results in the arrival rates at the selected patch.
__________________
If you liked my answer to your question, please consider leaving a "Like" in return |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mass weighted average temperature along a curve | preetam69 | FLUENT | 1 | July 5, 2013 02:48 |
Area(or mass)-weighted average vs. time at an outlet | enoch | OpenFOAM Post-Processing | 5 | May 24, 2012 12:15 |
area weighted average | anif hidayatullah | Main CFD Forum | 2 | April 7, 2010 13:47 |
VOF Outlet boundary condition in cfd - ace | JM | Main CFD Forum | 0 | December 15, 2006 08:07 |
area weighted average | Sireesha Pasari | FLUENT | 1 | April 4, 2004 13:06 |