Residuals - Transient Simulation

  • 89 Views
  • Last Post 09 May 2019
  • Topic Is Solved
Max4 posted this 08 May 2019

Hello,

I´m running a transient simulation of the compression of a fluid in a closed chamber using the "compressible liquid" density method. This method calculate the density as function of the pressure for isothermal condition.

To initialize the simulation, I opened the cylinder and then at 1E-5s I closed it by changing an interface from interior to a wall.

I have used a time step of 1E-6s at the beginning with 100 it/time step. At 2000 iterations I have change the time step to 5e-6s.

The problem is that the continuity equation is being increase at beginning of each new time step.

Should I change the under relaxation factors? Your help is welcome.

Regards,

Maxime

 

Order By: Standard | Newest | Votes
Extremepeta posted this 08 May 2019

Hi Maxime,

If I understand correctly, you're concerned about the big jump in the residuals that occurs between timesteps? Some moderators might be able to offer more insight than me but my understanding is that is normal. During a single timestep, the solver has a set of coefficients and keeps them constant until a convergence criteria is met or the max number of iterations is reached (then the timestep increments). The residuals measure how much the solution changes from one iteration to the next. When the residuals are very low, the solution is not changing very much with respect to the previous iteration, and such the solution is converging (possibly, depending on how you judge convergence) for that timestep.

Then when you increment the timestep, the coefficients get updated and the solution changes drastically (relatively) compared to the last iteration from the previous timestep, hence the jump in residuals. Then as the solver continues on this incremented timestep, the solution converges again until convergence criteria is met or the max number of iterations is reached, the time step increments, coefficients are updated, and the cycle repeats.

Hope this clears some things up for you.

- Peter

Max4 posted this 08 May 2019

Hi Peter,

Thank you for your answer. The occurence of the big jump is normal because I have changed the time step.

The problem is that the continuity equation is continuily increasing at beginning of each new time step, even if I keep the time step constant. For exemple, at the iterations 1400 , the continuity value is at the beginning of the time step (pick) 1E+3 and then it decreases. At the iterations 1800, the continuity value is at the beginning 2E+3 and then it decreases. 

Regards,

Maxime

Kremella posted this 09 May 2019

Hello,

Do you see this behavior if you use a constant time-step (low value)? Perhaps, the time step you are changing to is larger than what is required based on a CFL number calculation? Have you checked this? 

Also, another reason could be because your continuity starts large, you are unable to meet your set residual criteria in 100 iterations on a time-step based (perhaps). Can you please check if you are meeting your set residual criteria (on a time-step basis) with you change the time-step? This could possibly explain rising continuity residual at the beginning of every time-step.  Please make sure your solution is converging every single time-step. Your time-step value as well as the number of iterations per time-step you use should ensure this.

Thank you.

Best Regards,

Karthik

Extremepeta posted this 09 May 2019

I've also had this happen to me when I've had a couple mesh elements that were poor quality. What's the result from your mesh check? This also kind of leads into what Karthik was saying about CFL. Poor elements that have a really small element edge length will drive your maximum CFL number up. Are you monitoring the CFL number during your simulation?

I've also had this happen and just let it run anyways and it either slowly diverges (poor mesh sizing or element quality) or stabilizes later on at a little higher residual (usually 1e-5). I'm fine with this because of two main reasons: 1) the timestep converges around 1e-5 instead of 1e-6 like I set; and 2) I base convergence on other parameters besides just residuals and I can see that my parameters are looking how I expect them to. This is just me though and I'm not doing this for industry or a company where that level of accuracy matters (maybe it does for you for research or industry applications). Hence I'd rather let it converge at 1e-5 and spend my time doing other things like benchmarking my results and seeing if that extra little bit of convergence mattered :-)

- Peter

Close