|
[Sponsors] |
Calculate mass flow rate during run time in OpenFOAM |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 21, 2019, 17:27 |
Calculate mass flow rate during run time in OpenFOAM
|
#1 |
New Member
Aishwarya Krishnan
Join Date: Apr 2019
Posts: 6
Rep Power: 7 |
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! |
|
May 22, 2019, 10:00 |
|
#2 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
You could add a function to system/controlDict which outputs the massflow in the directory postProcessing:
Code:
functions { outletMassFlowYourPatch { type surfaceFieldValue; functionObjectLibs ("libfieldFunctionObjects.so"); enabled true; writeControl timeStep; writeInterval 100; log true; writeFields false; regionType patch; name yourPatch; operation sum; fields ( phi ); } } If you want do this on a plane inside the fluid domain, you could try an internal baffle. |
|
May 23, 2019, 19:41 |
|
#3 |
New Member
Aishwarya Krishnan
Join Date: Apr 2019
Posts: 6
Rep Power: 7 |
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! |
|
May 24, 2019, 05:11 |
|
#4 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
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.
|
|
May 24, 2019, 13:45 |
|
#5 |
New Member
Aishwarya Krishnan
Join Date: Apr 2019
Posts: 6
Rep Power: 7 |
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. |
|
May 27, 2019, 08:03 |
|
#6 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,207
Rep Power: 28 |
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 Foam::FacePostProcessing Description Records particle face quantities on used-specified face zone Currently supports: accummulated mass average mass flux Code:
cloudFunctions { myPostProcessing1 { type facePostProcessing; surfaceFormat none; resetOnWrite no; log yes; faceZones ( myPlaneFaceZone ); } } Have fun, Yann Last edited by Yann; May 27, 2019 at 11:19. Reason: typo |
|
Tags |
mass flow rate, openfoam 1.5-dev, postprocessing mass flow |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Match Pressure Inlet/Outlet Boundary Condition Mass Flow Rate | MSchneid | Fluent UDF and Scheme Programming | 3 | February 23, 2019 07:00 |
mass flow inlet and pressure outlet with target mass flow rate | Zigainer | FLUENT | 13 | October 26, 2018 06:58 |
Multiphase flow - incorrect velocity on inlet | Mike_Tom | CFX | 6 | September 29, 2016 02:27 |
Exit Corrected Mass Flow Rate Mesh Sensitivity Study | s__s__s | CFX | 4 | July 20, 2016 12:46 |
Periodic channel flow with time dependent mass flow rate | QBeast | FLUENT | 3 | May 10, 2013 14:14 |