# Log-law velocity profile in CFX-Pre

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

 February 29, 2012, 03:57 Log-law velocity profile in CFX-Pre #1 New Member   Join Date: Dec 2011 Posts: 11 Rep Power: 5 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 '" 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!

 February 29, 2012, 04:09 #2 Senior Member   Lance Join Date: Mar 2009 Posts: 533 Rep Power: 11 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.

 February 29, 2012, 04:54 #3 New Member   Join Date: Dec 2011 Posts: 11 Rep Power: 5 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...

 February 29, 2012, 05:00 #4 Senior Member   Lance Join Date: Mar 2009 Posts: 533 Rep Power: 11 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.

 February 29, 2012, 05:16 #5 New Member   Join Date: Dec 2011 Posts: 11 Rep Power: 5 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.

 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 eRzBeNgEl STAR-CCM+ 6 March 26, 2012 05:16 virgy Fluent UDF and Scheme Programming 8 February 7, 2012 05:30 plainstyle CD-adapco 1 June 18, 2010 10:46 diluom CFX 7 December 10, 2009 23:50 michael Rasmussen CFX 7 December 15, 2003 20:59

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