CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   is there a post processing keyword for obtaining mass flow rate and total mass? (https://www.cfd-online.com/Forums/openfoam-post-processing/115525-there-post-processing-keyword-obtaining-mass-flow-rate-total-mass.html)

wyldckat April 10, 2013 16:47

I'll try to look into it this weekend.

immortality April 12, 2013 13:30

dear Bruno its the begining of weekend in your place!:D
please see how can modifying calcMassFlow.thanks.

wyldckat April 14, 2013 06:48

FYI: I've updated the post #18: http://www.cfd-online.com/Forums/ope...tml#post418748

immortality April 14, 2013 07:14

thank you so much dear Bruno.
I'll test it a tell you.
Why rho is there in comment?
My case is compressible.its not necessary for me,is it?

wyldckat April 14, 2013 07:22

Quote:

Originally Posted by immortality (Post 420398)
Why rho is there in comment?
My case is compressible.its not necessary for me,is it?

If you check the example file "calcMassFlowDict" that is in the attached tarballs on post #18, you'll see these lines:
Code:

// Factor to multiply the results with (for symmetric or axial cases)
// scaleFactor 72.;

// Density for incompressible cases
// rho rho [1 -3 0 0 0 0 0] 0.41;

So I can only guess that you can leave that line commented... although I would suggest that you first confirm with a case that you fully know of what goes in and what goes out...

immortality April 14, 2013 11:56

it works nice.the output is like what swak4Foam run time function gives.
but how can increase time step decimal numbers? and if it can be done that a summation on phi's multiply to time step is outputted then total mass on each patch is obtained in the whole time (like: Total Mass = SUM(mass_flow_rate * time_step_size) ) and it is not required to external softwares. could you please have a look into this work? and it will be fully completed;)
thanks.

wyldckat April 14, 2013 13:08

Unfortunately I'm not 100% certain if I understand your request correctly.
If the time step is now of fixed size, then you only need to define "scaleFactor" accordingly.
If the time step varies... it depends on whether you've saved all of the iterations or not... because with only a few iterations, it will lead to a non-measurable error...

... wait... you want the summation of all results... and place it were?.. I guess at the bottom of the file...

If the time step is fixed, you'll be the one assuming the resulting error isn't relevant. Otherwise, you should have calculated this while the solver is running, not after it's finished.

I'll try to see if I can still implement this today. Otherwise, it will have to wait till next weekend.

immortality April 20, 2013 08:05

I use adjustableRunTime.I think it could be possible to multiply each value in column right to difference of value of column left(time)and its before time(upper value) to program.
yes at the end of file or better at a time that user specifies when execute calcMassFlow in terminal in seconds (like:calcMassFlow .002)
:rolleyes:

immortality July 4, 2013 16:49

Hi Bruno
I executed calcMassFlow on a case but this showed:
Code:

Create time

fileName::stripInvalid() called for invalid fileName UntitledFolder
    For debug level (= 2) > 1 this is considered fatal
Aborted


immortality July 6, 2013 01:08

it resolved.an untitled folder had been created accidently in the case folder.


All times are GMT -4. The time now is 19:30.