CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Mass flow discrepancy (https://www.cfd-online.com/Forums/cfx/134409-mass-flow-discrepancy.html)

BenMUC April 29, 2014 08:11

Mass flow discrepancy
 
Hey guys,

I need your help again. I'm modeling the resin flow inside a carbon fiber weave, but that isn't the problem. I finished my simulations and while collecting all the info from CFX Post, I also wanted to check the mass flow through the domain, just to check if it seems plausible. Both inlet and outlet of the weave are modeled as flat surfaces.

In general mass flow is:
- for flat surfaces: m_dot = rho * v_m * A
- for curved surfaces: m_dot = SS rho * v dA = SS rho * v * n dA
( please read SS as double integral and bold letters as vectors )

To get the mass flow from CFX I used the massflow function:
=massflow()@Inlet -> 3.814e-06 [kg s^-1]
=massflow()@Outlet -> -3.814e-06 [kg s^-1]

Then I wanted to compare the mass flow to the one I calculated manually ( using MS Excel ):
At first I used CFX Post to get the surface area and the average velocity, density is already known because I defined the fluid myself:
=area()@Inlet -> 3.272e-07 [m^2]
=area()@Outlet -> 3.302e-07 [m^2]
=areaAve(Velocity)@Inlet -> 9.271e-03 [m s^-1]
=areaAve(Velocity)@Outlet -> 9.261e-03 [m s^-1]

Then I used m_dot = rho * v_m * A to calculate the mass flow and got 3.337e-06 [kg s^-1] on the inlet and 3.364e-06 [kg s^-1] on the outlet.

This should be the same as using the following function:
=areaInt(Density*Velocity)@Inlet -> 3.337e-06 [kg s^-1]
=areaInt(Density*Velocity)@Outlet -> 3.364e-06 [kg s^-1]
Indeed it is. However, as you can see, the mass flow calculated by me is only ~90% of the mass flow calculated by CFX using the massflow function.
What's the reason for the discrepancy?

To check if I'm going by wrong assumptions and that the surface might be curved ( which it shouldn't be ), I used the same approach as described by Rui in this thread.
I inserted an expression called velDOTn, defined as Velocity u*Normal X+Velocity v*Normal Y+Velocity w*Normal Z, then I inserted a variable called NormalVelocity that calls the expression velDOTn.
Then I calculated the mass flow using the following functions:
=areaInt(Density*NormalVelocity)@Inlet -> -3.336e-06 [kg s^-1]
=areaInt(Density*NormalVelocity)@Outlet -> 3.364e-06 [kg s^-1]

As you can see, the results are the same as the ones obtained by the functions above.
What am I missing? :confused:

singer1812 April 29, 2014 09:15

I think Normal Velocity needs to be a vector made up of each of the individual components. It appears you have it as a scaler.

Magnitude of NormalVelocity should be ((u*Normal X)^2+(v*Normal Y)^2+(z*Normal Z)^2)^0.5

Yours isnt.

Opaque April 30, 2014 00:44

You should refer to the ANSYS CFX Solver Theory documentation. The relevant section is

Discretization and Solution Theory / Numerical Discretization / Discretization of the Governing Equations / Mass Flows.

The specifics of how the advecting velocity (mass carrying velocity) is computed is described. To match the mass flow at inlet/outlet/opening/interfaces as discretized, you must use the integration points mass flows (which include the advecting velocity). Those are the mass flows used by CFD-Post to compute the calculator function massFlow()@Locator when available.

As you refine your mesh, your expression should tend to match the one computed by the massFlow()@Locator function..

BenMUC May 2, 2014 03:29

Quote:

Originally Posted by singer1812 (Post 488919)
I think Normal Velocity needs to be a vector made up of each of the individual components. It appears you have it as a scaler.

Magnitude of NormalVelocity should be ((u*Normal X)^2+(v*Normal Y)^2+(z*Normal Z)^2)^0.5

Yours isnt.

But I want the scalar product of vectors v und n, don't I? What you proposed looks like I combine the elements of the vectors like in the scalar product first, so I somehow get a new vector, and then I apply the Euclidean norm to get the magnitude of the resulting vector. However, the result of the scalar product shouldn't be another vector. Am I totally missing something right now, because that doesn't make sense to me...

Quote:

Originally Posted by Opaque (Post 489043)
You should refer to the ANSYS CFX Solver Theory documentation. The relevant section is

Discretization and Solution Theory / Numerical Discretization / Discretization of the Governing Equations / Mass Flows.

The specifics of how the advecting velocity (mass carrying velocity) is computed is described. To match the mass flow at inlet/outlet/opening/interfaces as discretized, you must use the integration points mass flows (which include the advecting velocity). Those are the mass flows used by CFD-Post to compute the calculator function massFlow()@Locator when available.

As you refine your mesh, your expression should tend to match the one computed by the massFlow()@Locator function..

Thanks for the hint, so basically the expressions I posted above aren't wrong, but I'm not using the correct ( advecting ) velocity to calculate the mass flow and the discrepancy is due to the mesh I'm using, right?

That makes sense, I've calculated the mass flow rates for another ( simpler ) geometry I've also simulated and the discrepancy is only in the range of 0.5 to 2%, using the same expressions given above.


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