Area(or mass)-weighted average vs. time at an outlet
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. |
Quote:
|
swak4Faom and pyFoamTimelinePlot.py
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:$ |
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 |
calcualte flow rate
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"; } |
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 |
All times are GMT -4. The time now is 00:58. |