|
[Sponsors] |
Area(or mass)-weighted average vs. time at an outlet |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 22, 2012, 18:22 |
Area(or mass)-weighted average vs. time at an outlet
|
#1 |
Member
Jeong Kim
Join Date: Feb 2010
Posts: 42
Rep Power: 16 |
Dear foamers,
I am sorry for a redundant question about plotting aveaged quantity vs. time at an outlet, but I could not find a helpful posting to me. I'd like to plot area(or mass)-weighted average with time at the outlet. I need it to check if the solution is steady-state and for post-processing work. Thanks in advance for your help. |
|
May 22, 2012, 19:32 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
May 23, 2012, 18:03 |
swak4Faom and pyFoamTimelinePlot.py
|
#3 | |
Member
Jeong Kim
Join Date: Feb 2010
Posts: 42
Rep Power: 16 |
Quote:
I've found that swak4Foam include that library. I tried to run one example available in the examples directory of swak4Foam. I could not see a plot using pyFoamTimelinePlot.py. I've already installed pyFoam. Why can't I see the plot? Below is log information that I capture. === jeong@pulsedPitzDaily:$ pyFoamTimelinePlot.py . --dir=patchMassFlows_massFlowSimple --basic-mode=lines set term png nocrop enhanced set xrange [1e-05:0.02929] set output "patchMassFlows_massFlowSimple_writeTime_0_Value_m assFlow.png" set title "Directory: patchMassFlows_massFlowSimple WriteTime: 0 Value: massFlow" plot "./patchMassFlows_massFlowSimple/0/massFlow" using 1:2 title "inlet" with lines , "./patchMassFlows_massFlowSimple/0/massFlow" using 1:3 title "outlet" with lines jeong@pulsedPitzDaily:$ |
||
May 24, 2012, 09:10 |
|
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Code:
pyFoamTimelinePlot.py . --dir=patchMassFlows_massFlowSimple --basic-mode=lines | gnuplot The advantage of this is that you have all the flexibility of the Gnuplot-command line if you want it: redirect the output to a file. Change the options (scale logarithmic, set tics, etc). THEN plot |
||
May 24, 2012, 11:37 |
calcualte flow rate
|
#5 | |
Member
Jeong Kim
Join Date: Feb 2010
Posts: 42
Rep Power: 16 |
Quote:
Thank you for your further tip. I wanted to plot flow rate in time at the inlet and outlet (alpha*phia and beta*phiab) in two phase flows. How can I calculate the quantity in the two phase problems. Below is the script for a single phase flow. Thanks in advance for your help. massFlowSwak { type patchExpression; verbose true; accumulations ( sum ); patches ( inlet outlet ); expression "phi"; } |
||
May 24, 2012, 12:15 |
|
#6 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Code:
expression "alpha*phia+beta*phib"; Code:
expression "phia+phib"; You can use ANY field in the expression. It only has to be there under that name. That is the only limitation. Whether it makes phyiscal sense is another thing |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
transsonic nozzle with rhoSimpleFoam | Unseen | OpenFOAM Running, Solving & CFD | 8 | July 1, 2022 06:54 |
Multiple floating objects | CKH | OpenFOAM Running, Solving & CFD | 14 | February 20, 2019 09:08 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 06:20 |
Time Average Vs Ensemble Average | Mohsin | FLUENT | 1 | December 4, 2013 03:48 |
AMG versus ICCG | msrinath80 | OpenFOAM Running, Solving & CFD | 2 | November 7, 2006 15:15 |