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

Source term in the compressible momentum equation

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By kebsiali

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 9, 2015, 18:13
Default Source term in the compressible momentum equation
  #1
New Member
 
Daniel Duque
Join Date: Jan 2011
Location: ETSIN, Madrid
Posts: 28
Rep Power: 15
dduque is on a distinguished road
Hello everyone.

I'm studying this piece of code for the source term in the momentum equation. It's a laminar, compressible simulation in which mu is NOT constant.

Code:
tmp<fvVectorMatrix> laminar::divDevRhoReff(volVectorField& U) const
{
    return
    (
      - fvm::laplacian(muEff(), U)
      - fvc::div(muEff()*dev2(T(fvc::grad(U))))
    );
}
I'm guessing it means these right hand side terms in the Navier-Stokes momentum equation:

Laplacian( mu U) + div ( mu ( gradU^t - (2/3) divU I ) )

If mu was constant I would be happy, even if the second term is mathematically equal to (1/3) grad divU. There is surely some reason to write it this way. But I am concerned with the first term, which should be:

div ( mu gradU)

Perhaps that's what fvm::laplacian(muEff(), U) is ??

(It could also be mu Laplacian U, which wouldn't be good.)

Btw, it seems the fluid is supposed to be Stokesian, so that lamba+(2/3) mu =0, am I right?

Thanks!

Daniel
dduque is offline   Reply With Quote

Old   April 9, 2015, 18:33
Default
  #2
Member
 
ali alkebsi
Join Date: Jan 2012
Location: Strasbourg, France
Posts: 82
Rep Power: 14
kebsiali is on a distinguished road
Quote:
Originally Posted by dduque View Post
Perhaps that's what fvm::laplacian(muEff(), U) is ??
In openfoam fvm::laplacian(a, b) is


\nabla \cdot \left( a \nabla b \right)


where a is to be linearized (explicit) and b is to be discretized

so yes is the answer to that little question

and dev is the deviatoric part which is the same as what you expect i think
dduque likes this.
kebsiali is offline   Reply With Quote

Old   April 10, 2015, 05:58
Default
  #3
New Member
 
Daniel Duque
Join Date: Jan 2011
Location: ETSIN, Madrid
Posts: 28
Rep Power: 15
dduque is on a distinguished road
Quote:
Originally Posted by kebsiali View Post
In openfoam fvm::laplacian(a, b) is


\nabla \cdot \left( a \nabla b \right)

Great! Everything is fine, then. Yes, dev is the deviatoric part, and dev2 is a funny

dev2(s)=s - (2/3) trace(s) I

The deviatoric is

dev(s)=s - (1/3) trace(s) I ,

but it's precisely dev2 which is needed in this case.
dduque is offline   Reply With Quote

Reply

Tags
compressible flow, laplacian operator, momentum equation, momentum source, navier-stokes solver


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
Source Term due to evaporation in energy transport equation styleworker OpenFOAM Programming & Development 3 September 7, 2022 04:09
what is swap4foam ?? AB08 OpenFOAM 28 February 2, 2016 02:22
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 17:02
UDF for source term in momentum equation Enrico FLUENT 9 May 30, 2014 12:34
Adding a momentum source term segersson OpenFOAM Running, Solving & CFD 5 March 3, 2006 00:06


All times are GMT -4. The time now is 13:51.