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

continuity source term in momentum Eq

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 23, 2015, 00:56
Default continuity source term in momentum Eq
  #1
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24
nimasam is on a distinguished road
would you please help me to figure out following source codes:

in interPhaseChangeFoam, UEqn.H:

Code:
fvVectorMatrix UEqn
    (
        fvm::ddt(rho, U)
      + fvm::div(rhoPhi, U)
      - fvm::Sp(fvc::ddt(rho) + fvc::div(rhoPhi), U)
      + turbulence->divDevRhoReff(rho, U)
    );
in DPMFoam, UEqn.H:

Code:
fvVectorMatrix UcEqn
(
    fvm::ddt(alphac, Uc) + fvm::div(alphaPhic, Uc)
  - fvm::Sp(fvc::ddt(alphac) + fvc::div(alphaPhic), Uc)
  + continuousPhaseTurbulence->divDevRhoReff(Uc)
 ==
    (1.0/rhoc)*cloudSU
);

as much as i understand both "Sp" lines should be mathematically zero , they are continuity terms which multiply with U, my question is why they add to momentum equation and why it considered as negative source terms?
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
nimasam is offline   Reply With Quote

Old   February 24, 2015, 01:09
Default
  #2
Senior Member
 
T. Chourushi
Join Date: Jul 2009
Posts: 321
Blog Entries: 1
Rep Power: 17
Tushar@cfd is on a distinguished road
Quote:
Originally Posted by nimasam View Post
would you please help me to figure out following source codes:

in interPhaseChangeFoam, UEqn.H:

Code:
fvVectorMatrix UEqn
    (
        fvm::ddt(rho, U)
      + fvm::div(rhoPhi, U)
      - fvm::Sp(fvc::ddt(rho) + fvc::div(rhoPhi), U)
      + turbulence->divDevRhoReff(rho, U)
    );
in DPMFoam, UEqn.H:

Code:
fvVectorMatrix UcEqn
(
    fvm::ddt(alphac, Uc) + fvm::div(alphaPhic, Uc)
  - fvm::Sp(fvc::ddt(alphac) + fvc::div(alphaPhic), Uc)
  + continuousPhaseTurbulence->divDevRhoReff(Uc)
 ==
    (1.0/rhoc)*cloudSU
);

as much as i understand both "Sp" lines should be mathematically zero , they are continuity terms which multiply with U, my question is why they add to momentum equation and why it considered as negative source terms?
Dear Nima,

I guess the additional term is due to variable density (rho). Had it been incompressible fluid it would have been zero. Since, for compressible flows these variables cannot be ignored. Please rectify me if I miss anything as I am not well versed with compressible flows.

-
Best Regards!
Tushar@cfd is offline   Reply With Quote

Old   March 5, 2015, 17:22
Default
  #3
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
Hello guys!!

Pls see the image:


The reason maybe in this way, its conservative.

This is like twoPhaseEulerFoam's code. In openfoam 22x, this kind of equation is implemented in non-conservative way, but in OpenFOAM 23x, its implemented in conservative way. U can compare the code to check it out.

Best,
Attached Images
File Type: jpg eqn.jpg (37.2 KB, 241 views)
sharonyue is offline   Reply With Quote

Old   March 13, 2015, 04:39
Default
  #4
New Member
 
Ramon
Join Date: Feb 2014
Location: Eindhoven
Posts: 25
Rep Power: 12
RjwV is on a distinguished road
Hello everyone,

I am not sure but perhaps this has something to do with the diagonal dominance of the system? Although this would only make sense if the Sp term would be negative before converging to zero... if it would be slightly positive before converging to zero it would negatively affect the diagonal dominance...

Again, I am not sure about this, one of the remaining mysteries I am trying to figure out.

Kind regards,
Ramon
RjwV is offline   Reply With Quote

Reply

Tags
continuity source, momentum


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
implicit - scalar product source term in momentum equation vinch OpenFOAM Running, Solving & CFD 0 October 28, 2014 14:57
Trouble compiling utilities using source-built OpenFOAM Artur OpenFOAM Programming & Development 14 October 29, 2013 10:59
dynamic Mesh is faster than MRF???? sharonyue OpenFOAM Running, Solving & CFD 14 August 26, 2013 07:47
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 11:44
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51


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