|
[Sponsors] |
July 22, 2005, 07:28 |
Hi. I'm looking at the foam::f
|
#1 |
Senior Member
Gavin Tabor
Join Date: Mar 2009
Posts: 181
Rep Power: 17 |
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, 07:32 |
Su: Explicit source -> contrib
|
#2 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
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, 12:23 |
Thanks. Am I right in thinking
|
#3 |
Senior Member
Gavin Tabor
Join Date: Mar 2009
Posts: 181
Rep Power: 17 |
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, 12:45 |
Implicit source can be more st
|
#4 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
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, 15:12 |
Easy. Think source or sink:
|
#5 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
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, 06:50 |
I understand Mattijs comment b
|
#6 |
Senior Member
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18 |
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, 15:06 |
"not bounded above" : no upper
|
#7 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
"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, 10:48 |
|
#8 |
Senior Member
Aram Amouzandeh
Join Date: Mar 2009
Location: Vienna, Vienna, Austria
Posts: 190
Rep Power: 17 |
Dear all!
I kindly ask for clarification concerning the operator fvm::SuSp(). The code says (src/finiteVolume/finiteVolume/fvm): Foam::fvm::SuSp ( const DimensionedField<scalar, volMesh>& susp, GeometricField<Type, fvPatchField, volMesh>& 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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
details | prasad | Main CFD Forum | 0 | March 27, 2007 00:25 |
details about FLUENT | amel | FLUENT | 0 | April 13, 2006 04:46 |
Some details | styoung317 | Main CFD Forum | 0 | June 24, 2005 05:49 |
details of cfd | madhusudan | Main CFD Forum | 1 | April 26, 2005 10:44 |
Details of Y+ | joseph | Main CFD Forum | 4 | July 12, 2001 16:44 |