|
[Sponsors] |
February 29, 2012, 02:57 |
Log-law velocity profile in CFX-Pre
|
#1 |
New Member
Join Date: Dec 2011
Posts: 11
Rep Power: 14 |
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! |
|
February 29, 2012, 03:09 |
|
#2 |
Senior Member
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 22 |
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, 03:54 |
|
#3 |
New Member
Join Date: Dec 2011
Posts: 11
Rep Power: 14 |
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, 04:00 |
|
#4 |
Senior Member
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 22 |
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, 04:16 |
|
#5 |
New Member
Join Date: Dec 2011
Posts: 11
Rep Power: 14 |
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. |
|
|
|
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 04:30 |
Log Law Wind Profile for Urban analysis in Star-CCM+ 4 | plainstyle | Siemens | 1 | June 18, 2010 10:46 |
Wind Velocity Profile in ANSYS CFX | diluom | CFX | 7 | December 10, 2009 22:50 |
log - velocity profile in unstructured grid | michael Rasmussen | CFX | 7 | December 15, 2003 19:59 |