|
[Sponsors] |
Continuity Error for Temperature Dependent Density |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 26, 2018, 09:15 |
Continuity Error for Temperature Dependent Density
|
#1 |
Member
Tomas Denk
Join Date: May 2017
Posts: 30
Rep Power: 9 |
Dear Foamers,
Can someone help me modifiy the set up so that I get rid of the error? Is it possible that the error is caused by a bug in the code? I have set up simple model to demostrate the issue - available for download at the bottom. As long as the fluid properties are constant, it runs just fine. When I change the equation of state in thermophysicalProperties of the fluid (Glass) to look like this: Code:
equationOfState { rhoCoeffs<8> (2500 -0.0001 0 0 0 0 0 0); } Code:
--> FOAM FATAL ERROR: Continuity error cannot be removed by adjusting the outflow. Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow. Total flux : 162372 Specified mass inflow : 1 Specified mass outflow : 0.998114 Adjustable mass outflow : 0 Available until May 10th, 2018 (max. 30 downloads): http://www.uschovna.cz/zasilka/YGVFBUHH3X6W34CD-6I5/ Unlimited, but sometimes does not work without logging into Google: https://drive.google.com/open?id=1f9...Nrh7zlOJMSe2a- |
|
June 4, 2018, 12:53 |
|
#2 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 21 |
The problem is the boundary conditions set up. You are trying to solve a flow with mass conservation. Yet you specify the total inflow AND outflow. This is bad practice. One reason is that you do not have a pressure level for these boundary conditions. You have basically zeroGradient for pressure everywhere, but no fixed level. If in and outflow is fixed you force mass conservation by the boundary conditions not by adjusting it via the solution. This is quite tricky to get right. With varying density due to your polynomials it gets quite impossible. Hence you'd be better of specifying the inflow (or outflow) and couple that with a fixed pressure boundary condition. Like:
Velocity conditions
|
|
June 5, 2018, 12:00 |
Challenge
|
#3 | ||
Member
Tomas Denk
Join Date: May 2017
Posts: 30
Rep Power: 9 |
Hi Bloerb,
Thank you for taking a look at my case and giving me those recommendations. I have followed them and my case reached convergence. However, there are couple points where I dare to challenge your answer and more details on why it works this way would be greatly appreciated. Quote:
Quote:
I understand, why you want me to have fixed pressure point somewhere in the domain and I will bear that in mind in the future, thanks. What truly puzzles me is fixedFluxPressure on walls. In reality, there is no gradient perpendicular to the wall, so I'd expect zeroGradient condition would be appropriate. However, I can change this BC only (starting from your recommended setup) and I get unphysical solution (temperature reaches 4000K and velocity field is quite spoiled). Can you explain what is wrong with zeroGradient condition for pressure on the walls? Thank you for your effort to help me. I try to pay back to the community and I react to threads where I think I can help. |
|||
June 5, 2018, 13:58 |
|
#4 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 21 |
Yes that is correct. Specifying the massflux for in and outflow isn't inherently flawed. My remarks where more aimed at something else. If some numerical error is present in your solution (which is naturally always the case) your solver can adjust for that by adjusting the outflow. With your setup errors can't "be flushed out". Which next to the missing pressure reference does not aid convergence.
Regarding the fixedFluxPressure and zeroGradient problem. You should be able to set both. FixedFluxPressure is however known to have better convergence and used in the cht tutoral cases. fixedFluxPressure sets the pressure gradient to something like (phi-phi*)/something. On a wall, this difference tends to zero and so the boundary condition turns to zeroGradient. It shouldn't drastically effect your results. |
|
June 6, 2018, 04:49 |
|
#5 |
Member
Tomas Denk
Join Date: May 2017
Posts: 30
Rep Power: 9 |
Thank you for your explanation. Besides "how", it is important to know "why", for me.
Have a nice day. |
|
January 30, 2020, 19:53 |
|
#6 | |
Senior Member
Join Date: Jul 2019
Posts: 148
Rep Power: 7 |
Quote:
Hi Bloerb, I use twoLiquidMixingFoam multiphase solver, this solver allows for mass transport (varying density). I always get issue at the outlet when I use fixedValue for the pressure. In a simple 2D channel flow, if I turn off the gravity, the fluids exit the channel with no problems. However, when the gravity is on, then, I get issues at the outlet (i.e. backflow and other weird behavior). If I set a kind of gradient boundary at the outlet for both velocity and pressure, then, I have to define a reference cell for pressure in the fvSolution. No matter what cell value I use I get the error of continuity: --> FOAM FATAL ERROR: Continuity error cannot be removed by adjusting the outflow. Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow. Total flux : 3.99328e-17 Specified mass inflow : 0 Specified mass outflow : 7.25226e-19 Adjustable mass outflow : 0 I am wondering what would be the solution in this case. Thank you in advance and I look forward to hearing from you. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Current density visualisation (PEM fuel cell add-on module) | pchoopanya | FLUENT | 10 | August 21, 2023 15:33 |
(incompressible) interFoam - where is the density in the k, epsilon and continuity eq | idefix | OpenFOAM | 0 | December 22, 2015 15:40 |
dynamic Mesh is faster than MRF???? | sharonyue | OpenFOAM Running, Solving & CFD | 14 | August 26, 2013 08:47 |
buoyantPimpleFoam, icoPoly8ThermoPhysics and temperature dependent density | jherb | OpenFOAM Running, Solving & CFD | 0 | March 11, 2013 06:02 |
Warning 097- | AB | Siemens | 6 | November 15, 2004 05:41 |