CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   piecewise linear inlet profile: swak4foam? (http://www.cfd-online.com/Forums/openfoam-solving/114340-piecewise-linear-inlet-profile-swak4foam.html)

 letzel March 9, 2013 11:33

piecewise linear inlet profile: swak4foam?

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

 gschaider March 9, 2013 12:52

Quote:
 Originally Posted by letzel (Post 412739) 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

 Tobias Adam June 24, 2014 11:39

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

 gschaider July 2, 2014 17:49

Quote:
 Originally Posted by Tobias Adam (Post 498472) 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"?

 Tobias Adam July 3, 2014 05:32

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

 gschaider July 3, 2014 15:43

Quote:
 Originally Posted by Tobias Adam (Post 499815) 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

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