|
[Sponsors] |
November 25, 2009, 08:23 |
Source terms in equations
|
#1 |
Member
Kapa Lilla
Join Date: Mar 2009
Location: Bruxelles, Belgium
Posts: 57
Rep Power: 17 |
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: 29 |
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: 57
Rep Power: 17 |
I did modify it as well. Unfortunatelly.
|
|
November 26, 2009, 06:40 |
|
#4 |
Member
Kapa Lilla
Join Date: Mar 2009
Location: Bruxelles, Belgium
Posts: 57
Rep Power: 17 |
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: 29 |
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. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using source terms | jsm | Main CFD Forum | 4 | August 20, 2009 07:44 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 20:08 |
DxFoam reader update | hjasak | OpenFOAM Post-Processing | 69 | April 24, 2008 02:24 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |
UDF Scalar Code: HT 1 | Greg Perkins | FLUENT | 8 | October 20, 2000 13:40 |