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

Source term in OpenFOAM: fvc vs fvm

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By Sylv

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 20, 2014, 06:39
Default Source term in OpenFOAM: fvc vs fvm
  #1
New Member
 
Marcel Vonlanthen
Join Date: Nov 2012
Location: Zurich, Switzerland
Posts: 28
Rep Power: 13
Sylv is on a distinguished road
Dear Foamer,

I have to add a source term in the momentum equation of my pimpleFoam solver (OpenFOAM 2.3.0). Therefore, I simply add a extra term to UEqu:

Code:
tmp<fvVectorMatrix> UEqn
(
    fvm::ddt(U)
  + fvm::div(phi, U)
  + turbulence->divDevReff(U)
== 
     fvc::Sp(someForce)   //this is the extra line
);
If I use "fvc::Sp", the source term is treated explicitly, meaning it is left in the right hand side of the linear system AU=B (in B...). If I use fvm::Sp, the source term is added to the matrix A (implicit source).

Nevertheless, in the file which defined fvc::Sp ($FOAM_SRC/finiteVolume/finiteVolume/fvc/fvcSup.H) there are three definition of a source: Sp, Su and SuSp. Sp is advertised as "implicite", Su=''explicite'' and SuSp="A mix of Sp an Su". Same in $FOAM_SRC/finiteVolume/finiteVolume/fvm/fvmSup.H

Question: what is then the difference between fvc::Sp and fvc::Su? They should both populate B of the linear system. Same question for fvm::Sp and fvm::Su.

Cheers,
Marcel
Zhiheng Wang and granzer like this.
Sylv 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
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 03:30
[swak4Foam] groovyBC in openFOAM-2.0 for parabolic velocity bc ofslcm OpenFOAM Community Contributions 25 March 6, 2017 10:03
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 16:02
OpenFOAM 2.2.2 source pack installation on Xubuntu 13.10 zordiack OpenFOAM Installation 1 October 26, 2013 13:08
centOS 5.6 : paraFoam not working yossi OpenFOAM Installation 2 October 9, 2013 01:41


All times are GMT -4. The time now is 14:01.