|
[Sponsors] |
Using different turbulent viscosities for turbulent stress components |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 14, 2008, 12:59 |
Hi,
does anyone have an ide
|
#1 |
Senior Member
Fabian Braennstroem
Join Date: Mar 2009
Posts: 407
Rep Power: 19 |
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 |
|
April 14, 2008, 13:11 |
Well, the most general method
|
#2 |
Senior Member
Gavin Tabor
Join Date: Mar 2009
Posts: 181
Rep Power: 17 |
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 |
|
April 14, 2008, 14:06 |
Hi Gavin,
nice idea, thanks
|
#3 |
Senior Member
Fabian Braennstroem
Join Date: Mar 2009
Posts: 407
Rep Power: 19 |
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 |
|
April 14, 2008, 19:32 |
Sorry - got caught out by the
|
#4 |
Senior Member
Gavin Tabor
Join Date: Mar 2009
Posts: 181
Rep Power: 17 |
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 |
|
April 16, 2008, 03:09 |
No, does not work:
simpleFo
|
#5 |
Senior Member
Fabian Braennstroem
Join Date: Mar 2009
Posts: 407
Rep Power: 19 |
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 |
|
April 16, 2008, 06:05 |
You have to do your transpose
|
#6 |
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21 |
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? |
|
April 16, 2008, 12:21 |
Hi Eugene,
did not understa
|
#7 |
Senior Member
Fabian Braennstroem
Join Date: Mar 2009
Posts: 407
Rep Power: 19 |
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 |
|
April 17, 2008, 07:09 |
Take a look at where divR is c
|
#8 |
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21 |
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.
|
|
April 21, 2008, 14:19 |
Thanks, will see what I'll und
|
#9 |
Senior Member
Fabian Braennstroem
Join Date: Mar 2009
Posts: 407
Rep Power: 19 |
Thanks, will see what I'll understand.
Regards! Fabian |
|
February 5, 2009, 05:18 |
Hello All,
I have a solver
|
#10 |
Senior Member
Mark Couwenberg
Join Date: Mar 2009
Location: Netherlands
Posts: 130
Rep Power: 17 |
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 |
|
February 5, 2009, 05:39 |
Hi Mark!
Try turbulence().n
|
#11 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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 |
|
February 5, 2009, 06:04 |
Hi Mark,
I dont think you n
|
#12 |
Senior Member
|
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 |
|
February 5, 2009, 07:57 |
Hello All,
Thanks, it worke
|
#13 |
Senior Member
Mark Couwenberg
Join Date: Mar 2009
Location: Netherlands
Posts: 130
Rep Power: 17 |
Hello All,
Thanks, it worked! Brgds, Mark |
|
October 15, 2010, 09:59 |
nuEff()
|
#14 |
Senior Member
Join Date: Sep 2010
Posts: 226
Rep Power: 17 |
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. |
|
|
|
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 |