CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Solution does not advance with time: steady state too soon?

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 1 Post By RaiderDoctor
  • 1 Post By RaiderDoctor

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 16, 2018, 13:39
Default Solution does not advance with time: steady state too soon?
  #1
New Member
 
Noix
Join Date: May 2018
Posts: 13
Rep Power: 8
Noix_V is on a distinguished road
Hello again.


I'm trying to simulate a cylinder which fills ups with compressible gas. Selected ideal-gas as density method and I'm using the Density-Based Solver with a Courant number of 1.



I managed to get my simulation up and running and the first time step looks great in terms of velocity and pressure, just what you would expect:






However it does not seem to keep going after sucesive time step: the residuals don't go up like they should bewteen time step: they just keep going down with no big differences in the profile (exactly the same every time step!)

Why does that happen? How can this be the steady state with such huge differences of pressure and speed?
Noix_V is offline   Reply With Quote

Old   June 16, 2018, 15:05
Default
  #2
Senior Member
 
Join Date: Dec 2016
Posts: 152
Rep Power: 10
RaiderDoctor is on a distinguished road
Hi, we are going to need a few things to begin to troubleshoot your problem.

First: can you post a picture of the residuals with indicators of where the next time step is? It would be really cool to see what you are talking about with the continued trend.


Second: if this is a transient simulation, what is your step size, and what happens in between each step? I know you said you are simulating filling, but how is this being filled? Are you moving the piston each time step, or is it stationary and you are just filling the cylinder?

Third: this isn't as important right now, but it could be, what does your mesh look like?
Noix_V likes this.
RaiderDoctor is offline   Reply With Quote

Old   June 16, 2018, 17:21
Default
  #3
New Member
 
Noix
Join Date: May 2018
Posts: 13
Rep Power: 8
Noix_V is on a distinguished road
Hi, thanks a lot for replying. I should have explained my setup more.


Basically, all I'm doing is filling a gas tank by using a pressure-inlet boundary condition. I've tried several setups to do this problem, in that last one I also used a high-pressure reservoir and watched how it flowed from the large reservoir to the small cylinder.



I don't have a picture of the residuals right now (I'll upload it later if you think it's neccesary) but it's really simple: they just don't change when the next time step begins.



However, there IS a small increase in the overall pressure (the blue areas), but I don't know if that's the real result. I don't have any references either.




I am using variable step sizes. At first I select an extremely small one (0.0001) so the initial profile develops. When I'm using that step the residuals are like they should be (increasing when starting the next time step), but then they just decrease in time with no changes. I try to increase the step at that point but it does very little. These are the residuals in the early stages (small time step).


https://puu.sh/AGwjj/7cf81fdfc0.png



It takes a while but it stabilizes. Eventually.



Here's the mesh. Honestly I don't know if I should refine the area where the initial flow starts.



https://puu.sh/AGwh4/705862c9f3.png
https://puu.sh/AGwhh/ab6f462703.png



Thanks a lot for your help.
Noix_V is offline   Reply With Quote

Old   June 16, 2018, 20:42
Default
  #4
Senior Member
 
Join Date: Dec 2016
Posts: 152
Rep Power: 10
RaiderDoctor is on a distinguished road
Okay, lots of stuff to go over here.

Firstly, does the bottom of the cylinder (or anything on this setup for that matter) move? I know you said that the cylinder is being filled, but going off of your setup, I don't see what moves and what doesn't. As it stands, it looks like your model has an inlet at the top, and an outlet at the bottom (https://drive.google.com/open?id=18E...94VCZ6o8ZgVJI_). This would mean that from one time step to the next, your setup really doesn't change much. As in; your solution would change in the first couple of time steps, and then not at all because it would reach equilibrium. Also, this would mean that your simulaiton is actually modeling a steady-state simluation, rather than a transient simulation.

Second, your mesh is (and I say this as gently as possible) crap. You can't expect any kind of good results when your elements are that large. As such, consider remeshing and refining the grid using my suggestions (https://drive.google.com/open?id=1a0...aSG9Ys-t5T2nAk). Think about how the flow will go from the first cylinder to the second: it will go from a relatively large diameter vessel to a significantly smaller one (increasing velocity, and possibly producing vortices before the entrance https://drive.google.com/open?id=1Rh...sSlD2dhGnrkZ1y) and then to another larger one (decreasing velocity, and possible introducing vortices at the entrance, https://drive.google.com/open?id=1fI...zcTwtfts8FW-c1 yay Bernoulli's!).

Third, what kind of dimensionality are we looking at? The reason why I ask is because it looks like you have a maximum velocity (in the y direction) of about 332 m/s. If this is the case, then if you quickly calculate the Reynolds number, in order for the flow to be laminar in that small section it would need to be less than 0.1112 mm in diameter (I quickly calculated that, so please double-check). Anything larger than that, and your flow is turbulent. While not exactly detrimental, this would affect your residuals.
Fourth, is this geometry axisymmetric? I ask because if it is, then you can significantly simplify your geometry. This will allow you to generate a finer mesh, and even save on computational resources. If it is, consider simplifying it to this (https://drive.google.com/open?id=1vh...TxnFI6EJCyU62Z). Note: I do not know if the bottom cylinder moves, so I just set it to an outlet. If it moves, however, you can simply set the bottom wall to your movement condition.

Fifth, I most definitely need to see the residuals with indicators where the time steps are occurring. I know this seems weird (I know you already told me that they aren't changing) but it would be great to see how they aren't changing. What might look trivial could actually be significant.
Sixth, what kind of convergence criteria are you using? I ask because, based off of the image you showed, your residuals are not converged on our first time step. This would mean that you have a bad solution moving forward, and won't produce anything representative of a solution.

Seventh, how many iterations do you have per time step? Again, this might seem like a trivial question, but it's good to know.

Bonus question; why are you using the energy model? Are you accounting for temperature change as well?
Noix_V likes this.
RaiderDoctor is offline   Reply With Quote

Old   June 17, 2018, 11:35
Default
  #5
New Member
 
Noix
Join Date: May 2018
Posts: 13
Rep Power: 8
Noix_V is on a distinguished road
Raider: thanks a lot for helping me again! I'll try to answer point to point.

First: The setup has no outlets, just an inlet. That's why it should be increasing in pressure constantly. I don't know how that affect what you said before.

Second: point taken. How fine elements should be in general?

Third: Flow should be laminar. There's a porous zone on the bottom cylinder and should be modelled with Darcy's law. Dimentions are a radius of 100 mm and an entrance of 15 mm, with 200 mm in height. It's fairly small.

Fourth: It is. My professor asked me to do this problem on 3D, because then I should put aditional stuff in the geometry, but yeah, I think it would be better to do a 2D problem as well. I'll talk with him about that. I think it's not necessary at all to have the reservoir at the top, I just need to simulate the filling of the small cylinder, which should be possible by not using the big one at the top. Regardless, I would really like to do this 3D, or is it that hard to do? (honest question)

Fifth: This is not exactly the same simualtion, but it's the same situation. (I'm horrible at this, right?) https://puu.sh/AGWH9/334da27d19.png

Sixth: 10^-3. You're right.

Seventh: About 5000. it does not converge.

Bonus: Yes, because I'm using the ideal-gas model the energy equation is mandatory.

Thanks a lot for your time! I would really want to know what considerations should I have with the mesh on a no-outlet situation, if you can reply that.
Noix_V is offline   Reply With Quote

Old   June 17, 2018, 11:45
Default
  #6
New Member
 
Noix
Join Date: May 2018
Posts: 13
Rep Power: 8
Noix_V is on a distinguished road
I really think I should tell you about the whole problem I'm trying to do.

I'm trying to simulate hydrogen adsorption on a porous cylinder. My plan is to divide the geometry into two areas, an expansion zone (not porous) and a porous zone. I already have an UDF written for that purpose (and tested, it works) on a basic cylindrical geometry that SOMEHOW (I have no idea why) convergerges perfectly.

This would be my mesh, is it acceptable? Only an inlet at the top, axis at the left side and the others are all walls.

https://puu.sh/AGW7u/c44b0cfd7c.png

Edit: i tried this. It diverges automatically (error at AMG solver) no matter how I set Courant, the time step or the URF.

Thanks a lot again.
Noix_V is offline   Reply With Quote

Old   June 17, 2018, 15:13
Default
  #7
Senior Member
 
Join Date: Dec 2016
Posts: 152
Rep Power: 10
RaiderDoctor is on a distinguished road
Okay, you seem to be all over the board, man. Take it step by step haha.

So, going over your answers to my questions first:

1.) Okay, so nothing in this thing is moving or leaving. Got it! Sorry, I'm used to working with hydraulic cylinders and incompressible fluids. I'll reorient myself.

2.) Grid sizing should be small enough that you get an accurate solution, while not being too small to allow for divergence and a waste of computational time. Try looking at this thread (Mesh sizing - Rule of thumb !!!). While not exactly like your case, and using ICEM, it still might have good info for you. When determining you final mesh size, you need to run a mesh dependency study so that you can get your grid the best size possible. That, however, is another discussion entirely, so let's focus on getting a good solution first.

3.) Using your dimensions (100 mm diameter) and the velocity shown in your first image, your Re is about 2.3*10^6. Now, this might not be an issue in your current setup, as the laminar solver can still account for some turbulence. But without looking at your residuals, I can't be sure.

4.) No, it isn't hard to do a 3D study. It's basically the same as 2D one, but just without the axis. The main difference is that you'd be wasting time simulating a much larger 3D geometry over a simpler 2D one.

5.) With the picture you provided, I have no idea where the time steps are located. I don't know if this is one or twenty time steps. Reading more of your answer, I see that if there are 5000 iterations/time step, meaning that this isn't even one complete time step. Furthermore, this one step isn't even close to being converged yet. I know you said that it does eventually converge, but it would be really helpful to see how. (Don't worry, you aren't that bad).

6.) Cool.

7.) Okay, so then if nothing is moving, then this is a transient study because you want to see how long it will take the tank to fill? Then, if my understanding is correct, once it reaches equilibrium it will essentially be a steady-state simulation. This means that will immediately converge at each time step. Right?
The picture of the mesh looks really refined. At least a lot better than how it did look. I can't really tell you if it's "right" or not, you'll need to see how it performs in the grid dependency study.

If it's diverging automatically, I'd double-check your setup and make sure that it's the same as what you had before. I don't work with the porous media models, or compressibility for that matter. I can only help you get a good fundamental setup down.
RaiderDoctor is offline   Reply With Quote

Old   June 21, 2018, 00:01
Default
  #8
New Member
 
Noix
Join Date: May 2018
Posts: 13
Rep Power: 8
Noix_V is on a distinguished road
(Sorry for late reply!)



Thanks for your help Raider. I'm going to try some more setups with the steps you've given me and I'll report back with what I get!
Noix_V is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to export time series of variables for one point? mary mor OpenFOAM Post-Processing 8 July 19, 2017 10:54
Steady state solution as an initial condition for a transient problem adnanakhtar FLUENT 7 November 25, 2016 05:16
MRF steady state mixing time Swift FLUENT 0 August 11, 2016 05:14
Time dependent boundary conditions in steady state solution Algis OpenFOAM Running, Solving & CFD 0 December 10, 2015 09:08
Star cd es-ice solver error ernarasimman STAR-CD 2 September 12, 2014 00:01


All times are GMT -4. The time now is 04:57.