CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Solver details

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By hjasak

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 22, 2005, 07:28
Default Hi. I'm looking at the foam::f
  #1
Senior Member
 
Gavin Tabor
Join Date: Mar 2009
Posts: 181
Rep Power: 17
grtabor is on a distinguished road
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
grtabor is offline   Reply With Quote

Old   July 22, 2005, 07:32
Default Su: Explicit source -> contrib
  #2
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
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.
henry is offline   Reply With Quote

Old   July 25, 2005, 12:23
Default Thanks. Am I right in thinking
  #3
Senior Member
 
Gavin Tabor
Join Date: Mar 2009
Posts: 181
Rep Power: 17
grtabor is on a distinguished road
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
grtabor is offline   Reply With Quote

Old   July 25, 2005, 12:45
Default Implicit source can be more st
  #4
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
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.
mattijs is offline   Reply With Quote

Old   July 25, 2005, 15:12
Default Easy. Think source or sink:
  #5
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
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
SHUBHAM9595 and parthigcar like this.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   October 24, 2005, 06:50
Default I understand Mattijs comment b
  #6
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18
maka is on a distinguished road
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
maka is offline   Reply With Quote

Old   October 24, 2005, 15:06
Default "not bounded above" : no upper
  #7
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
"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.
mattijs is offline   Reply With Quote

Old   June 26, 2009, 10:48
Default
  #8
Senior Member
 
Aram Amouzandeh
Join Date: Mar 2009
Location: Vienna, Vienna, Austria
Posts: 190
Rep Power: 17
mabinty is on a distinguished road
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
mabinty is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 06:23.