CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Constant P-Mass Flow Residuum (https://www.cfd-online.com/Forums/cfx/205137-constant-p-mass-flow-residuum.html)

p.mueller August 10, 2018 04:15

Constant P-Mass Flow Residuum
 
Hi,

I would like to understand, why my P-Mass Flow criterion for the outer fluid not converge. I built a heat flow model with a hot tube and a surrounding air. The hot tube model consist of two materials. An inner ring made from copper and an outer ring made from steel. Inside the tube is a stream of hot air with 600°C. The hot tube is enveloped by not moving air with 15°C. The boundary condition of surrounding air is an opening, with opening pressure of 0 atm, because I don't know in which direction the air flows. Additionally there is Buoyancy Model activated, because I want to see the nature convection.
It would be very nice, if somebody could help me, because I want to understand what happens here.

Best regards
Paul


https://www2.pic-upload.de/thumb/357...ce_problem.png

ghorrocks August 10, 2018 06:45

Have you read the FAQ on this? https://www.cfd-online.com/Wiki/Ansy...gence_criteria

Gert-Jan August 13, 2018 06:39

Forget Residuals. First focus at the mass, energy and momentum imbalances. Create a graph in the solver manager where you plot these. How do these graphs look? These should all go to zero. After that, look at residuals again.

Possibly the mass and energy imbalances are not close to zero due to an ill posed problem with openings. Also, since you included natural convection, your solution might become transient. Then convergences might be troublesome anyway.

ghorrocks August 13, 2018 07:23

I do not agree that you should forget the residuals. For most simulations they are the best estimate of solution accuracy as it is the accuracy of the linear solution to the non-linear equations. Imbalances are global balances which are useful in some cases but to only use them always is not recommended.

Gert-Jan August 13, 2018 08:22

Maybe I should reformulate my quote and skip the word "Forget". What I meant is:

- first look at imbalances.
- then look at residuals.

It is possible to obtain a CFD solution with low residuals which make you think the solution is correct, but then still, the imbalances are way off. And as long 'in' is not equal to 'out' (for any equation), any solution is basically wrong.

Bottomline: residuals are only useful as convergence criterium if the imbalances are close to zero.

ghorrocks August 13, 2018 19:21

I don't understand why you think the imbalances are more important than the residuals for general simulation.

If you use the imbalances as your convergence criteria, the internal flow detail could be completely wrong, but if the (flow in) = (flow out) then the imbalances will say it is converged.

The residuals tell you how accurately the equations are solved over the whole domain, so they give the best picture of the overall simulation accuracy. There are a small proportion of flows where global balances are also important and residuals don't capture this well, with CHT simulations being a key example. This is why the residuals are the default convergence criteria, and imbalances are optional.

Gert-Jan August 14, 2018 03:58

I don't use imbalances alone for judging convergence. I neither use residuals alone. I use them both. And I think everyone should use both.

As you mention it is possible to obtain a solution with low imbalances but with high residuals. I totally agree. But the other way is also very well possible. Especially if you stick to the default convergence criteria of 1e-4. I have had plenty examples where the flow seems converged based on residuals, but where the solution was not in balance. This applies especially for calculations including energy (CHT), scalar and mass fractions. And since these are coupled with mass and momentum.........

Therefore I always look at imbalances first. Then I am sure that what goes in equals what goes out. So, I have a global developed field of velocity, temperature, mass fraction, etc. If that is satisfied, then I focus on the residuals to obtain a local converged solution.

Moreover, for that I add a third level: I use multiple monitoring points in my domain where I monitor multiple variables. And if these provide me flat liners. Then I have a converged solution. Sometimes I can only get this thrid level satisfied with resduals lower than 1e-6! At least, if CFX can find a stable solution. Mostly transient effects come into play. So then residuals go up again and the variables start to wiggle.

Bottomline 1: I think there is too much focus on residuals alone. In general, one should add 1 or 2 levels in quality control.
Bottomline 2: This is one of the reasons why I prefer to use CFX over Fluent. The CFX-solver manager facilitates monitoring, crucial for quality control. In fluent, monitoring is a hassle, although things have improved lately.

But lets go back to the initial question:

Paul:
- How does your geometry look like? Can you share a picture?
- What about the opening?
- How much flow goes in and how much goes out?
- What about the energy imbalance?

p.mueller August 14, 2018 09:01

Hey Gert-Jan and ghorrocks,

thank you for your advices. I made a plot with the imbalances. The mass imbalance doesn’t look good. It oscillates between 0% und 100%. The energy imbalance looks quite good.

I uploaded my geometry. All three sides are openings, so I don’t have any Inlet or Outlet. That’s why I don’t know what’s going in and out. I hoped, that is calculated automatically with the boundary condition "opening".

I also simulated the model without the buoyancy-model, but it’s actually the same result like before. That’s why I don’t think, that these results coming from transient processes.



Opening:
- Flow regime: Subsonic
- Mass and Momentum
Option: Opening Pres. And Dim
Rel. Pressure: 0 atm
- Flow Direction: Normal to Boundary Condition
- Turbulence: Medium (Intensity = 5%)
- Heat Transfer:
Option: Opening Temperature
Opening Temperature: 15°C
- Thermal Radiation: Local Temperature

geometry:
https://www2.pic-upload.de/thumb/35789624/geometry.png

all imbalances:
https://www2.pic-upload.de/thumb/357...Imbalances.png

energy imbalance:
https://www2.pic-upload.de/thumb/357..._Imbalance.png


Best regards
Paul

MangoNrFive August 14, 2018 12:24

Wouldn't it be advisable to look for max-residuals as well to get an idea if it is more of a local or global convergence issue? In a second step i would view the residuals in post to see which regions are making you trouble.

Why is it just the 4th step in the FAQ? It is alot faster to check compared to running the simulation with different timesteps, advection schemes, etc. and those are even maybe just hiding the problem of wrong physics/bad mesh instead of solving them.

No critic here, just a genuine question :)

Gert-Jan August 14, 2018 16:39

An opening is an inlet and an outlet. Flow can go in and out, depending on the local conditions in your domain.

The imbalance is based on the flow going into the domain, if I am correct. So if you created 1 opening containing all three sides, then only a small mass will go in or will go out (round off error), resulting in the flip-flop behaviour of the imbalances. My advice would be to:
- create a larger surrounding volume
- create an separate opening at the bottom
- create an separate opening at the top
- apply symmetry at the sides, at least as first guess. You can always change it later on.
Then probably the flip-flop behaviour will dissappear.

More questions:
- How is your geometry oriented to gravity? Parallel to the tube? Or in cross flow?
- How does the velocity field in the surrounding air look like?
- How do you model the steam? Is it a solid with a fixed temperature? Or do you also model the flow inside the tube?

ghorrocks August 15, 2018 18:34

Quote:

Why is it just the 4th step in the FAQ?
Fair point. So can you edit the FAQ text and improve it? That way the FAQs can get better and can have the best approaches in them.

MangoNrFive August 17, 2018 14:37

Quote:

Originally Posted by ghorrocks (Post 702768)
Fair point. So can you edit the FAQ text and improve it?

Done :)
The Wiki and the Forum is great and helped me a lot, it's a good feeling to be able to give something back.

Gert-Jan August 17, 2018 18:57

I also added a section regarding the imbalances (my favourite topic :-) ).
Please read it and edit if necessary.........

ghorrocks August 19, 2018 05:38

Thanks, much appreciated. The wider range of people who contribute to the FAQs the better.

p.mueller August 23, 2018 11:05

Hey,

Thanks a lot again for your advices. I didn't find time to check the new settings. Now I triedyou’re your advices. It is now much better. There is just a kind of oscillation, which is maybe because of the natural convection.
The imbalances looking quite good. So I think there is an improvement.
To your questions:
- the gravity is oriented in cross flow
- i attached a picture of the velocity
- the steam in the inner pipe has a fixed temperature, but i model the fluid as well. So it isn't just a hot solid.

Convergence:
https://www2.pic-upload.de/thumb/358...nce_better.png

Imbalances:
https://www2.pic-upload.de/thumb/358...imbalances.png

Field of velocity:
https://www2.pic-upload.de/thumb/35838849/velocity.png

Best regards
Paul

ghorrocks August 23, 2018 19:02

Your convergence is pretty bad. I do not agree with Gert-Jan's focus on imbalances, I think he underestimates the importance of the residual. In your case the residuals are bad and the imbalances are good, so this is exactly the sort of case where not paying enough attention to the residuals will cause problems.

It is starting to look like your simulation is transient and will require a transient simulation to get good convergence.

And please post images directly on the forum, not on 3rd party sites. Instructions on how to do it are here: https://www.cfd-online.com/Wiki/Ansy...n_the_forum.3F

Gert-Jan August 24, 2018 05:04

Paul,

imbalances are better indedd. So what goes in equals what goes out. But that is only half the story. Your residuals are very bad, as Glenn mentioned. And both should be ok. So you should take many more iterations to get a decent result.

But lets take a step back and look at your velocity field.
- What is the range in velocities?
- What does this mean?
- Is it realistic and is it what you would expect?
- What are your boundary conditions? Are they realistic?

Don't think so..........

p.mueller August 30, 2018 09:25

2 Attachment(s)
Hey,
so I put more iterations on the solver and yes now it's going better. I mean there are still some transient processes, but all in all I get, what I want. The oscillating part must be there, because of the buoyancy model, because in the disabled mode there is no oscillation.

- The inner flow, has a mass flow of 0.1 kg/s
- There is no special model for the inner flow
- I would suggest some kind of transient processes because of the nature convection, maybe it is oscillating because of steady solution
- The boundaries are realistic

best regards
Paul


All times are GMT -4. The time now is 11:55.