# Source term in the compressible momentum equation

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 April 9, 2015, 17:13 Source term in the compressible momentum equation #1 New Member   Daniel Duque Join Date: Jan 2011 Location: ETSIN, Madrid Posts: 28 Rep Power: 14 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 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

April 9, 2015, 17:33
#2
Member

ali alkebsi
Join Date: Jan 2012
Location: Strasbourg, France
Posts: 82
Rep Power: 13
Quote:
 Originally Posted by dduque Perhaps that's what fvm::laplacian(muEff(), U) is ??
In openfoam fvm::laplacian(a, b) is

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

April 10, 2015, 04:58
#3
New Member

Daniel Duque
Join Date: Jan 2011
Posts: 28
Rep Power: 14
Quote:
 Originally Posted by kebsiali In openfoam fvm::laplacian(a, b) is
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.

 Thread Tools Search this Thread Search this Thread: Advanced Search Display Modes Linear Mode

 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 OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post styleworker OpenFOAM Programming & Development 3 September 7, 2022 03:09 AB08 OpenFOAM 28 February 2, 2016 01:22 [swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 16:02 Enrico FLUENT 9 May 30, 2014 11:34 segersson OpenFOAM Running, Solving & CFD 5 March 2, 2006 23:06

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

 Contact Us - CFD Online - Privacy Statement - Top