Calculate mass flow rate during run time in OpenFOAM
Hi all!
I am using the icoUncoupledKinematicParcel solver for a simple hopper-particle simulation. I have used "manual injection" and I need the mass flow rate through a specific plane in the hopper during its emptying. But when I try to do it through ParaView, I get U(0,0,0) (if I use slice -> integrate variables -> calculator). Does anyone know how to calculate the value of U or MFR through a plane or rectify this error? Thanks for any help! |
You could add a function to system/controlDict which outputs the massflow in the directory postProcessing:
Code:
functions If you want do this on a plane inside the fluid domain, you could try an internal baffle. |
Hi @jherb,
I tried both these options. I still get phi=0 at each time step in the outlet file. Any other way to solve this? Thank you! |
Which version of OpenFOAM are you using? Have a look at the source code of your solver (icoUncoupledKinematicParcel?) and check which field is used the flux. Then use that field in the functions object. Also did you get a postProcessing folder at all? The example I gave you outputs the values only every 100th time step. Change the value of writeInterval to 1.
|
I am using OpenFOAM-dev for ubuntu. It looks like phi is velocity,U in icoUncoupledKinematicParcel.
I did get a postProcessing folder but all values of phi were zero at each 100 timesteps. Even when I reduce the timesteps to 1 it is zero. I am not sure what is wrong. The magnitude of U in paraView is not zero though. The particles have velocity. |
Hello aishk,
In the example given by jherb, the function object computes the fluid flowrate, since phi refers to the fluid flux. The flux might be 0 in your case if you have a static fluid and if particles are just transported thanks to gravity and/or injection velocity. (this is what happens in the original hopper tutorial) Since you want data related to particles, you need to use cloudFunctions, which are defined in your kinematicCloudProperties file. Among other cloud functions, facePostProcessing might do what you want : Code:
Class Code:
cloudFunctions Have fun, Yann |
All times are GMT -4. The time now is 05:10. |