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

Using different turbulent viscosities for turbulent stress components

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 14, 2008, 12:59
Default Hi, does anyone have an ide
  #1
Senior Member
 
Fabian Braennstroem
Join Date: Mar 2009
Posts: 407
Rep Power: 19
braennstroem is on a distinguished road
Hi,

does anyone have an idea, how one would adjust the turbulent viscosity for each component of the reynolds stresses separately? E.g. L. Davidson uses such an approach for the v2f model modification, where he has two different eddy viscosities. I would start at the divR member function in e.g. the standard k-eps model and adjust the lines

return
(
- fvm::laplacian(nuEff(), U)
- fvc::div(nuEff()*dev(fvc::grad(U)().T()))
);

but I have no clue, how to adjust the divR matrix for certain components...!? Would be nice, if someone can point me in the right direction :-)

Fabian
braennstroem is offline   Reply With Quote

Old   April 14, 2008, 13:11
Default Well, the most general method
  #2
Senior Member
 
Gavin Tabor
Join Date: Mar 2009
Posts: 181
Rep Power: 17
grtabor is on a distinguished road
Well, the most general method would be to use a 4th rank tensor - but OpenFOAM won't support that. You could construct the matrix component-by-component, but thats messy and violates the spirit of OF.

I presume you have in mind different viscosities for different parts of the matrix; eg. for symmetric and antisymmetric parts? Would it be valid to construct these matrices in the usual manner and then apply the viscosities, so instead of

mu*divR

you use

mu1*(divR + divR.T()) + mu2*(divR - divR.T())

???

Gavin
grtabor is offline   Reply With Quote

Old   April 14, 2008, 14:06
Default Hi Gavin, nice idea, thanks
  #3
Senior Member
 
Fabian Braennstroem
Join Date: Mar 2009
Posts: 407
Rep Power: 19
braennstroem is on a distinguished road
Hi Gavin,

nice idea, thanks. I just tried to adjust the
the 'turbulence->divR(U)' term in simpleFoam with your proposal:


+(turbulence->divR(U) + turbulence->divR(U).T()) + (turbulence->divR(U) - turbulence->divR(U).T())

but there is no member 'T':


c $SOURCE -o Make/linux64GccDPOpt/simpleFoam.o
simpleFoam.C: In function 'int main(int, char**)':
simpleFoam.C:72: error: 'class Foam::tmp<foam::fvmatrix<foam::vector<double> > >' has no member named 'T'
simpleFoam.C:72: error: 'class Foam::tmp<foam::fvmatrix<foam::vector<double> > >' has no member named 'T'
make: *** [Make/linux64GccDPOpt/simpleFoam.o] Error 1


In addtion the above mentioned adjustment of Davidson change just one component. Another idea could be to have three different viscosities, one for each vel component (or is this a stupid idea?). Would a component wise adjustment use something like divR(U).component(1,1) for the first component!?

Thanks! Fabian
braennstroem is offline   Reply With Quote

Old   April 14, 2008, 19:32
Default Sorry - got caught out by the
  #4
Senior Member
 
Gavin Tabor
Join Date: Mar 2009
Posts: 181
Rep Power: 17
grtabor is on a distinguished road
Sorry - got caught out by the tmp (as usual). Try:

+(turbulence->divR(U) + turbulence->divR(U)().T()) + (turbulence->divR(U) - turbulence->divR(U)().T())

- that should compile.

The problem I see with doing a component-wise scaling is that it is not frame independent; ie it will be different if you change the coordinate system. It is therefore unphysical. You (and Davidson) should really be confining yourself to proper tensor operations, I think. Of course, I don't really understand quite what you are trying to achieve here, so this is a _very_ uninformed viewpoint!

Gavin
grtabor is offline   Reply With Quote

Old   April 16, 2008, 03:09
Default No, does not work: simpleFo
  #5
Senior Member
 
Fabian Braennstroem
Join Date: Mar 2009
Posts: 407
Rep Power: 19
braennstroem is on a distinguished road
No, does not work:

simpleFoam.C: In function 'int main(int, char**)':
simpleFoam.C:71: error: 'struct Foam::fvMatrix<foam::vector<double> >' has no member named 'T'
simpleFoam.C:71: error: 'struct Foam::fvMatrix<foam::vector<double> >' has no member named 'T'
make: *** [Make/linux64GccDPOpt/simpleFoam.o] Error 1

Do you have an idea?

Your are right about the symmetry, but keeping the symmetry (and other constraints) in mind one is able to adjust components.

A more general would probably be to adjust the nuEff declaration in turbulenceModel.H:
//- Return the effective viscosity
virtual tmp<volscalarfield> nuEff() const
{
return tmp<volscalarfield>
(
new volScalarField("nuEff", nut() + nu())
);
}

as a vector, so being to do the adjustments directly in the turbulence model implementation!?


Thanks!
Fabian
braennstroem is offline   Reply With Quote

Old   April 16, 2008, 06:05
Default You have to do your transpose
  #6
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
You have to do your transpose in the turbulence model before divR becomes a fvVectorMatrix.

Regarding your viscosity problem, can't you just use a normal tensorial viscosity?
eugene is offline   Reply With Quote

Old   April 16, 2008, 12:21
Default Hi Eugene, did not understa
  #7
Senior Member
 
Fabian Braennstroem
Join Date: Mar 2009
Posts: 407
Rep Power: 19
braennstroem is on a distinguished road
Hi Eugene,

did not understand everything... actually nothing;-)
what do you mean with 'before'?

With tensorial viscosity you mean just using volTensorField for nuEff!?

Thanks!
Fabian
braennstroem is offline   Reply With Quote

Old   April 17, 2008, 07:09
Default Take a look at where divR is c
  #8
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
Take a look at where divR is created in the turbulence models. This is where you have to do your transpose operation. (Note: transpose terms will be explicit.) I also recommend you check the LRR model implementation for some ideas.
eugene is offline   Reply With Quote

Old   April 21, 2008, 14:19
Default Thanks, will see what I'll und
  #9
Senior Member
 
Fabian Braennstroem
Join Date: Mar 2009
Posts: 407
Rep Power: 19
braennstroem is on a distinguished road
Thanks, will see what I'll understand.

Regards!
Fabian
braennstroem is offline   Reply With Quote

Old   February 5, 2009, 05:18
Default Hello All, I have a solver
  #10
Senior Member
 
Mark Couwenberg
Join Date: Mar 2009
Location: Netherlands
Posts: 130
Rep Power: 17
markc is on a distinguished road
Hello All,

I have a solver derived from interDyMFoam and try to access the field nuEff as follows:
>>>
// Construct incompressible RAS model
autoPtr<incompressible::rasmodel> turbulence
(
incompressible::RASModel::New(U, phi, twoPhaseProperties)
);
volScalarField nuEff = turbulence.nuEff();

<<<
However during building I get the following error:

>>>
'class Foam::autoPtr<foam::incompressible::rasmodel>' has no member named 'nuEff'
<<<
This seems strange to me because RASModel.C shows the following member:
>>>
virtual tmp<volscalarfield> nuEff() const
{
return tmp<volscalarfield>
(
new volScalarField("nuEff", nut() + nu())
);
}
<<<
I clearly access a wrong class but I do not understand why and how. Any comments on how to access this nuEff?

Thanks in advance,

Mark
markc is offline   Reply With Quote

Old   February 5, 2009, 05:39
Default Hi Mark! Try turbulence().n
  #11
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Mark!

Try turbulence().nuEff() and have a look at the Doxygen-page of autoPtr

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   February 5, 2009, 06:04
Default Hi Mark, I dont think you n
  #12
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
Hi Mark,

I dont think you need to declare:
volScalarField nuEff = turbulence.nuEff();

Try to use turbulence->nut() if you need to access the turbulent viscosity, or use nuEff directly in your solver.

The first case is useful if you are solving for scalar transport, where you add nut/Sc_t to the scalar diffusivity.

Regards,
Jose Santos
santos is offline   Reply With Quote

Old   February 5, 2009, 07:57
Default Hello All, Thanks, it worke
  #13
Senior Member
 
Mark Couwenberg
Join Date: Mar 2009
Location: Netherlands
Posts: 130
Rep Power: 17
markc is on a distinguished road
Hello All,

Thanks, it worked!

Brgds,

Mark
markc is offline   Reply With Quote

Old   October 15, 2010, 09:59
Default nuEff()
  #14
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 17
T.D. is on a distinguished road
Hi guys,

Any ideas how to add a new nuEff2() in turbulence().nuEff2() ?
or simply how to make two different "nu1" and "nu2" of two different viscosityModels where to be used both inside one solver? how to call them?


thanks a lot

Last edited by T.D.; October 15, 2010 at 10:17.
T.D. 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
Turbulent combustion with Reynold Stress Jonathan CFX 8 February 13, 2009 13:39
Possible missing turbulent stress terms in sonicTurbFoam srinath OpenFOAM Bugs 2 November 26, 2008 02:59
get the value of six Reynolds Stress components? July CFX 2 June 24, 2008 10:19
turbulent shear stress othman smadi FLUENT 1 June 7, 2007 19:16
Turbulent fluctuating components Muhammad Akbar Main CFD Forum 2 July 7, 2000 09:42


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