CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] Difference between snGrad(U) using swakExpression and wallgradU utility ?

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 16, 2014, 23:52
Question Difference between snGrad(U) using swakExpression and wallgradU utility ?
  #1
Member
 
Daniel
Join Date: Jun 2014
Posts: 60
Rep Power: 12
Dan1788 is on a distinguished road
Hello,

I am doing an LES of pipe flow. The streamwise direction is the z-direction. In my controlDict I enter the following "swakExpression" to keep track of my wall shear stress:

Code:
wallShear
    {
        type    swakExpression;
        valueType   patch;
        patchName   Side;
        accumulations   (
            average
        );
        expression  "nu*1.16*snGrad(U)";
        verbose true;
    }
The output of the following in my "postProcessing" folder is as follows:

Code:
      Time               
      1.15            (0.00158395 -0.00195003 -0.309623)
      1.15001            (0.0015569 -0.0018457 -0.31036)
      1.15002            (0.00154682 -0.00179581 -0.310094)
      1.15002            (0.0015546 -0.00176741 -0.30988)
      1.15003            (0.0015752 -0.00177392 -0.309709)
      1.15003            (0.00154428 -0.00172741 -0.309567)
      1.15004            (0.00152869 -0.00170179 -0.309448)
      1.15004            (0.00154396 -0.00171494 -0.309346)
      1.15005            (0.00153824 -0.00171052 -0.309258)
      1.15005            (0.00153934 -0.00171405 -0.309179)
      1.15006            (0.00153327 -0.00170792 -0.30911)
      1.15006            (0.00152485 -0.00169658 -0.309047)
      1.15007            (0.00152928 -0.00169544 -0.308991)
      1.15007            (0.00153558 -0.00170495 -0.30894)
      1.15008            (0.00153235 -0.00170306 -0.308893)
      1.15008            (0.00153008 -0.00169775 -0.308849)
      1.15009            (0.00154298 -0.00171269 -0.30881)
      1.15009            (0.00154351 -0.00171235 -0.308773)
       1.1501            (0.00153823 -0.00170273 -0.308739)
       1.1501            (0.00153198 -0.00169867 -0.308707)
      1.15011            (0.00152493 -0.00169242 -0.308677)
      1.15011            (0.00153547 -0.00170078 -0.30865)
      1.15012            (0.00153531 -0.00170344 -0.308624)
      1.15012            (0.00152695 -0.00169185 -0.3086)
      1.15013            (0.00152394 -0.00168702 -0.308578)
      1.15013            (0.00152902 -0.00170066 -0.308557)
      1.15014            (0.00152878 -0.00170005 -0.308537)
You see that the tau_w(z-direction) is always in the range of ~ 0.3.

However when I compute the wall shear stress using the wallShearStressLES utility, the output is as follows:

Code:
(0.00922472 -0.00948885 -0.436616)
(0.0167652 -0.0139423 -0.497059)
(0.027834 -0.0217006 -0.573286)
(0.0405144 -0.0274527 -0.648546)
(0.0479752 -0.029261 -0.717811)
(0.0462766 -0.0244107 -0.7791)
(0.0379119 -0.0177215 -0.833495)
(0.0251241 -0.010028 -0.885577)
(0.0158647 -0.00529415 -0.91607)
(-0.00224175 0.000942265 -0.846752)
(-0.0139847 0.0031963 -0.695487)
(-0.0133073 0.00202354 -0.506113)
(0.00138907 -0.000239348 -0.352859)
(-0.00568237 0.000631173 -0.211232)
(-0.0198709 0.000730177 -0.169419)
(-0.00914825 -0.00054803 -0.258058)
(0.0156156 0.00114809 -0.448939)
(0.00519621 0.0010823 -0.597595)
(0.00899102 0.00132361 -0.671042)
(0.0455127 0.0108841 -0.716581)
(0.0519395 0.0163323 -0.705576)
(0.0428748 0.0163925 -0.644185)
(0.0271054 0.0124011 -0.564419)
(0.0127216 0.00706786 -0.551247)
(0.00512223 0.00361148 -0.617746)
(0.00279277 0.00222053 -0.690317)
(0.00107463 0.0039771 -0.730843)
(0.00670205 0.00761867 -0.778388)
(0.0236784 0.0209093 -0.886947)
(0.0405041 0.0391589 -1.10094)
(0.011279 -0.0109334 -0.438007)
(0.0185427 -0.0161606 -0.500274)
(0.0297334 -0.0231098 -0.57867)
(0.0411742 -0.0284098 -0.654419)
(0.0476158 -0.029062 -0.72111)
(0.0457186 -0.0245445 -0.77872)
(0.0385896 -0.018128 -0.830116)
(0.0269545 -0.0107781 -0.883763)
(0.0166884 -0.00548417 -0.914038)
(-0.00277345 0.00124665 -0.838704)
(-0.0161723 0.00388169 -0.685918)
(-0.0180005 0.00293102 -0.501037)
(3.30381e-05 -1.50492e-05 -0.35243)
(-0.00945636 0.00110753 -0.208022)
(-0.0277763 0.000992707 -0.172966)
(-0.0160046 -0.000732155 -0.269808)
(0.00941981 0.000497363 -0.453516)
(0.00323716 0.000629968 -0.600543)
(0.0046372 0.000533136 -0.683728)
Clearly the values of the z-component here are really far apart.

Which one is correct and what is the difference between both using snGrad(U) in the first approach and then using the wallShearStressLES utility ??

Please help

Last edited by Dan1788; December 17, 2014 at 22:26.
Dan1788 is offline   Reply With Quote

Old   December 17, 2014, 22:26
Default
  #2
Member
 
Daniel
Join Date: Jun 2014
Posts: 60
Rep Power: 12
Dan1788 is on a distinguished road
Can anyone help please?
Dan1788 is offline   Reply With Quote

Old   December 18, 2014, 05:40
Default
  #3
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
Quote:
Originally Posted by Dan1788 View Post
Hello,

I am doing an LES of pipe flow. The streamwise direction is the z-direction. In my controlDict I enter the following "swakExpression" to keep track of my wall shear stress:

Code:
wallShear
    {
        type    swakExpression;
        valueType   patch;
        patchName   Side;
        accumulations   (
            average
        );
        expression  "nu*1.16*snGrad(U)";
        verbose true;
    }
The output of the following in my "postProcessing" folder is as follows:

Code:
      Time               
      1.15            (0.00158395 -0.00195003 -0.309623)
      1.15001            (0.0015569 -0.0018457 -0.31036)
      1.15002            (0.00154682 -0.00179581 -0.310094)
      1.15002            (0.0015546 -0.00176741 -0.30988)
      1.15003            (0.0015752 -0.00177392 -0.309709)
      1.15003            (0.00154428 -0.00172741 -0.309567)
      1.15004            (0.00152869 -0.00170179 -0.309448)
      1.15004            (0.00154396 -0.00171494 -0.309346)
      1.15005            (0.00153824 -0.00171052 -0.309258)
      1.15005            (0.00153934 -0.00171405 -0.309179)
      1.15006            (0.00153327 -0.00170792 -0.30911)
      1.15006            (0.00152485 -0.00169658 -0.309047)
      1.15007            (0.00152928 -0.00169544 -0.308991)
      1.15007            (0.00153558 -0.00170495 -0.30894)
      1.15008            (0.00153235 -0.00170306 -0.308893)
      1.15008            (0.00153008 -0.00169775 -0.308849)
      1.15009            (0.00154298 -0.00171269 -0.30881)
      1.15009            (0.00154351 -0.00171235 -0.308773)
       1.1501            (0.00153823 -0.00170273 -0.308739)
       1.1501            (0.00153198 -0.00169867 -0.308707)
      1.15011            (0.00152493 -0.00169242 -0.308677)
      1.15011            (0.00153547 -0.00170078 -0.30865)
      1.15012            (0.00153531 -0.00170344 -0.308624)
      1.15012            (0.00152695 -0.00169185 -0.3086)
      1.15013            (0.00152394 -0.00168702 -0.308578)
      1.15013            (0.00152902 -0.00170066 -0.308557)
      1.15014            (0.00152878 -0.00170005 -0.308537)
You see that the tau_w(z-direction) is always in the range of ~ 0.3.

However when I compute the wall shear stress using the wallShearStressLES utility, the output is as follows:

Code:
(0.00922472 -0.00948885 -0.436616)
(0.0167652 -0.0139423 -0.497059)
(0.027834 -0.0217006 -0.573286)
(0.0405144 -0.0274527 -0.648546)
(0.0479752 -0.029261 -0.717811)
(0.0462766 -0.0244107 -0.7791)
(0.0379119 -0.0177215 -0.833495)
(0.0251241 -0.010028 -0.885577)
(0.0158647 -0.00529415 -0.91607)
(-0.00224175 0.000942265 -0.846752)
(-0.0139847 0.0031963 -0.695487)
(-0.0133073 0.00202354 -0.506113)
(0.00138907 -0.000239348 -0.352859)
(-0.00568237 0.000631173 -0.211232)
(-0.0198709 0.000730177 -0.169419)
(-0.00914825 -0.00054803 -0.258058)
(0.0156156 0.00114809 -0.448939)
(0.00519621 0.0010823 -0.597595)
(0.00899102 0.00132361 -0.671042)
(0.0455127 0.0108841 -0.716581)
(0.0519395 0.0163323 -0.705576)
(0.0428748 0.0163925 -0.644185)
(0.0271054 0.0124011 -0.564419)
(0.0127216 0.00706786 -0.551247)
(0.00512223 0.00361148 -0.617746)
(0.00279277 0.00222053 -0.690317)
(0.00107463 0.0039771 -0.730843)
(0.00670205 0.00761867 -0.778388)
(0.0236784 0.0209093 -0.886947)
(0.0405041 0.0391589 -1.10094)
(0.011279 -0.0109334 -0.438007)
(0.0185427 -0.0161606 -0.500274)
(0.0297334 -0.0231098 -0.57867)
(0.0411742 -0.0284098 -0.654419)
(0.0476158 -0.029062 -0.72111)
(0.0457186 -0.0245445 -0.77872)
(0.0385896 -0.018128 -0.830116)
(0.0269545 -0.0107781 -0.883763)
(0.0166884 -0.00548417 -0.914038)
(-0.00277345 0.00124665 -0.838704)
(-0.0161723 0.00388169 -0.685918)
(-0.0180005 0.00293102 -0.501037)
(3.30381e-05 -1.50492e-05 -0.35243)
(-0.00945636 0.00110753 -0.208022)
(-0.0277763 0.000992707 -0.172966)
(-0.0160046 -0.000732155 -0.269808)
(0.00941981 0.000497363 -0.453516)
(0.00323716 0.000629968 -0.600543)
(0.0046372 0.000533136 -0.683728)
Clearly the values of the z-component here are really far apart.

Which one is correct and what is the difference between both using snGrad(U) in the first approach and then using the wallShearStressLES utility ??

Please help
Depends on your definition of "correct". I think the names are pretty self-explanatory: snGrad(U) in swak ONLY looks at the velocity field and calculates the gradient. wallShearStressLES (as the name says) adds the effect of the turbulence model. I'd only see a problem if wallGradU (which you mention in the title) differs significantly from swak
__________________
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   December 21, 2014, 18:21
Default Test between nu*rho*snGrad(U) and nu*rho*wallGrad(U)
  #4
Member
 
Daniel
Join Date: Jun 2014
Posts: 60
Rep Power: 12
Dan1788 is on a distinguished road
Hi Bernhard,

Thanks for your reply.

So I did a small test to compare results of the wall Shear stress using snGrad(U) and using wallGrad(U) utility.

Following are a couple of lines as output from wallGrad(U) -latestTime

Code:
(158.301 -63.0679 9752.01)
(-18.023 -183.104 9801.31)
(70.9486 -45.88 9654.49)
(119.605 -84.467 9432.72)
(138.58 -85.0173 9607.43)
(138.097 -74.9961 10680.3)
(240.245 -116.391 12213)
(439.328 -183.63 12451.1)
(545.342 -192.911 11860.8)
(507.157 -148.288 10896.3)
(177.236 -40.1328 9856.27)
(-232.057 45.4857 10258.2)
If I look at the 3rd collumn and multiply that by nu*rho (1.53e-05*1.16), the values I get are really off from the output of nu*rho*snGrad(U). The nu*rho*snGrad(U) from the swakExpresssion looks like this:

Code:
Time               
      1.15            (0.00158395 -0.00195003 -0.309623)
      1.15001            (0.0015569 -0.0018457 -0.31036)
      1.15002            (0.00154682 -0.00179581 -0.310094)
      1.15002            (0.0015546 -0.00176741 -0.30988)
      1.15003            (0.0015752 -0.00177392 -0.309709)
      1.15003            (0.00154428 -0.00172741 -0.309567)
      1.15004            (0.00152869 -0.00170179 -0.309448)
      1.15004            (0.00154396 -0.00171494 -0.309346)
      1.15005            (0.00153824 -0.00171052 -0.309258)
Clearly there is a huge difference between the output of wallGrad(U) and snGrad(U) and I dont know why Please help me understand this. Thanks
Dan1788 is offline   Reply With Quote

Old   January 7, 2015, 16:50
Default
  #5
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
Quote:
Originally Posted by Dan1788 View Post
Hi Bernhard,

Thanks for your reply.

So I did a small test to compare results of the wall Shear stress using snGrad(U) and using wallGrad(U) utility.

Following are a couple of lines as output from wallGrad(U) -latestTime

Code:
(158.301 -63.0679 9752.01)
(-18.023 -183.104 9801.31)
(70.9486 -45.88 9654.49)
(119.605 -84.467 9432.72)
(138.58 -85.0173 9607.43)
(138.097 -74.9961 10680.3)
(240.245 -116.391 12213)
(439.328 -183.63 12451.1)
(545.342 -192.911 11860.8)
(507.157 -148.288 10896.3)
(177.236 -40.1328 9856.27)
(-232.057 45.4857 10258.2)
If I look at the 3rd collumn and multiply that by nu*rho (1.53e-05*1.16), the values I get are really off from the output of nu*rho*snGrad(U). The nu*rho*snGrad(U) from the swakExpresssion looks like this:

Code:
Time               
      1.15            (0.00158395 -0.00195003 -0.309623)
      1.15001            (0.0015569 -0.0018457 -0.31036)
      1.15002            (0.00154682 -0.00179581 -0.310094)
      1.15002            (0.0015546 -0.00176741 -0.30988)
      1.15003            (0.0015752 -0.00177392 -0.309709)
      1.15003            (0.00154428 -0.00172741 -0.309567)
      1.15004            (0.00152869 -0.00170179 -0.309448)
      1.15004            (0.00154396 -0.00171494 -0.309346)
      1.15005            (0.00153824 -0.00171052 -0.309258)
Clearly there is a huge difference between the output of wallGrad(U) and snGrad(U) and I dont know why Please help me understand this. Thanks
And it doesn't confuse you that wallGrad(U) produces widly varying results?

You are comparing an averaged value at different times (swak) with the raw data at one timestep (wallGrad(U), snGrad(U)) Of course they differ. But if you average the wallShearStressLES-output you should get similar values to swak

BTW: if your patch has faces of different sizhes you'll probably want to use weightedAverage as the accumulation
__________________
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

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



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