# piecewise linear inlet profile: swak4foam?

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

 March 9, 2013, 11:33 piecewise linear inlet profile: swak4foam? #1 Member   Marcus Letzel Join Date: Sep 2012 Location: Aurich Posts: 35 Rep Power: 6 Dear All, my current task is the initialization of the streamwise velocity component Ux both at the inlet patch and for the internalField. Input data is an atmospheric boundary layer profile of Ux measured at discrete heights above ground by a wind tunnel experiment. Uy and Uz are zero. From the discrete measurements I would like to construct a piecewise linear vertical profile of Ux. At present, the input data are stored in a data file with the following content Code: ```( 0.0 0.00 2.0 1.12 5.0 1.36 10.0 1.56 15.0 1.68 20.0 1.78 30.0 1.92 40.0 2.02 )``` where the first column is the height in m above ground and the second column is the streamwise velocity component Ux in m/s. Which is the best way to input this piecewise linear profile into OpenFoam? Is there a clever way to use swak4foam for this task? Best regards, Marcus

March 9, 2013, 12:52
#2
Assistant Moderator

Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,934
Rep Power: 41
Quote:
 Originally Posted by letzel Dear All, my current task is the initialization of the streamwise velocity component Ux both at the inlet patch and for the internalField. Input data is an atmospheric boundary layer profile of Ux measured at discrete heights above ground by a wind tunnel experiment. Uy and Uz are zero. From the discrete measurements I would like to construct a piecewise linear vertical profile of Ux. At present, the input data are stored in a data file with the following content Code: ```( 0.0 0.00 2.0 1.12 5.0 1.36 10.0 1.56 15.0 1.68 20.0 1.78 30.0 1.92 40.0 2.02 )``` where the first column is the height in m above ground and the second column is the streamwise velocity component Ux in m/s. Which is the best way to input this piecewise linear profile into OpenFoam? Is there a clever way to use swak4foam for this task? Best regards, Marcus
If it was in time you could use timeVaryingUniform from standard-OpenFOAM. But swak4Foam has something based on that technology: lookuptables. For instance you declare a lookuptable heightData which you can then use in an expression like this "vector(heightData(pos().z),0,0)"

See the case Examples/groovyBC/wobbler on how to declare the lookuptable and the format of the data-file
__________________
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

 June 24, 2014, 11:39 #3 Member   Tobias Adam Join Date: Oct 2013 Location: Siegen Posts: 55 Rep Power: 4 Is there a possibility to use a standard atmospheric layer for the inlet? Right now I donīt know the exact inflow conditions except for the maximal velocity = 6 and minimal velocity =0 at the ground, so I don want to use this table function... Best regards Tobi

July 2, 2014, 17:49
#4
Assistant Moderator

Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,934
Rep Power: 41
Quote:
 Originally Posted by Tobias Adam Is there a possibility to use a standard atmospheric layer for the inlet? Right now I donīt know the exact inflow conditions except for the maximal velocity = 6 and minimal velocity =0 at the ground, so I don want to use this table function... Best regards Tobi
What do you mean with "standard atmospheric layer"?
__________________
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

 July 3, 2014, 05:32 #5 Member   Tobias Adam Join Date: Oct 2013 Location: Siegen Posts: 55 Rep Power: 4 I guess standard atmospheric layer was the wrong word. I wanted to ask for a realistic inflow condition, with changing velocity depending on the height. I thought about a parabolic velocity function depending on the height, but did not find good examples or parameters. My problem is, I donīt know much about the roughness of the area in front of my simulated area. so I wanted to ask for some standard values or functions to create such an inflow condition with no-slip-condition for the ground. Best regards Tobi

July 3, 2014, 15:43
#6
Assistant Moderator

Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,934
Rep Power: 41
Quote:
 Originally Posted by Tobias Adam I guess standard atmospheric layer was the wrong word. I wanted to ask for a realistic inflow condition, with changing velocity depending on the height. I thought about a parabolic velocity function depending on the height, but did not find good examples or parameters. My problem is, I donīt know much about the roughness of the area in front of my simulated area. so I wanted to ask for some standard values or functions to create such an inflow condition with no-slip-condition for the ground. Best regards Tobi
Finding a good relation for the flow is your responsibility. swak only helps you implementing it. For an example see Examples/groovyBC/pulsedPitzDaily
__________________
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

 Tags experimental data, inlet profile, internalfield, swak4foam

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post tonggysun OpenFOAM 2 September 13, 2013 04:19 arapha FLUENT 0 February 18, 2011 17:28 Prakash.Paudel FLUENT 1 August 20, 2010 11:01 potac OpenFOAM Pre-Processing 0 January 16, 2010 12:09 srinu Main CFD Forum 0 January 16, 2003 21:27

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