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

A question about UEqn sonicFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 2 Post By sasanghomi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 14, 2012, 21:25
Default A question about UEqn sonicFoam
  #1
Member
 
lfgmarc's Avatar
 
Luis Felipe Gutierrez Marcantoni
Join Date: Oct 2010
Location: Cordoba-Argentina
Posts: 47
Rep Power: 15
lfgmarc is on a distinguished road
Send a message via MSN to lfgmarc
Hi, I have a question about the UEqn implemented into sonicFoam, the code of the UEqn is:

Code:
fvVectorMatrix UEqn
(
    fvm::ddt(rho, U)
    + fvm::div(phi, U)
    + turbulence->divDevRhoReff(U)
);
My question is about the term that is computed from the turbulence model, i.e if K-epsilon model is selected, this term results:

Code:
tmp<fvVectorMatrix> kEpsilon::divDevRhoReff(volVectorField& U) const
{
    return
    (
      - fvm::laplacian(muEff(), U)
      - fvc::div(muEff()*dev2(fvc::grad(U)().T()))
    );
}
Initially I thought that it corresponded to

\nabla \cdot \left( \widetilde{\tau}-\bar{\rho}\widetilde{u^{''}u^{''}} \right) =
2\mu\left( \widetilde{S}-\frac{1}{3}\nabla\cdot\left(\widetilde{u}\right)\mathcal{I}\right) 
+\left( 2\mu_{t}\left( \widetilde{S}-\frac{1}{3}\nabla\cdot\left(\widetilde{u}\right)\mathcal{I}\right) -
\frac{2}{3}\bar{\rho}\widetilde{k}\mathcal{I}
\right) (1)

but after examining the definition of dev2 in src/OpenFOAM/primitives/Tensor/TensorI.H

I found the following:

dev2(u)=u-\frac{2}{3}tr\left(u\right)

S is the rate-of-strain tensor given by

S=\frac{1}{2}\left(\nabla u + \left(\nabla u \right)^\mathrm{T} \right)

but according to the definition of DivDevRhoReff

divDevRhoReff = -\nabla^{2}\left(\mu_{eff} U\right)
-\nabla \cdot \left( dev2 \left(\mu_{eff}\left(\nabla U \right)^{\mathrm{T}}\right)\right)

And manipulating the expression (1) I conclude that the term

Code:
     + turbulence->divDevRhoReff(U)
does not correspond to (1).

If someone can help me with my confusion about this term, I was very thankful
__________________
Felipe G

Last edited by lfgmarc; July 15, 2012 at 15:34.
lfgmarc is offline   Reply With Quote

Old   January 24, 2013, 13:26
Default
  #2
Senior Member
 
Join Date: Jul 2011
Posts: 120
Rep Power: 14
haze_1986 is on a distinguished road
Quote:
Originally Posted by lfgmarc View Post
Hi, I have a question about the UEqn implemented into sonicFoam, the code of the UEqn is:

Code:
fvVectorMatrix UEqn
(
    fvm::ddt(rho, U)
    + fvm::div(phi, U)
    + turbulence->divDevRhoReff(U)
);
My question is about the term that is computed from the turbulence model, i.e if K-epsilon model is selected, this term results:

Code:
tmp<fvVectorMatrix> kEpsilon::divDevRhoReff(volVectorField& U) const
{
    return
    (
      - fvm::laplacian(muEff(), U)
      - fvc::div(muEff()*dev2(fvc::grad(U)().T()))
    );
}
Initially I thought that it corresponded to

\nabla \cdot \left( \widetilde{\tau}-\bar{\rho}\widetilde{u^{''}u^{''}} \right) =
2\mu\left( \widetilde{S}-\frac{1}{3}\nabla\cdot\left(\widetilde{u}\right)\mathcal{I}\right) 
+\left( 2\mu_{t}\left( \widetilde{S}-\frac{1}{3}\nabla\cdot\left(\widetilde{u}\right)\mathcal{I}\right) -
\frac{2}{3}\bar{\rho}\widetilde{k}\mathcal{I}
\right) (1)

but after examining the definition of dev2 in src/OpenFOAM/primitives/Tensor/TensorI.H

I found the following:

dev2(u)=u-\frac{2}{3}tr\left(u\right)

S is the rate-of-strain tensor given by

S=\frac{1}{2}\left(\nabla u + \left(\nabla u \right)^\mathrm{T} \right)

but according to the definition of DivDevRhoReff

divDevRhoReff = -\nabla^{2}\left(\mu_{eff} U\right)
-\nabla \cdot \left( dev2 \left(\mu_{eff}\left(\nabla U \right)^{\mathrm{T}}\right)\right)

And manipulating the expression (1) I conclude that the term

Code:
     + turbulence->divDevRhoReff(U)
does not correspond to (1).

If someone can help me with my confusion about this term, I was very thankful
Indeed, I was thinking it should be dev instead of dev2 as well if the explanation by poplar in http://www.cfd-online.com/Forums/ope...tml#post388688 is correct.

I hope I can find out what is wrong.
haze_1986 is offline   Reply With Quote

Old   February 15, 2013, 10:07
Default
  #3
Senior Member
 
Jens Klostermann
Join Date: Mar 2009
Posts: 117
Rep Power: 17
jens_klostermann is on a distinguished road
Hi,

the term

\nabla\cdot\left[2\mu\left( \widetilde{S}-\frac{1}{3}\nabla\cdot\left(\widetilde{u}\right)\mathcal{I}\right) 
+\left( 2\mu_{t}\left( \widetilde{S}-\frac{1}{3}\nabla\cdot\left(\widetilde{u}\right)\mathcal{I}\right)
\right)\right]
is equal to
divDevRhoReff = -\nabla \cdot \left(\mu_{eff} \nabla U\right)
-\nabla \cdot \left( dev2 \left(\mu_{eff}\left(\nabla U \right)^{\mathrm{T}}\right)\right)


But I miss the term
\left(-
\frac{2}{3}\bar{\rho}\widetilde{k}\mathcal{I}
\right)

in
Code:
turbulence->divDevRhoReff(U)
maybe someone can comment on this hidden term?

Jens
jens_klostermann is offline   Reply With Quote

Old   June 14, 2013, 16:36
Default
  #4
Senior Member
 
Sasan Ghomi
Join Date: Sep 2012
Location: Denmark
Posts: 292
Rep Power: 14
sasanghomi is on a distinguished road
Hi jens
Did you find this term ? I have a similar problem .
\left(-
\frac{2}{3}\bar{\rho}\widetilde{k}\mathcal{I}
\right)

Thanks
Sasan.
sasanghomi is offline   Reply With Quote

Old   June 17, 2013, 10:57
Default
  #5
Senior Member
 
Jens Klostermann
Join Date: Mar 2009
Posts: 117
Rep Power: 17
jens_klostermann is on a distinguished road
No, I didn't habe time to work further on this problem.
jens_klostermann is offline   Reply With Quote

Old   December 24, 2014, 16:48
Default
  #6
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
Quote:
Originally Posted by jens_klostermann View Post
No, I didn't habe time to work further on this problem.
I found a similar thing on this: http://www.cfd-online.com/Forums/ope...oam-2-2-x.html
sharonyue is offline   Reply With Quote

Old   February 1, 2015, 17:49
Default
  #7
New Member
 
Panagiotis Giannatselis
Join Date: Jan 2015
Location: Athens, Greece
Posts: 5
Rep Power: 11
pgiannatselis is on a distinguished road
Reading http://www.cfd-online.com/Forums/ope...ivdevreff.html I concluded that this term is zero if the fluid is incompressible and near convergence it doesn't concern us. The term remains for stability reasons when we are still far from the solution. If somebody more experienced confirms my thinking, the problem is solved.

I don't feel able to tell you that my point is 100% correct.
pgiannatselis is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
solving the momentum equation in UEqn. callahance OpenFOAM 2 October 18, 2012 10:38
Question Re Engineering Data Source imnull ANSYS 0 March 5, 2012 14:51
one question about turbulence + Ueqn ? lfgmarc OpenFOAM Programming & Development 0 October 25, 2011 11:57
internal field question - PitzDaily Case atareen64 OpenFOAM Running, Solving & CFD 2 January 26, 2011 16:26
Poisson Solver question Suresh Main CFD Forum 3 August 12, 2005 05:37


All times are GMT -4. The time now is 04:07.