|
[Sponsors] |
buoyantBoussinesqSimpleFoam: Steady state: Mass Flow rate NOT EQUAL at inlet & outlet |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 30, 2016, 02:41 |
buoyantBoussinesqSimpleFoam: Steady state: Mass Flow rate NOT EQUAL at inlet & outlet
|
#1 |
Member
Sing
Join Date: Jan 2016
Posts: 30
Rep Power: 10 |
Hello Everybody,
I was trying to simulate flow using buoyantBoussinesqSimpleFoam, my plan is to first simulate and validate flow then come to temperature. I initially set the case with following residual control Code:
residualControl { p_rgh 1e-2; U 1e-3; T 1e-3; "(k|epsilon|omega)" 1e-3; } Code:
residualControl { p_rgh 1e-3; U 1e-4; T 1e-3; "(k|epsilon|omega)" 1e-4; } Code:
residualControl { p_rgh 1e-4; U 1e-4; T 1e-3; "(k|epsilon|omega)" 1e-4; } Has anybody else encountered such type of problem. I would greatly appreciate any help. Thanks and regards, Singh. |
|
September 30, 2016, 03:25 |
|
#2 |
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 21 |
Just troubleshooting...
Recently I used the transient version of that solver: buoyantBoussinesqPimpleFoam, and found that any kind of urf (under relaxation) would worsen my solution. Of course, this might not be the case for the (steady-state) Simple-version of the solver. Nevertheless, I'd try setting urf to 1, and control convergence by reducing the timestep - just to see what happens. An alternative of what might be going wrong is: how do you compute the mass flow rate? And how not-equal is "not equal"? |
|
September 30, 2016, 05:40 |
|
#3 | |
Member
Sing
Join Date: Jan 2016
Posts: 30
Rep Power: 10 |
Quote:
Thanks for the quick reply. I will try to run the simulation with urf = 1 and reducing the time step. Will update the results for the same. I am calculating mass flow rate using paraview. First I select the patch (inlet/outlet) then using calculator I define a variable as rho*U_Z (fluid entering and leaving in z direction) then I use integrate variable to get the mass flow rate. And not equal means at inlet I am getting a mass flow rate of 16.6 and at outlet its 15.5. Thanks and regards, Singh. |
||
September 30, 2016, 05:52 |
|
#4 |
New Member
Join Date: Jun 2016
Location: Malaga, Spain
Posts: 15
Rep Power: 10 |
Hi,
Have you tried to calculate that values directly in Foam, "patchIntegrate"? I had the same error but the difference between the velocity was around 1e-5,(I think that's due to numerical error). |
|
September 30, 2016, 06:35 |
|
#5 | |
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 21 |
Quote:
I've recently had a similar problem. The reason that this may be troublesome, is that you use the exact relation for the mass-flow rate, which you discretise in a trivial manner on your patch: simply interpolate and then multiply. This makes perfect sense in the exact representation. However, it is plain simply wrong in the discretised representation: that is not how the fluxes were solved by OpenFoam. Hence they are not the fluxes that you calculate. Depending on your convective scheme, OpenFoam calculates the discretised fluxes in a different way than you do. Therefore, if you wish to calculate the flux properly, you must calculate it in exactly the same way as OpenFoam solved it. If you do so, you'll get a perfectly (within your residuals, of course) conservative solution. After all, OpenFoam uses the Finite-Volume Method which is supposed to be perfectly conservative. How to do that in ParaView? I have no clue how you can get ParaView to calculate the fluxes as computed using e.g. the vanLeer scheme... What I do - I use swak4foam to compute such quantities during runtime. An example of the required swak4foam code for the thermal fluxes is shown here. |
||
September 30, 2016, 09:10 |
|
#6 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
Using URF=1 on xSimpleFoam will diverge no matter the time step (which affects only naming).
To get a good result, you should use phi to compare the mass fluxes, not U. As already said, patchIntegrate phi should give you what you are looking for.
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
October 3, 2016, 06:46 |
Thanks!
|
#7 |
Member
Sing
Join Date: Jan 2016
Posts: 30
Rep Power: 10 |
Hello Everyone,
My deepest gratitude for solving the matter. Actually I used simpleFunctionObjects, to calculate the mass flow from the inlet and outlet patches. Which seems to be consistent for the case of mass flow. In functions I used the patchMassFlow type to plot the mass flow rate at inlet and outlet, http://openfoamwiki.net/index.php/Co...unctionObjects Thanks and regards, Singh. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting the height of the stream in the free channel | kevinmccartin | CFX | 12 | October 13, 2022 22:43 |
Species mass flow inlet | lorenz | FLUENT | 3 | March 15, 2012 08:26 |
Net mass flow inlet vs outlet | Nigui28 | FLUENT | 1 | August 12, 2011 11:09 |
Constant velocity of the material | Sas | CFX | 15 | July 13, 2010 09:56 |
Inlet and outlet flow rate | Neser | CFX | 1 | March 2, 2004 17:02 |