|
[Sponsors] |
August 1, 2019, 00:10 |
Defining velocity as a function of density
|
#1 |
Member
Hamda
Join Date: Jul 2018
Posts: 80
Rep Power: 8 |
Hello,
I am working on a problem in which mass flow rate is constant. I specified mass flow rate in "inlet" boundary condition. But after seeing the results (velocity and density) I realized that the mass flow rate wasn't constant. It should be mentioned the fluid is helium and it is considered as an ideal gas. Now I was wondering how I can define mass flow rate as a constant value into pre CFX or if I can't do that, How can I define velocity or density as a function of each other to keep mass flow rate constant. Many thanks in advance |
|
August 1, 2019, 00:36 |
|
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,852
Rep Power: 144 |
Then use a mass flow rate inlet. Isn't that obvious? Or is there some problem with this option?
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
August 1, 2019, 02:24 |
|
#3 |
Member
Hamda
Join Date: Jul 2018
Posts: 80
Rep Power: 8 |
||
August 1, 2019, 02:43 |
|
#4 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,852
Rep Power: 144 |
So isn't the question then why is your mass flow rate apparently changing?
How are you calculating mass flow rate? Please attach an image of your geometry and your output file.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
August 1, 2019, 09:07 |
|
#5 |
Senior Member
Erik
Join Date: Feb 2011
Location: Earth (Land portion)
Posts: 1,186
Rep Power: 23 |
Mass flow rate should be constant, your solution is most likely not converged, or you arte calculating something wrong.
|
|
August 1, 2019, 09:29 |
|
#6 |
Member
Hamda
Join Date: Jul 2018
Posts: 80
Rep Power: 8 |
My calculation was converged and I checked the mass flow rate by evaluating density and velocity. Since mass flow rate is:
density*velocity*A |
|
August 1, 2019, 09:31 |
|
#7 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,852
Rep Power: 144 |
Details matter. Exactly how did you calculate it?
The most accurate way of calculating it is to use the CEL expression massFlow(). What function did you use?
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
August 1, 2019, 09:55 |
|
#8 |
Member
Hamda
Join Date: Jul 2018
Posts: 80
Rep Power: 8 |
I calculated density and velocity assuming A as a constant value. I didn't use any expression for mass flow rate.
|
|
August 1, 2019, 15:16 |
|
#9 |
Senior Member
Erik
Join Date: Feb 2011
Location: Earth (Land portion)
Posts: 1,186
Rep Power: 23 |
We need to know your exact expression.
for example: "ave(Density*Velocity)@Outlet * A" will be wrong, and is mesh dependent. (ave(Density)@Outlet * ave(Velocity)@Outlet)*A will also be wrong, but a different wrong. The mass flow in and out should be properly reported near the end of your out file. you can also check P-mass imbalances in the solver manager to see if it is ~0% |
|
August 1, 2019, 16:49 |
|
#10 | |
Member
Hamda
Join Date: Jul 2018
Posts: 80
Rep Power: 8 |
Quote:
As you see in picture 1 fluid should pass through the spheres and so the mass flow rate area is not constant but for inlet and outlet the area is the same. But as you see the value of "density * velocity" is not the same at inlet and outlet. How can I check P-mass? In pre cfx? I didn't see "solver manager" do you mean solver control? As you see in CFD-post , the value of mass flow rate is unknown. |
||
August 1, 2019, 17:51 |
|
#11 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,852
Rep Power: 144 |
This is a classic example of an XY problem: http://xyproblem.info/
Your original question was how to make velocity a function of pressure, but the real problem is that you are not calculating mass flow rate correctly. If you calculated mass flow rate correctly then your apparent problem will disappear and everything will work. To calculate mass flow rates accurately use the massFlow() function in CEL. Your method is inaccurate as you appear to be using a single value of density and velocity over the inlet and outlet. In reality it is going to vary, and the average of (density*velocity) does not equal the average of (density) * average of (velocity). This is why your mass flow calculations are wrong. To check p-mass imbalance look in the final reports in the output file, or add an imbalance monitor in Solver Manager.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
August 2, 2019, 00:33 |
|
#12 | |
Member
Hamda
Join Date: Jul 2018
Posts: 80
Rep Power: 8 |
Quote:
|
||
August 2, 2019, 00:39 |
|
#13 | |
Member
Hamda
Join Date: Jul 2018
Posts: 80
Rep Power: 8 |
Quote:
I checked p-mass and it seems that the mass flow rate is constant P-Mass-fluid | +--------------------------------------------------------------------+ Boundary : Inlet 8.4650E-03 Boundary : Outlet -8.4579E-03 ----------- Domain Imbalance : 7.1051E-06 Thanks, dear ghorrocks and evcelica so many things I have learned about CFX from you. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
VELOCITY vs VELOCITY IN STN FRAME vs RELATIVE VELOCITY | everest20 | FLUENT | 1 | July 13, 2015 09:35 |
OpenFOAM static build on Cray XT5 | asaijo | OpenFOAM Installation | 9 | April 6, 2011 13:21 |
A girl fail to plot velocity profile when mesh changes + Wall function | asherah | STAR-CCM+ | 0 | February 19, 2010 18:45 |
latest OpenFOAM-1.6.x from git failed to compile | phsieh2005 | OpenFOAM Bugs | 25 | February 9, 2010 05:37 |
Version 15 on Mac OS X | gschaider | OpenFOAM Installation | 113 | December 2, 2009 11:23 |