CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM

Understanding fvm::Sp()

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

Like Tree4Likes
  • 4 Post By Simon Lapointe

LinkBack Thread Tools Display Modes
Old   May 22, 2010, 06:17
Default Understanding fvm::Sp()
New Member
Join Date: May 2010
Posts: 2
Rep Power: 0
Hyu is on a distinguished road
I was reading the code for the LaunderSharmaKE model (incompressible), then I ran into this:

  tmp<fvScalarMatrix> epsEqn
      + fvm::div(phi_, epsilonTilda_)
      - fvm::laplacian(DepsilonEff(), epsilonTilda_)
      - fvm::Sp(C2_*f2()*epsilonTilda_/k_, epsilonTilda_)
      + E
I have a question: Why is one term represented with fvm::Sp() and the others (though pretty similar) are not?
Hyu is offline   Reply With Quote

Old   May 22, 2010, 06:43
Simon Lapointe
Join Date: May 2009
Location: Québec, Qc, Canada
Posts: 33
Rep Power: 8
Simon Lapointe is on a distinguished road
fvm::Sp makes the source term implicit so it contributes to the diagonal. This can help convergence when the source term is negative on the rhs (sink term). This is the case in the equation you've shown.

The two other source terms are positive on the rhs and therefore left explicit. Making them implicit would reduce the diagonal dominance of the matrix and probably cause problems to the solver.

Hope this helps
Simon Lapointe is offline   Reply With Quote

Old   May 22, 2010, 08:38
New Member
Join Date: May 2010
Posts: 2
Rep Power: 0
Hyu is on a distinguished road
Thank you for your fast and complete answer. That is wat I wanted to know.
Hyu is offline   Reply With Quote

Old   May 26, 2010, 09:21
Costas K
Join Date: Nov 2009
Location: UK
Posts: 51
Rep Power: 8
thekay is on a distinguished road
Send a message via ICQ to thekay Send a message via MSN to thekay
On the basis of the above explanation, is it advised to have the pressure on the right hand side of the equation to solve, in an expression that is treated implicitly, or the opposite? For instance the hEqn.H of buoyantSimpleFoam, has pressure under fvc:
fvm::div(phi, h)
      - fvm::Sp(fvc::div(phi), h)
      - fvm::laplacian(turbulence->alphaEff(), h)
      - p*fvc::div(phi/fvc::interpolate(rho))
thekay is offline   Reply With Quote


Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem understanding rhoPisoFoam MatP OpenFOAM Running, Solving & CFD 1 May 15, 2010 13:21
Help using an understanding y+ siw CFX 4 October 4, 2009 10:23
Understanding of channelOodles and oodles solver fs82 OpenFOAM 1 September 23, 2009 10:36
understanding dual-time stepping srinath Main CFD Forum 1 August 11, 2008 11:05
Help understanding Memory Allocation Factor Todd CFX 1 March 6, 2008 14:27

All times are GMT -4. The time now is 15:49.