is there a post processing keyword for obtaining mass flow rate and total mass?
I was searching about a function to calculate mass flow rate during the run.now i need to calculate mass flow rate and also total mass entering in or exiting from a patch after the end of run.does anyone know the related keyword or way to do this?
|
Quote:
Hi, Try this code from Mr.Prasant Code:
functions |
thank you.then type massflow in the terminal?
|
Quote:
Regards, |
i think this add mass flow rates in new time folders.is there a way to calculating it after the run has done?like keywords Mach,Pe,vorticity,etc in postProcessing?
|
can write phi in previous time folders?
|
Quote:
Regards, |
do you know what does valueOutput mean and why is set to false?
|
Quote:
Regards, |
how to obtain mass balance after run?
i want a code that can calculate net mass on patches(add mass inflow and outflow on patches) preferably in a time period.
|
Check out the patchAverage and patchIntegrate utilities. They should be able to do what you need.
|
how can move this thread to post processing forum to get more helps and answers?
|
patchAverage and patchIntegrate doesn't work on surfaceScalarFields.
any idea? thanks. |
whats the command for calculating mass flow?
I was searching about a function to calculate mass flow rate during the run.now i need to calculate mass flow rate and also total mass entering in or exiting from a patch after the end of run.does anyone know the related keyword or way to do this?
|
Greetings to all,
I've moved this thread to the post-processing forum. And to quote my answer from a few minutes ago on another thread: Quote:
Bruno PS: also moved a few other related posts/threads started by Ehsan... |
thank you dear Bruno for moving!
the thread gives this error in compiling as I put in Cp thread for more convenience of readers: Code:
ehsan@Ehsan-com:~/Desktop/calcMassFlow$ wmake if mass flow trouble resolves almost my work can be finished successfully. |
is it possible to use a mass flow rate and/or summation of mass on patches during an interval code for compiling?
|
2 Attachment(s)
Hi Ehsan,
Just a little pointer before continuing to the issue with calcMassFlow - simpleFunctionObjects can easily be used for calculating the mass flow during run: http://www.cfd-online.com/Forums/ope...tml#post418739 - although I vaguely remember you writing somewhere about how you need to calculate it after the solver had already been executed. So, moving onto the adaptation of calcMassFlow to OpenFOAM 2.2:
_________________________ Edit: as per requested, I've managed to create a variant that writes to file instead of the standard output. Based on the instructions above, here's the ones for calcMassFlow2File to OpenFOAM 2.2:
Best regards, Bruno |
Thank you dear Bruno.it works.i put the results in a log file.
is it possible that all left flow rate values be writed separately and after ending of left values right values be writed too. like: left: time0 value0 time1 value1 time2 value2 . . . right: time0 value0 time1 value1 time2 value2 |
could you please do some modifications in very useful (i think the sole)post processing tool for calculating mass flow rate to write in a file with a good order?then it will be a complete nice tool for anyone to refer to(and specially for me ;) )
|
I'll try to look into it this weekend.
|
dear Bruno its the begining of weekend in your place!:D
please see how can modifying calcMassFlow.thanks. |
FYI: I've updated the post #18: http://www.cfd-online.com/Forums/ope...tml#post418748
|
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? |
Quote:
Code:
// Factor to multiply the results with (for symmetric or axial cases) |
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. |
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. |
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: |
Hi Bruno
I executed calcMassFlow on a case but this showed: Code:
Create time |
it resolved.an untitled folder had been created accidently in the case folder.
|
All times are GMT -4. The time now is 06:55. |