# Solver details

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

 July 22, 2005, 06:28 Hi. I'm looking at the foam::f #1 Senior Member   Gavin Tabor Join Date: Mar 2009 Posts: 181 Rep Power: 9 Hi. I'm looking at the foam::fvm namespace to try and understand the various operations. Most are pretty obvious; however I'm stuck about the source operators. Can someone tell me what the difference between Su, Sp and SuSp is, please? Thanks Gavin

 July 22, 2005, 06:32 Su: Explicit source -> contrib #2 Senior Member   Join Date: Mar 2009 Posts: 854 Rep Power: 14 Su: Explicit source -> contribution to the source Sp: Implicit source -> contribution to the diagonal SuSp: Stabilised implicit source -> contribution to the diagonal or source depending on sign of first argument for stability.

 July 25, 2005, 11:23 Thanks. Am I right in thinking #3 Senior Member   Gavin Tabor Join Date: Mar 2009 Posts: 181 Rep Power: 9 Thanks. Am I right in thinking that the Implicit source is generally more stable? What determines which of these operators to use? Basically I am (with a PhD student) developing swirl inlets for LES; we are trying to encorporate a body force term to drive the swirl motion. We have created a field 'swirl' to drive this and have just added it into the UEqn object fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U) + sgsModel->divB(U) == gradP+swirl ); How does this differ from use of the operators? Gavin

 July 25, 2005, 11:45 Implicit source can be more st #4 Super Moderator   Mattijs Janssens Join Date: Mar 2009 Posts: 1,416 Rep Power: 17 Implicit source can be more stable. Its only use is to create a larger diagonal term (to aid the solver) so it only can be used if the linerization of the source term has a negative dependency on the variable you're solving for. e.g. source S linearized with respect to U: S = f(U) = Sp*U+Su So now in your discretized U eqn you can add -Sp to the diagonal which will help the solver to converge.

 July 25, 2005, 14:12 Easy. Think source or sink: #5 Senior Member   Hrvoje Jasak Join Date: Mar 2009 Location: London, England Posts: 1,783 Rep Power: 22 Easy. Think source or sink: - if the variable is not bounded above (think k) and the rhs term is positive, you can just keep it as explicit. There will be no advantage of making it implicit as it would reduce the diagonal dominance and either break the iterative solver or make it work harder. - if the variable is bounded below by zero (again think k), you need to make sure that the discretised version honours this. In that case, the sink term must go to zero when k goes to zero - this will stop it going below. Also, a negative rhs term on linearisation (thanks, Mattijs) will enhance the diagonal dominance, so you get a double benefit. - if you cannot tell for sure whether the term is positivi or negative (say, it's a complex coupling term), using SuSp will make a decision for you on a cell-by-cell basis. However, you'll have to be extra-careful with boundedness and consistency of this kind of term. In your case, you'll probably want to make drag terms implicit and the terms making the flow swirl explicit (source of energy, right?) Good luck, Hrv __________________ Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk

 October 24, 2005, 05:50 I understand Mattijs comment b #6 Senior Member   Maka Mohu Join Date: Mar 2009 Posts: 305 Rep Power: 10 I understand Mattijs comment but can any body explain more about Hrv comment: "variable is not bounded above" "bounded below by zero" "you'll have to be extra-careful with boundedness and consistency of this kind of term" Thanks, Maka

 October 24, 2005, 14:06 "not bounded above" : no upper #7 Super Moderator   Mattijs Janssens Join Date: Mar 2009 Posts: 1,416 Rep Power: 17 "not bounded above" : no upper limit for the variable. k does not have an upper value. E.g. a phase fraction (e.g. 'gamma') does. "bounded below by zero" : k cannot go negative.

 June 26, 2009, 09:48 #8 Senior Member   Aram Amouzandeh Join Date: Mar 2009 Location: Vienna, Vienna, Austria Posts: 186 Rep Power: 9 Dear all! I kindly ask for clarification concerning the operator fvm::SuSp(). The code says (src/finiteVolume/finiteVolume/fvm): Foam::fvm::SuSp ( const DimensionedField& susp, GeometricField& vf ) { .... fvm.diag() += mesh.V()*max(susp.field(), scalar(0)); fvm.source() -= mesh.V()*min(susp.field(), scalar(0)) *vf.internalField(); .... } Do I get it right that, if the source is written as S(phi) = Su + Sp*phi fvm::SuSp() checks whether (-Sp) is >0 and adds (-Sp)*V to the diagonal coefficients, or (-Sp) is <0 and adds -(-Sp)*V*phi=Sp*V*phi to the source? So say I have a source term like S(phi) = P*phi and P changes its sign. Hence I have to write - fvm::SuSp((-P), phi) Thx in advance for your comments!! Aram

 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 prasad Main CFD Forum 0 March 26, 2007 23:25 amel FLUENT 0 April 13, 2006 03:46 styoung317 Main CFD Forum 0 June 24, 2005 04:49 madhusudan Main CFD Forum 1 April 26, 2005 09:44 joseph Main CFD Forum 4 July 12, 2001 15:44

All times are GMT -4. The time now is 12:26.