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

Question about the fvm::SuSp, and fvm::Sp

Register Blogs Community New Posts Updated Threads Search

Like Tree9Likes
  • 1 Post By cheng1988sjtu
  • 1 Post By cheng1988sjtu
  • 7 Post By rama13

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 6, 2012, 09:37
Talking Question about the fvm::SuSp, and fvm::Sp
  #1
Member
 
Charlie
Join Date: Dec 2010
Location: USA
Posts: 85
Rep Power: 15
cheng1988sjtu is on a distinguished road
Hi Foamers!

When I'm programming with the OpenFOAM, I got confused with the difference between fvm::SuSp, and fvm::Sp, could anybody tell me the difference? As far as I know, fvm::SuSp(a,b) will calculate a*b implicitly or explicitly according to the sign of a, however, when a is positive, is fvm::Sp explicit or implicit? fvm::Sp(a,b) will calculate a*b implicitly anyway.

The second question is related to a phenomenon I found when I'm solving the continuity equation, the exact form should be :

ddt(alpha) + div(phia, alpha) - alpha * div(phia) ==0

This supposed to be solving ddt(alpha) + U_a*grad(alpha) =0, and the implementation I made in the code is : (alpha is a scalar, volume fraction)

fvScalarMatrix alphaEqn
(
fvm::ddt(alpha)
+ fvm::div(phia, alpha, scheme)
- fvm::Sp(fvc::div(phia), alpha, schemer)
);
where phia = fvc::interpolation(Ua) *mesh.Sf()

Interestingly, after this, I got that alpha does not change with time anymore, which means that the equation reduced to ddt(alpha) =0, which is clearly not true if we take the definition of fvm::Sp().

However, my worry is that, in the momentum equation, they are solving :

fvm::ddt(Ua)
+ fvm::div(phia, Ua, "div(phia,Ua)")
- fvm::Sp(fvc::div(phia), Ua)
== ........

I'm wondering if this fvm::Sp( ) makes a difference between the scalar source and vector source. Thanks!!!!

Any idea would be appreciated!!
rarnaunot likes this.
cheng1988sjtu is offline   Reply With Quote

Old   June 6, 2012, 10:06
Default Sorry for the mistake I made in the continuity equation
  #2
Member
 
Charlie
Join Date: Dec 2010
Location: USA
Posts: 85
Rep Power: 15
cheng1988sjtu is on a distinguished road
Hi

I made a mistake, I think the exact form for continuity equation should be:

ddt(alpha) + div(alpha*phia) =0

not : ddt(alpha) + U_a*grad(alpha) =0

So, forget about the continuity equation I described, however, the question about the difference between fvm::SuSp() and fvm::Sp() is still valid, Thanks!

Zhen
vivek05 likes this.
cheng1988sjtu is offline   Reply With Quote

Old   October 10, 2014, 04:52
Default A bit late, but however...
  #3
New Member
 
rama13's Avatar
 
Damiano Natali
Join Date: Mar 2013
Location: Genova, Italy
Posts: 17
Rep Power: 13
rama13 is on a distinguished road
A bit late, but however...this page on the wiki helps a lot in clarifying!
rama13 is offline   Reply With Quote

Old   June 30, 2018, 03:29
Default I have the same doubt as well
  #4
New Member
 
Amal
Join Date: May 2018
Posts: 3
Rep Power: 7
AmalSoman is on a distinguished road
The page mentioned doesn't give much idea more than what Cheng has already mentioned.


Can someone please tell, in which case I should use Sp and where I should use SuSp?


Thank you
AmalSoman is offline   Reply With Quote

Old   June 30, 2018, 13:03
Default
  #5
Senior Member
 
Zeppo's Avatar
 
Sergei
Join Date: Dec 2009
Posts: 261
Rep Power: 21
Zeppo will become famous soon enough
Hi! Here you can find some more info on SuSp:
fvMatrix, fvOptions and SuSp: automatic implicit/explicit source-term treatment
Zeppo 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



All times are GMT -4. The time now is 08:45.