# Source terms in equations

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

 November 25, 2009, 08:23 Source terms in equations #1 Member   Kapa Lilla Join Date: Mar 2009 Location: Bruxelles, Belgium Posts: 54 Rep Power: 10 Dear All, I try to add source terms in all the equations in coodles. When I add one to the density - so to the continuity equation - I found a rather strange behaviour. I printed out the magnitude of my source term from the function it calculates and from the solver itself (like rhoEqn.source()). Good news, they coincide. On the other hand: diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 It seems that the sources computed and assigned, but during the iterations they are not considered. Can anyone help me on this issue? Thanks, Lilla

 November 25, 2009, 08:35 #2 Super Moderator     Niklas Nordin Join Date: Mar 2009 Location: Stockholm, Sweden Posts: 693 Rep Power: 22 If you're adding a source term to the continuity equations dont forget the addition to the PISO loop.

 November 25, 2009, 08:39 #3 Member   Kapa Lilla Join Date: Mar 2009 Location: Bruxelles, Belgium Posts: 54 Rep Power: 10 I did modify it as well. Unfortunatelly.

 November 26, 2009, 06:40 #4 Member   Kapa Lilla Join Date: Mar 2009 Location: Bruxelles, Belgium Posts: 54 Rep Power: 10 I've performed an other test as well. Now with the original OF solver, so without source terms. It is a cavity flow. In fact the simulation is running, and the results seems meaningful. But I still have that funny line: diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 Have anyone idea why is it like that? Thanks, Lilla

 November 26, 2009, 06:56 #5 Super Moderator     Niklas Nordin Join Date: Mar 2009 Location: Stockholm, Sweden Posts: 693 Rep Power: 22 because your matrix is purely diagonal. fvm::ddt(rho) + fvc::div(phi) = S produces a matrix-vector system like A*rho = H and if A dont have any offdiagonal elements you can solve for rho exactly in 1 iteration.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post jsm Main CFD Forum 4 August 20, 2009 06:44 allenzhao OpenFOAM Installation 127 January 30, 2009 20:08 hjasak OpenFOAM Post-Processing 69 April 24, 2008 01:24 jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51 Greg Perkins FLUENT 8 October 20, 2000 12:40

All times are GMT -4. The time now is 22:07.