
[Sponsors] 
November 26, 2006, 18:25 
Hello again,
I was wonderi

#1 
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 23 
Hello again,
I was wondering... does it make sense to add relaxation factors for a transient turbulent solver such as turbFoam? Does it effect the temporal characteristics of the simulation in anyway? Usually when I use simpleFoam for solving steady state turbulent systems, I need to reduce the relaxation factors for the system to converge. I was trying a transient simulation using turbFoam, and am landing up with a situation similar to in simpleFoam when the relaxation factors are too high.... but relaxation factors are not currently implemented in turbFoam. Thanks in advance and have a nice day! Philippose 

November 27, 2006, 13:24 
If you make your timestep smal

#2 
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 726
Rep Power: 19 
If you make your timestep smaller you should get a similar result to making the relaxation factor smaller in steady state. You cant have a relaxation factor in transient runs, because then your solution wont be timeaccurate, and you will violate continuity.


November 27, 2006, 13:32 
Actually, if you run transient

#3 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,880
Rep Power: 31 
Actually, if you run transient SIMPLE, you need relaxation factors (and iterations within a timestep) as usual. Look for various versions of transientSimpleFoam hanging about. That should also help you with transient startup and cases where you wish to run with a large Co number.
Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

December 1, 2006, 07:39 
Hey Hrv,
Would you happen t

#4 
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 23 
Hey Hrv,
Would you happen to have a copy of the code for transientSimpleFoam? Is there a general source for such experimental or old openFoam code? I had modified the turbFoam solver to include relaxation, but if this violates continuity, I guess the results wouldnt be too sensible. One other question.... does is make sense to use the timeVaryingUniformFixedValue condition for pressure at an inlet in combination with the simpleFoam solver? For example.... if I say, that for the first 1500 iterations the pressure remains constant... that would give the solver enough iterations to converge, and then... slowly vary the pressure. My goal is only to run a parametric study for various values of inlet pressure, and it does not have to be temporally accurate. I used the transient solver turbFoam only because I thought using the timeVaryingUniformFixedValue condition with a steady state solver may not make sense. Have a nice day! Philippose 

December 2, 2006, 04:54 
Enjoy: http://www.cfdonline.

#5 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,880
Rep Power: 31 
Enjoy: transientSimpleFoam_HJ_1Dec2006.tgz .
I have serious doubts about your boundary conditions: specifying the pressure at the inlet. It can be done, but care is needed in setting it up. I hope you know what is required. Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

December 4, 2006, 13:10 
Hello Hrv,
Thanks for the

#6 
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 23 
Hello Hrv,
Thanks for the transientSimpleFoam solver. I guess I need to make myself a little clearer on what I have been trying.... So here goes :)! I have a hydraulic valve, with an axial inlet and a radial outlet configuration. The incoming oil flows axially into a hollow spool, and from there flows out radially via 6 holes (whose effective areas depend on the spool position) to a channel which is at tank pressure. I want to simulate the flow through this system, and correlate the results with results I have from measurements of the real valve. During the measurements, we hold a fixed pressure difference across the valve, and measure the oil flow for different spool positions. Using OpenFOAM (particularly, the simpleFoam solver), I simulated this system with the following boundary conditions for the inlet and outlet: inlet: type: pressureInlet pressure: fixedValue velocity: pressureInletVelocity epsilon: fixedValue k: fixedValue outlet: type: pressureOutlet pressure: fixedValue velocity: zeroGradient epsilon: zeroGradient k: zeroGradient For the inlet I use a value of 689 (which is 6bar normalised to a density of 870kg/m^3), and since its an incompressible solver, I use a value of 0 for the outlet. Using this setup, I have simulated all the spool positions I need with flow results which match to within 1.5 to 2 l/min with the measured values. Now I want to extend this simulation in three ways: 1. (Short term goal) I need to simulate the system for more pressure values, but dont want to do a complete 2500 iteration simulation for each pressure... so I thought I could use the last iteration of the above simulations as a starting point for a transient simulation where I can vary the inlet pressure during the simulation, giving me a complete pressure sweep in one simulation. 2. (Long term goal) I would like to create a moving mesh where I can hold the pressure constant but change the spool position, but thats something I need to spend some more time on before I manage to get results. 3. (Longer term goal :)!!) The system is actuated using a solenoid. I would like to create a system where the forces on the spool due to static pressure and flow are calculated during the simulation, which are in turn used for a force balance with a given solenoid force resulting in the actual spool position for the next time step. Points 2 and 3 are things I need to start thinking of once I get point 1 working. I already wrote a postprocessor in openFOAM for calculating the resultant static pressure forces on a set of given patches in a set of given directions, controlled via a dictionary file (If anyone wants to take a look at it, I will be only happy to share the code :)!). Hope I have shed some light on the whole issue.... do you think there might be a problem using pressure as the inlet condition? I would like to take this opportunity to thank you and the complete OpenFOAM team and community for the amazing support, and ofcourse... the clean, well organised and robust code structure!! Have a nice day! Philippose 

December 4, 2006, 17:14 
Hi,
I am carrying out a tra

#7 
Member
Ankur Gupta
Join Date: Mar 2009
Posts: 38
Rep Power: 15 
Hi,
I am carrying out a transient LES simulation, and there I am solving for a scalar that evolves in a steady state fashion at every time step, i.e., the equation for my scalar is: fvm::laplacian(diff,G)  fvm::Sp(abs,G) == Source where, G is the scalar I am solving for, diff and abs are material property parameters, and, source is the source term. The equation for G is very sensitive and needs to be solved with underrelaxing the changes in G from one iteration to the next. How can I use the underrelaxation factors for the above equation? I mean, what is the syntax to incorporate underrelaxation while solving for G ?? I came across G.relax() and G.prevStorIter() functions, but have no idea about how to use them in my code ?? Any help regarding this would be highly appreciated. Regards, Ankur 

December 4, 2006, 17:17 
G.relax() will do it. The und

#8 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,880
Rep Power: 31 
G.relax() will do it. The underrelaxation foacto is read from a dictionary.
Enjoy, Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

December 4, 2006, 17:20 
Sorry, I am being silly: G.rel

#9 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,880
Rep Power: 31 
Sorry, I am being silly: G.relax() will explicitly relax the variable using the value you've stored using storePrevIter().
If you want to underrelax the matrix by boosting the diagonal, make the equation: fvScalarMatrix GEqn ( fvm::laplacian(diff,G)  fvm::Sp(abs,G) == Source ); and relax the equation: GEqn.relax(); Apologies, Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

February 1, 2008, 01:10 
Hi, all:
I am also having s

#10 
Member
roy fokker
Join Date: Mar 2009
Posts: 44
Rep Power: 15 
Hi, all:
I am also having some problems with transientSimpleFoam which is downloaded here, I think the most different thing with the steadystate SimpleFoam is, it has nCorr, which is the "inner" iterations (according to Ferziger and Peric, 2002, pp173), the iteration number that is WITHIN each real time step. My question is, what value should nCorr be? I have read the post here: http://www.cfdonline.com/OpenFOAM_D...es/1/4608.html. However, if use the PISO values, it should be nCorrectors = 2, but does 2 inner iterations guarantee a "Convergence" within that real time step (inner step)? i.e. Is the 2 steps enough? In other words, what controls the convergence of each inner iteration process in TransientSimpleFoam? Or should we evaluate some kind of ContinuityErr? BTW, I think this also relates to the relaxation factors, doesn't it? Hope I have made the problem clear. Thanks! 

December 21, 2010, 03:20 

#11  
Member
George Pichurov
Join Date: Jul 2010
Posts: 52
Rep Power: 14 
Quote:
what happens next with the relaxation coefficient supplied in a dictionary, how it affects the solution? I have the observation that Relaxation coefficient of 1 suppresses the solution by quite a bit, which differs from my expectations that RF = 1 should not change it at all 

May 1, 2011, 16:21 

#12 
Senior Member
Join Date: Sep 2010
Posts: 226
Rep Power: 14 
Hi all,
I have 3 equations that are coupled together. First One is the momentum eqn in (U) is stationary no convection (stokes), and the others, one before it (Y) and another after it (C) that are transient convective (contain term fvm::ddt() + fvm::div(Phi, _). The problem is when using the simpleFoam solver for the implementation i succeeded to converge with 4 relaxation factors being used: 3 for the eqns (U,Y,C) + 1 for pressure. But my solution is time affected, and whenever i try not to use relaxation factors for (Y,C), it diverges. I don't really understand the effective or how to use the relaxtion factors for different equations that are coupled together, especially, when some of them are stationary and the others are transient. what to do???????????????? thanks a lot T.D. 

November 8, 2011, 20:27 

#13 
Member
Robin Gilbert
Join Date: Jan 2010
Posts: 66
Rep Power: 14 
deleted
Last edited by robingilbert; November 10, 2011 at 17:42. 

April 26, 2012, 04:26 

#14 
Senior Member
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 176
Rep Power: 14 
Hi foamers,
I also have a question concerning relaxation (OF 2.1.x). I solve a couple equations affecting the momentum eqn. The whole system doesn't converge very well, so I'm using underrelaxation and PIMPLEloop to help it. But I observe a little bit strange behavior of the solution residuals. For example, providing a relaxation factor of 0.7 to the UEqn (no momentum predictor) causes the system to converge much faster. At some point convergence criteria are satisfied, nothing happens any more, no equations are being solved so the solution is converged. But in the last PIMPLEIteration, where relaxation factors are automatically being set to 1, residuals jump again, and that is what I don't understand. I would expect such behavior if the last time step and not the last iteration is used for relaxation. Something I do is wrong, but I don't know what. Any ideas? Best regards, Ilya 

July 22, 2013, 06:02 

#15 
Senior Member
Join Date: Nov 2012
Posts: 171
Rep Power: 11 
Hello,
If what eugene said is correct, why does openfoam still provide the relaxation factors for the transient solvers (like in fireFoam solver): relaxationFactors { fields { } equations { "(Uk).*" 1; "(CH4O2H2OCO2hsepsilon).*" 1.0; } } Besides, could you please give me some hints about the difference between fields and equations relaxations? A little confused...... hz283 

March 10, 2014, 10:49 

#16 
Member
Heliana Cardenas
Join Date: Jul 2013
Posts: 30
Rep Power: 11 
Hello there!
I am using the viscoelasticFluidFoam solver and I am lost regarding the relaxation factors. I see how the affect my transients and steady state as well. I really don't know how to choose them, and I never get the "correct steady state" when I compare to analytical results... Help :/ 

March 20, 2014, 02:18 

#17 
Member
Fabian E.
Join Date: Nov 2009
Posts: 38
Rep Power: 14 
problem solved. take a look into: http://www.cfdonline.com/Forums/ope...tml#post481037
Last edited by galap; March 20, 2014 at 04:32. 

March 20, 2014, 02:23 

#18  
Member
Fabian E.
Join Date: Nov 2009
Posts: 38
Rep Power: 14 
Quote:


March 20, 2014, 03:43 

#19 
Member
Heliana Cardenas
Join Date: Jul 2013
Posts: 30
Rep Power: 11 
Hi Galap,
I am using this solver to evaluate transients, and when I remove the relaxation factors and go to low time step (which I have read should have the same effect as having relax factors) I still find a different timescale. Do you know this solver? cheers, heliana 

March 20, 2014, 04:39 

#20  
Member
Fabian E.
Join Date: Nov 2009
Posts: 38
Rep Power: 14 
Quote:


Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Under relaxation factors  ro  FLUENT  3  April 17, 2008 13:44 
Relaxation factors  Vidya Raja  FLUENT  7  September 26, 2006 20:00 
Underrelaxation factors  pUl  FLUENT  4  April 9, 2005 13:56 
Different Under Relaxation Factors  Ertan  FLUENT  7  November 11, 2004 04:07 
Relaxation Factors  Tim  Phoenics  3  June 30, 2004 02:03 