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

Weighting scheme for U

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Tibo99
  • 1 Post By Tobermory

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 4, 2021, 09:13
Default Weighting scheme for U
  #1
Senior Member
 
René Thibault
Join Date: Dec 2019
Location: Canada
Posts: 114
Rep Power: 6
Tibo99 is on a distinguished road
Hi everyone,

Since I try to simulate an ABL and U varies in a highly non-linear manner, I would like to implement an other interpolation scheme from the one OF use, which usually linear.

For evaluating its face value, I was thinking using the follow weighting function apply on the explicit term of the Reynolds stresses and presented in attachment.

My questions are:

1)Where I can find in the code the linear scheme OF use in order to change it for this one?

2)Is it possible to change the interpolation scheme in the 'fvSchemes' file for one close to the one I presented in attachment(instead of changing the code itself)?


Thank you very much for your answer!

Best Regards,
Attached Images
File Type: png WF.png (4.0 KB, 7 views)
File Type: png tau.png (5.3 KB, 4 views)
Tibo99 is offline   Reply With Quote

Old   February 4, 2021, 11:15
Default
  #2
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 668
Rep Power: 14
Tobermory will become famous soon enough
Dear Rene

you probably need to be a bit more explicit about which terms you are trying change the interpolation scheme for. Note that the finite volume method is based on the underlying assumption that variables vary linearly across the cell. Interpolation schemes are then used to map the cell centre values to face centre, for use with the fluxes (eg advection). Interpolation is also used elsewhere, though, so be careful.

You can find the schemes by diving into the doxygen source listing, eg start at:

https://cpp.openfoam.org/v8/dir_4df5...0d9ef5fe1.html

and then dive into the schemes folder and you'll see a linear folder:

https://cpp.openfoam.org/v8/src_2fin...linear_8H.html

I am intrigued why you want to improve the interpolation for an ABL though - it's a very high Re# flow, with typically a large wall-adjacent cell size ... so the gradients shouldn't be too strong even close to the ground. Or are you trying to integrate to the wall?
Tobermory is offline   Reply With Quote

Old   February 4, 2021, 12:13
Default
  #3
Senior Member
 
René Thibault
Join Date: Dec 2019
Location: Canada
Posts: 114
Rep Power: 6
Tibo99 is on a distinguished road
Thank you very much for replying!

I'm adding factors for correcting discretization errors. It's presented in the following paper:

https://onlinelibrary.wiley.com/doi/....1002/fld.2709

This also correcting the 'peak' happening from the 2nd cell on the profile 'k'.

I successfully implement the factors involved on the transport equation.

But, two other factors need to be apply on the field U, which I struggle to implement. This one here is one of them.

Thank again!

Best Regards,
Attached Files
File Type: pdf SumnerJ 2011.pdf (73.2 KB, 9 views)
Tobermory likes this.
Tibo99 is offline   Reply With Quote

Old   February 5, 2021, 06:24
Default
  #4
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 668
Rep Power: 14
Tobermory will become famous soon enough
Aah - I understand now - I had not seen this paper before (in fact you can find Sumner's thesis on line as well). Interesting to see his analysis of which of the discretisation terms is having the biggest contribution to the anomolous k spike, and interesting that a small imbalance can have such a large effect.

One thing that confuses me, however, is why the surface layer approximation is used so often in CFD simulations, with domain depths of 500m or more, when the surface layer is only a theoretical asympote that applies only to the bottom 10% or so of the boundary layer, ie the bottom 100m or less. Why not simulate the real ABL, with a vertical profile of TKE instead of using the coarse assumption that k is constant?
Tibo99 likes this.
Tobermory is offline   Reply With Quote

Old   February 5, 2021, 09:17
Default
  #5
Senior Member
 
René Thibault
Join Date: Dec 2019
Location: Canada
Posts: 114
Rep Power: 6
Tibo99 is on a distinguished road
Indeed, I agree with you that is interesting how such a small detail has a tremendous impact.

Since the only two factors I still not implemented are on the field ‘U’, that would probably explain why the ‘nut’ and the ‘velocity’ profile are not close to the analytic results compare to the ‘k’ and ‘epsilon’ profile.

I’m trying to implement this first and let see where I’m going after.

Thank for the discussion!

Best Regards,
Tibo99 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
Error: Out of scheme heap space SSG_NJ FLUENT 2 July 24, 2021 06:31
Floating point exception error Alan OpenFOAM Running, Solving & CFD 11 July 1, 2021 21:51
Crank Nicolson scheme implemented wrong? rajibroy OpenFOAM Programming & Development 10 May 5, 2020 09:57
2nd order upwind scheme (Fluent and CFX) Far FLUENT 0 May 22, 2011 01:50
Surface interpolation scheme with tensors as weighting factors jutta OpenFOAM Running, Solving & CFD 1 August 27, 2007 11:00


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