|
[Sponsors] |
November 26, 2006, 19:25 |
Hello again,
I was wonderi
|
#1 |
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25 |
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, 14:24 |
If you make your timestep smal
|
#2 |
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21 |
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 time-accurate, and you will violate continuity.
|
|
November 27, 2006, 14:32 |
Actually, if you run transient
|
#3 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
Actually, if you run transient SIMPLE, you need relaxation factors (and iterations within a time-step) as usual. Look for various versions of transientSimpleFoam hanging about. That should also help you with transient start-up 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, 08:39 |
Hey Hrv,
Would you happen t
|
#4 |
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25 |
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, 05:54 |
Enjoy: http://www.cfd-online.
|
#5 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
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, 14:10 |
Hello Hrv,
Thanks for the
|
#6 |
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25 |
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 post-processor 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, 18:14 |
Hi,
I am carrying out a tra
|
#7 |
Member
Ankur Gupta
Join Date: Mar 2009
Posts: 38
Rep Power: 17 |
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 under-relaxing the changes in G from one iteration to the next. How can I use the under-relaxation factors for the above equation? I mean, what is the syntax to incorporate under-relaxation 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, 18:17 |
G.relax() will do it. The und
|
#8 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
G.relax() will do it. The under-relaxation foacto is read from a dictionary.
Enjoy, Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
December 4, 2006, 18:20 |
Sorry, I am being silly: G.rel
|
#9 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
Sorry, I am being silly: G.relax() will explicitly relax the variable using the value you've stored using storePrevIter().
If you want to under-relax 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, 02:10 |
Hi, all:
I am also having s
|
#10 |
Member
roy fokker
Join Date: Mar 2009
Posts: 44
Rep Power: 17 |
Hi, all:
I am also having some problems with transientSimpleFoam which is downloaded here, I think the most different thing with the steady-state 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.cfd-online.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, 04:20 |
|
#11 | |
Member
George Pichurov
Join Date: Jul 2010
Posts: 52
Rep Power: 16 |
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, 17:21 |
|
#12 |
Senior Member
Join Date: Sep 2010
Posts: 226
Rep Power: 17 |
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, 21:27 |
|
#13 |
Member
Robin Gilbert
Join Date: Jan 2010
Posts: 66
Rep Power: 16 |
deleted---
Last edited by robingilbert; November 10, 2011 at 18:42. |
|
April 26, 2012, 05:26 |
|
#14 |
Senior Member
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 176
Rep Power: 17 |
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 under-relaxation and PIMPLE-loop 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 PIMPLE-Iteration, 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, 07:02 |
|
#15 |
Senior Member
Join Date: Nov 2012
Posts: 171
Rep Power: 14 |
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 { "(U|k).*" 1; "(CH4|O2|H2O|CO2|hs|epsilon).*" 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, 11:49 |
|
#16 |
Member
Heliana Cardenas
Join Date: Jul 2013
Posts: 30
Rep Power: 13 |
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, 03:18 |
|
#17 |
Member
Fabian E.
Join Date: Nov 2009
Posts: 38
Rep Power: 16 |
problem solved. take a look into: http://www.cfd-online.com/Forums/ope...tml#post481037
Last edited by galap; March 20, 2014 at 05:32. |
|
March 20, 2014, 03:23 |
|
#18 | |
Member
Fabian E.
Join Date: Nov 2009
Posts: 38
Rep Power: 16 |
Quote:
|
||
March 20, 2014, 04:43 |
|
#19 |
Member
Heliana Cardenas
Join Date: Jul 2013
Posts: 30
Rep Power: 13 |
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 time-scale. Do you know this solver? cheers, heliana |
|
March 20, 2014, 05:39 |
|
#20 | |
Member
Fabian E.
Join Date: Nov 2009
Posts: 38
Rep Power: 16 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Under relaxation factors | ro | FLUENT | 3 | April 17, 2008 14:44 |
Relaxation factors | Vidya Raja | FLUENT | 7 | September 26, 2006 21:00 |
Under-relaxation factors | pUl| | FLUENT | 4 | April 9, 2005 14:56 |
Different Under Relaxation Factors | Ertan | FLUENT | 7 | November 11, 2004 05:07 |
Relaxation Factors | Tim | Phoenics | 3 | June 30, 2004 03:03 |