
[Sponsors] 
November 12, 2008, 10:15 
time of residence (age) is not correct

#1 
Guest
Posts: n/a

Dear Ladies and Gentlemen,
I try to modell curing of polyurethane foam. Therefore as a first step I would like to change the viscosity of my fluid as a function of "tR" which is a variable to measure the time of residence for my fluid. I have checked the tR values in cfxpost, and the picture looks fine but the highest value of tR is only ~2.2[s] after 4[s]. So it looks as the tR is working, just it is "late". www.ImageShack.us" /></a> I have checked _all_ the postings here on "time of residence" and "age" but it seems I have made some trivial error, since I found nobody else having this problem. For simplicity i use a box as geometry is not important now. It has about 57000 tetrahedras. A transport equation is set to tR.(no kinematic difusivity) At the inlet the tR is set to 0, and also in the initial conditions. A subdomain (equal to the default one) is created and set to be a source of tR 1 [m m^1]. (I could not write [s s^1] though tR is a volumetric scalar variable with unit [s]) The simulation takes 4 seconds, and I use a timestep of 0.04 s. I have increased to coefficient loops to 50. It usualy converges to 1e05 in 3035 loops. I try it with smaller timestep now, but I don't think that will change anything. I am very curious where I have mistaken, so any comment of yours i will receive as a precious gift. Thank you for your time. Gergely Papp as pmp77 

November 13, 2008, 03:22 
Re: time of residence (age) is not correct

#2 
Guest
Posts: n/a

Dear All,
My try with the smaller timestep (0.01s) gave a better result. www.ImageShack.us" /></a> The max tR is still below 4[s] but since "the value of tR at each node represents the average of tR in the control volume surrounding that node" I can accept this result. So, sorry for early posting, maybe it was not worthless, and might help some newbies like me. Best regards. Gergely Papp as pmp77 

November 13, 2008, 05:41 
Re: time of residence (age) is not correct

#3 
Guest
Posts: n/a

Interesting the difference (max tR = 2.2s, max tR = 3.8 s) you get just by reducing the timestep. I think it would be interesting to see how closer to 4 s you get when you reduce the timestep further. But, as you said, the value of tR represents the control volume average, so there's a limitation due to the mesh.
In case this may help some people, I've been doing some simulations of mould filling and also calculating tR. But I noticed that more inner iterations were necessary for tR to converge than for the "really important" equations, and it was slowing down my already quite long simulations. And, as I'm just calculating tR to be able to see it in Post (and not really interested in it), I set the initial value and the value at inlet to 1000 s. This way, because how the residuals are calculated, the convergence target is achieved in far less iterations, less than the other equations, and it isn't slowing down the whole simulation anymore. Then in Post I just create another variable, tR2, and define it as tR2 = tR 1000 s. 

November 13, 2008, 12:22 
Re: time of residence (age) is not correct

#4 
Guest
Posts: n/a

Firstly, why are you running a transient simulation? Is the flow actually transient or are you doing this for the sake of the residence time? If it is the latter, don't bother. Just run a steady state analysis with a very large timestep on the residence time (see below).
The convergence problem is due to the fact you are adding a source of age everywhere and have recirculation. Within the recirculation zone, the age is never flushed out and therefore continues to accumulate and therefore the residuals remain high. To avoid this holding up your simulation, go to Solver Contro and select "Additional Variable" under the Equation Class Settings tab and specify a larger timestep (you can only do this for steady state) and a less stringent convergence criteria. As for residence time not being equal to your total time, this is entirely possible if the fluid flows out of the domain in 2.2 [s]. The maximum residence time will be equal to the time it takes to flow through the domain, not the total time you run the simulation. That said, if you have recirculation, this region may accumulate age for the duration of your run. Even still, diffusion will reduce the maximum residence time. If you have a high residence time in one control volume and a low residence time in another, diffusion (numerical and physical) will reduce the maximum and increase the minimum (i.e. age will diffuse in the direction of the gradient). You can eliminate physical diffusion by leaving the "diffusion" check box unchecked. If you want to eliminate only the kinematic diffusivity but keep turbulent diffusion, just set the kinematic diffusivity to zero. To reduce numerical diffusion, refine your grid (and timestep if you are still running transient). CycLone 

November 14, 2008, 03:35 
Re: time of residence (age) is not correct

#5 
Guest
Posts: n/a

First thank you Rui and CycLone, for your answers.
Rui: I have decreased the timestep to 0.005[s] and the highest value of tR become 3.96xx s which is more than accurate enough for me. Regarding that my mesh is very coarse it is even better result. Even the viscosity changing looks good as well. I have also tried 0.001 [s] but after 2500 timesteps it ran out of disk space. The previous case took about 2.5Gb (800 timesteps) so I tought that the remained 13Gb will be enough. I don't know why it took more space/timestep but it is about 40% higher disk space cost. The only change i made was only the tR initial values as you suggested, (but in my case it converged quickly below 1e06) so maybe it was not slowing my calculations) and the timestep. Cyclone: I try to model a mould(now box) filling, with a multiphase (pur, air 25) case. It starts from empty stage, than it is filled. I thought a transient case can do this. The box is filled from the top and the opening for the air to leave is also on the top. I fill it about to half, so I do not expect flow out for the fluid. I have not turned diffusivity on, but anyway, thank you for your comments on that, it made things more clear on that topic. I will use a finer mesh when I have my final simulations to do. (In some years now I will be prepared ) Thank you again Sirs for your time! 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
TimeVaryingMappedFixedValue  irishdave  OpenFOAM Running, Solving & CFD  28  May 28, 2015 13:37 
Computational time  sunnysun  OpenFOAM Running, Solving & CFD  5  March 16, 2009 04:32 
Transient simulation not converging  skabilan  OpenFOAM Running, Solving & CFD  12  September 17, 2007 17:48 
AMG versus ICCG  msrinath80  OpenFOAM Running, Solving & CFD  2  November 7, 2006 16:15 
How to get residence time in FLUENT  L. Zhu  FLUENT  3  October 4, 2002 09:53 