CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   To calculate wall shear stress in of210 for les simulation (https://www.cfd-online.com/Forums/openfoam-post-processing/103304-calculate-wall-shear-stress-of210-les-simulation.html)

morard December 11, 2012 03:16

Hi Nati,

yes, there are 3 components, in x, y and z direction. If you want to separate them, you can use foamCalc:

foamCalc components wallShearStress

this gives you: wallShearStressx, wallShearStressy and wallShearStressz.

For the lift and drag forces I can't help you much. Try to modify one of the post processing utilities to fit your case. It might help if you take a look into the folder /applications/test. You can find a lot of examples there.

Regards,
Dejan

nati December 11, 2012 03:52

Hi Morard,

thank you for your help. :)

Excuse me, Do you know, how to calculate turbulent dissipation energy in each point?

Regards,
Nati


Quote:

Originally Posted by morard (Post 396841)
Hi Nati,

yes, there are 3 components, in x, y and z direction. If you want to separate them, you can use foamCalc:

foamCalc components wallShearStress

this gives you: wallShearStressx, wallShearStressy and wallShearStressz.

For the lift and drag forces I can't help you much. Try to modify one of the post processing utilities to fit your case. It might help if you take a look into the folder /applications/test. You can find a lot of examples there.

Regards,
Dejan


michael1023 December 12, 2012 18:58

What`s the difference between devReff and devBeff? In my case, the wallShearStressLES which include devReff can also be complied. Thank you.

michael1023 December 12, 2012 19:05

Quote:

Originally Posted by wikstrom (Post 386113)
Reff is the effective (viscous+turbulent) stress tensor (calculated by the turbulence model). For laminar flow (or y-plus low) this would be more or less nu*grad(U).

Hi Wikstrom. What is the difference between the Reff and friction forces on a surface by a turbulence model, such as simulating a flow past over a circular cylinder by LES? Thank you.

wikstrom December 13, 2012 06:37

Look at the wallShearStress.C (applications/utilities/postProcessing/wall/wallShearStress), e.g. in the the calcIncompressible() function.

Reff is a tensor, whereas the wall shear stress is the vector produced by the scalar product of 'wall face unit normal' and the Reff tensor. To get the friction force, then, you would need to surface integrate the wall shear stress.

michael1023 December 18, 2012 01:28

Quote:

Originally Posted by wikstrom (Post 397326)
Look at the wallShearStress.C (applications/utilities/postProcessing/wall/wallShearStress), e.g. in the the calcIncompressible() function.

Reff is a tensor, whereas the wall shear stress is the vector produced by the scalar product of 'wall face unit normal' and the Reff tensor. To get the friction force, then, you would need to surface integrate the wall shear stress.

Thanks for your quite reply. I have read the code of wallShearStress.C. From what your said, I think that the wall shear stress has the same meaning with the friction force coefficient for three directions (x,y,z). Is it right?
In addition, Reff is a tensor for RAS model and how to calculate the tensor in LES model?

Sunxing December 18, 2012 03:15

Quote:

Originally Posted by wikstrom (Post 386113)
Reff is the effective (viscous+turbulent) stress tensor (calculated by the turbulence model). For laminar flow (or y-plus low) this would be more or less nu*grad(U).

Hi Niklas,

I think that for incompressible flow, the wallShearStress just give us the tau_w/rho, i.e nu*grad(U) , not mu*grad(U). Am i right?


regards,
Sunxing

duan2013xjtu June 24, 2013 10:43

it error for "essential value entry not provided" and my boundary is symmtryPlane
 
Hi, friends! When I run 'wallShearStressLES', it exit:
--> FOAM FATAL IO ERROR:
essential value entry not provided

file: /home/cylinder/3.800000e+02/phi::boundaryField::sides1_half0 from line 425805 to line 425805.

From function fvsPatchField<Type>::fvsPatchField
(
const fvPatch& p,
const DimensionedField<Type, surfaceMesh>& iF,
const dictionary& dict
)

in file lnInclude/fvsPatchField.C at line 110.

FOAM exiting

my boundary is symmtryPlane. Do I need to change the symmetryPlane to patch?

best wishes,
Linda


Quote:

Originally Posted by morard (Post 396841)
Hi Nati,

yes, there are 3 components, in x, y and z direction. If you want to separate them, you can use foamCalc:

foamCalc components wallShearStress

this gives you: wallShearStressx, wallShearStressy and wallShearStressz.

For the lift and drag forces I can't help you much. Try to modify one of the post processing utilities to fit your case. It might help if you take a look into the folder /applications/test. You can find a lot of examples there.

Regards,
Dejan


Gatoscar December 27, 2013 20:21

Code
 
1 Attachment(s)
Hello everyone:

Despite the fact that this is an old thread, I attach the code that I modified following the instructions posted here. I verified the results with one case of incompressible fluid in a pipe with dynamicSmagorinsky LES turbulence model. This is for OF2.1.1.

I hope this will be helpful for someone.

Regards

wyldckat December 28, 2013 12:44

Greetings Oscar,

Many thanks for sharing! Can I convince you to add this to openfoamwiki.net?

You can follow the instructions at this page: http://openfoamwiki.net/index.php/Extend-bazaar
Or follow the examples on this page: http://openfoamwiki.net/index.php/Main_ContribUtilities

Best regards,
Bruno

Gatoscar January 10, 2014 16:27

Hello Bruno

Sorry for the late response. I looked the two links you sent, and I'm convinced to upload the code of the wallShearStressLES, however, I'm gonna make more tests to the code to be completly sure that it works in the right way.

Thanks for the information about the foam-extend and OpenFOAM community.

Regards

ArathoN May 11, 2014 12:28

I tried building this on OF 2.3 but it gives me this error:

/opt/openfoam230/src/turbulenceModels/compressible/LES/LESModel/LESModel.H:150:34: note: no known conversion for argument 4 from ‘Foam::basicThermo’ to ‘const Foam::fluidThermo&’
make: *** [Make/linux64GccDPOpt/wallShearStressLES.o] Errore 1

How can i solve it?

HanSolo123 May 15, 2014 08:14

Same problem here. Please let me know when you solved it.

Shahr June 2, 2014 12:26

Quote:

Originally Posted by ArathoN (Post 491118)
I tried building this on OF 2.3 but it gives me this error:

/opt/openfoam230/src/turbulenceModels/compressible/LES/LESModel/LESModel.H:150:34: note: no known conversion for argument 4 from ‘Foam::basicThermo’ to ‘const Foam::fluidThermo&’
make: *** [Make/linux64GccDPOpt/wallShearStressLES.o] Errore 1

How can i solve it?

Well, obviously you should replace the basicThermo to fluidThermo in the source code and header file. It will be fixed.

wyldckat June 22, 2014 13:58

Greetings to all!

I've done a quick adaptation of the source code by Oscar Ochoa to OpenFOAM 2.2.x and 2.3.x.
It's currently provided here: https://github.com/wyldckat/wallShearStressLES
Download and installation instructions are given on that page.

Best regards,
Bruno

huangxianbei October 13, 2014 21:46

1 Attachment(s)
Quote:

Originally Posted by wyldckat (Post 498165)
Greetings to all!

I've done a quick adaptation of the source code by Oscar Ochoa to OpenFOAM 2.2.x and 2.3.x.
It's currently provided here: https://github.com/wyldckat/wallShearStressLES
Download and installation instructions are given on that page.

Best regards,
Bruno

Hi,Bruno:
I have a question about the difference between wallShearStress calculated by the code and by the wallGradU. As in the definition, skin-friction coefficient is Cf = tau_wall/(0.5*rho*U^2), and tau_wall = rho*nu*GradU, while in wallShearStress, the wallShearStress is calculated by n_wallnormal &Beff, this doesn't contain rho, right? I compared the wallShearStress calculated by the 2 ways, however, I get quite different values.

Here, calculated by wallShearStressLES and wallGradU are both contained in the .tar
Attachment 34378



The value is of almost 100 times deviation! (The fluid is gas, with rho =1.25kg/m^3 and nu = 1.45e-5 m^2/s) What's wrong with it?

Best regards

Xianbei

wyldckat October 18, 2014 15:26

Hi Xianbei,

:eek: If you had looked a bit more about this, specially look for posts where I mentioned "wallShearStress"... with Google, I can find with this:
Code:

site:www.cfd-online.com/Forums "wyldckat" "wallShearStress"
Mmm... a lot of threads... OK, the one where I pretty much answer your questions is in this post: http://www.cfd-online.com/Forums/ope...tml#post509408 post #6 ;)

Best regards,
Bruno

huangxianbei October 18, 2014 21:45

Quote:

Originally Posted by wyldckat (Post 514988)
Hi Xianbei,

:eek: If you had looked a bit more about this, specially look for posts where I mentioned "wallShearStress"... with Google, I can find with this:
Code:

site:www.cfd-online.com/Forums "wyldckat" "wallShearStress"
Mmm... a lot of threads... OK, the one where I pretty much answer your questions is in this post: http://www.cfd-online.com/Forums/ope...tml#post509408 post #6 ;)

Best regards,
Bruno

Hi,Bruno:
Thank you for your reply. From the link, I get to know the two ways to calculate tau, I use the second formula as you quoted, also, if I multiply wallShearStress with rho, they are still not the same:( I'll check it again.

Xianbei

wyldckat October 19, 2014 04:31

Hi Xianbei,

I think that something very wrong is going on in your simulation. My guess is that the y+ values are way above 300, which results in a bad calculation by wallShearStress and/or wallGradU.

If you can provide more details about your case, it will make it considerably easier to help diagnose the problem. The main details that come t mind as being important:
  1. Is the simulation done with compressible or incompressible modelling?
  2. Regarding turbulence model: Laminar, RAS or LES?
  3. What are the inlet flow speeds and the flow speeds near the wall (the cell closest to the wall) and the sizes of the cells closest to the wall?

Best regards,
Bruno

huangxianbei October 19, 2014 06:51

1 Attachment(s)
Quote:

Originally Posted by wyldckat (Post 515015)
Hi Xianbei,

I think that something very wrong is going on in your simulation. My guess is that the y+ values are way above 300, which results in a bad calculation by wallShearStress and/or wallGradU.

If you can provide more details about your case, it will make it considerably easier to help diagnose the problem. The main details that come t mind as being important:
  1. Is the simulation done with compressible or incompressible modelling?
  2. Regarding turbulence model: Laminar, RAS or LES?
  3. What are the inlet flow speeds and the flow speeds near the wall (the cell closest to the wall) and the sizes of the cells closest to the wall?

Best regards,
Bruno

Hi,Bruno
My case is a 90 bend duct with an aspect ratio of 6. Smagorinsky model is used with mean y+ <4, it's incompressible.
The inlet condition is obtain by interpolate the experimental velocity, and then mapped to the grid points.
The mesh's max aspect ratio is <700, which is OK when doing the checkMesh
Here is the comparison of the two results at inletAttachment 34454
The first 7 rows of data are obtained using sample line, the 1st is distance, and following are the wallGradU vector and wallShearStress vector, each has 3 components. The x direction is the studied direction
Xianbei


All times are GMT -4. The time now is 02:49.