CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > CFX

Log-law velocity profile in CFX-Pre

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 29, 2012, 03:57
Default Log-law velocity profile in CFX-Pre
  #1
New Member
 
Join Date: Dec 2011
Posts: 11
Rep Power: 5
jm2011 is on a distinguished road
Hi guys,

I would like to model wind flow over a terrain using a log-law velocity profile for my inlet. I have modelled a rectangular prism and assigned one of the faces to be my inlet. Unfortunately I'm not very good with the syntax used in expressions, so I am continuously facing error messages, which I'm not sure how to fix.

The main error is "Argument dimensions resolve to 'm'; expected '<dimensionless>" when I using the "Uz" expression for the inlet velocity:

ufric = 0.35
hz = z
kappa = 0.4
z0 = 0.0001
Uz = (ufric/kappa)*loge(hz/z0) [m s^-1]

Obviously hz is in meters and will change with the height of the inlet face, but CFX-Pre won't accept a non-dimensional value in the loge function...?

Also is it necessary to specify the min and max z values of the inlet face?

I appreciate your help!
jm2011 is offline   Reply With Quote

Old   February 29, 2012, 04:09
Default
  #2
Senior Member
 
Lance
Join Date: Mar 2009
Posts: 503
Rep Power: 11
Lance is on a distinguished road
Yep, loge (or ln) wont accept an argument with dimensions, see cfx_ref.pdf at page 168 (for version 14). Just normalize it with /1[m] or make z0 = 0.0001 [m] and you should be fine. If you want your inlet expression to go all the way to the top (assuming z= 0 at the bottom) then you dont need to set any min/max values.
Lance is offline   Reply With Quote

Old   February 29, 2012, 04:54
Default
  #3
New Member
 
Join Date: Dec 2011
Posts: 11
Rep Power: 5
jm2011 is on a distinguished road
Cool, thanks for that!

I tried doing that actually, but when I subsequently ran the simulation, it terminates with the following error:

"The problem was encountered in executing the expression for: |
| Uz |
| The complete expression is: |
| (Ufric/kappa)*loge(hz/z0[m]) [m s^-1] |
| The error occurs on sub-expression: |
| loge(hz/z0[m])"

...so it must still not like this expression somehow...

jm2011 is offline   Reply With Quote

Old   February 29, 2012, 05:00
Default
  #4
Senior Member
 
Lance
Join Date: Mar 2009
Posts: 503
Rep Power: 11
Lance is on a distinguished road
Yes, when z = 0 it will result in loge(0) which is undefined, thats why you get an error. One thing you could try is loge((hz+eps)/z0[m]) where eps is a very small number. But be aware that it might give you the wrong solution close to the wall.
Lance is offline   Reply With Quote

Old   February 29, 2012, 05:16
Default
  #5
New Member
 
Join Date: Dec 2011
Posts: 11
Rep Power: 5
jm2011 is on a distinguished road
Awesome, thanks Lance!

I understand that there is likely to be an error, but I assume it will be pretty small if you choose the added value to be very small.
In fact, I used the same value as for z0 because then at z=0, log(1)=0, which would correspond to reality where wind velocity is zero at the ground.
Perhaps this is still an acceptable method for a large domain.

jm2011 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Export & Import Velocity profile as Inlet eRzBeNgEl STAR-CCM+ 6 March 26, 2012 05:16
Simulation with UDF for species mass fraction and velocity profile virgy Fluent UDF and Scheme Programming 8 February 7, 2012 05:30
Log Law Wind Profile for Urban analysis in Star-CCM+ 4 plainstyle CD-adapco 1 June 18, 2010 10:46
Wind Velocity Profile in ANSYS CFX diluom CFX 7 December 10, 2009 23:50
log - velocity profile in unstructured grid michael Rasmussen CFX 7 December 15, 2003 20:59


All times are GMT -4. The time now is 05:47.