|
[Sponsors] |
Implementing a boundary condition with a probe |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 9, 2010, 13:14 |
Implementing a boundary condition (wall function) that depends on velocity profile
|
#1 |
New Member
Daniel
Join Date: Jun 2010
Posts: 12
Rep Power: 15 |
Hi Foamers,
I use OF for quite a while, and have also implemented some simple functions and boundary conditions, specially wall functions. Recently I have a new wall model which depends on the maximum streamwise velocity of the local profile, but I really don't know how to implement... I need a sort of probe to calculate the maximum velocity magnitude for a given station of measurement, like so: 1- At given point of a wall, the wall function specifies the wall shear (parallel to the wall). 2- This specific model depends on the maximum velocity magnitude of the profile for that given point (needs a function, on that point, of velocity magnitude x normal wall distance). I know this is probably trivial, but I don't have the experience in programming beyond simple modifications to the source files (I am not used to the programming model of OF, yet - I have a code made by me, but the philosophy is quite different...). Can anyone give me some light? Thanks Last edited by DVSoares; August 10, 2010 at 16:48. Reason: Set the title to better reflect the matter |
|
August 10, 2010, 10:14 |
|
#2 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 21 |
(I was waiting for others to respond because I don't do much with wall functions.)
I'm not sure what you need to implement. Do you need to find the velocity at an arbitrary point in the internal field? If so, you could use the interpolation classes in finiteVolume... these are the ones used by sample (the application). See: http://openfoamwiki.net/index.php/In..._%28by_cell%29 These algorithms only work within a given cell volume, so you first have to find which index is the cell volume. I think sample should show you how to do this. |
|
August 10, 2010, 14:38 |
|
#3 |
New Member
Daniel
Join Date: Jun 2010
Posts: 12
Rep Power: 15 |
Hi David,
Thank you for your reply. I'll check the link you sent and see if it fits. What I want to implement is a wall function that depends on the maximum streamwise velocity magnitude. One of the parameters scale with local U_max, being this U_max evaluated as the max(U) for the velocity profile normal to the wall at the point where the wall function is evaluated. The problem is that (due to my inexperience with OF) I can't figure how to do this - which variables would point me to the profile. The loop used by wall functions is for all indexes at the wall. I needed a way to say "at this point, evaluate the velocity profile in the direction normal to the wall and give me the maximum streamwise velocity magnitude" but I don't even know what variables/pointers in OF tell me which point I am. Sorry for being that much noob, but this is not so obvious in the documentation... When I get this done I'll certainly post a step-by-step guide... Another question: is it necessary to recompile the entire incompressible/RAS libs? When I tried to compile only the wall function (after setting Make/files and Make/options based on those found in RAS/Make) wmake gave me a lot of errors, but when compiling the entire RAS I had no problems. Thank you once again. Cheers, |
|
August 10, 2010, 18:28 |
|
#4 | ||||
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 21 |
Quote:
You probably don't even have to interpolate, just take the maximum cell. Quote:
But this would be the whole field. You need to find the cells that are lined up perpendicular to the wall at that point. You could do a forAll(fieldName, i) and check their location... probably a fieldName[i].x() or something like that. Then you can use whatever specifications you choose. But as I said, I don't deal with fields much. Quote:
http://openfoamwiki.net/index.php/Ca...OpenFOAM_guide Quote:
Good luck! -Dave |
|||||
August 11, 2010, 11:53 |
|
#5 |
New Member
Daniel
Join Date: Jun 2010
Posts: 12
Rep Power: 15 |
Hi Dave, thank you once again!
I'll study and post my results - I believe that db lookup will do, now just trying to figure how to loop through. I've read something about defining a normal direction somewhere. Guess I have some hard work to do now. I'll be glad to contribute to the guides and whatever I can with OF. Thanks again. Cheers, Daniel |
|
January 13, 2012, 12:43 |
|
#6 |
Senior Member
n/a
Join Date: Sep 2009
Posts: 199
Rep Power: 16 |
Hey Daniel, hope all is well. Did you ever resolve that problem? I am implementing an LES wall function and will need to use probe to acquire the value at a certain wall normal height, but over my 3D mesh. I was thinking of using probe & surfaces to acheive this, how did you resolve your issue?
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wind turbine simulation | Saturn | CFX | 58 | July 3, 2020 01:13 |
inlet velocity boundary condition | murali | CFX | 5 | August 3, 2012 08:56 |
External Radiation Boundary Condition (Two sided wall), Grid Interface | CFD XUE | FLUENT | 0 | July 8, 2010 06:49 |
boundary condition for flat plate | Ardalan | Main CFD Forum | 0 | June 18, 2010 17:49 |
how to set up a wall boundary condition according to calculated wall shear stress? | gameoverli | OpenFOAM Pre-Processing | 1 | May 21, 2009 08:28 |