|
[Sponsors] |
September 19, 2011, 08:25 |
Fieldfunction Velocity (i) Direction
|
#1 |
Senior Member
Join Date: Dec 2010
Posts: 135
Rep Power: 15 |
Hi guys.
I want to setup a field function for calculation of beta1 and beta2 (angles of fluid before blade and after). my idea is to calcluate this in the following way: 1. Radial Angle = atan2(x.abs(y)) 2. Relative Radial Velocity = sin($Radial Angle)*$$Velocity[1] - cos($Radial Angle)*$$Velocity[2] 3. Beta = atan2($$Relative Radial Velocity/$$Velocity[3]) It the syntax and also the calculation itself right`? Thanks a lot |
|
September 19, 2011, 20:06 |
|
#2 |
Senior Member
Join Date: Oct 2009
Location: Germany
Posts: 636
Rep Power: 22 |
No, at least the syntax is not right. And this is no statement about the calculation itself, I haven't checked it (too late now, I have to go to bed).
In 1, it should be atan2(x,abs(y)) with a comma instead of a dot In 3, you are referencing a vector field function ($$Relative Radial Velocity), but you didn't specify whether you want to use the magnitude (mag($$Relative Radial Velocity) or any of it's components ($$Relative Radial Velocity[x]). Further there are spaces in the name, so you can't reference it without brakets. It has to be $${Relative Radial Velocity}[0]. Be aware, there are wavy brakets needed! By the way, this also affects point 1 and 2 ($Radial Angle instead of ${Radial Angle}). Generally spoken, I recommend to use field function names without spaces or minus (-). A minus is a common error source, as nearly everybody forgets one day to put the field function name with the minus in wavy brakets and wonders, why the field function does not compile. That's hard to find, when you notice the compile error two hours after programming the field function when starting the simulation and an error message pops up. That's the point when you start to get crazy because you will double check all, the syntax, all other field functions, you will copy and paste the name and all looks fine - but the field function keeps on not to compile. I speak from experience A space in the name is the same. It's not matter IF you will forget to put the brakets, it's just a matter WHEN you will forget it. But you WILL forget it one day. And when another guy has to look at the simulation, maybe a colleague, this two errors will knock him out unless he isn't a really smart guy. When he is a smart guy, he will find it in two minutes. When he isn't, he will kill you... |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Results of CFX Simulations | Sof_70_Usthb | CFX | 3 | July 9, 2011 07:15 |
Vel Profile in Y direction for 2-D flow | devesh | FLUENT | 2 | November 18, 2008 02:46 |
problem defining inlet velocity direction | salman | FLUENT | 3 | January 3, 2007 12:34 |
Gravity component and inlet velocity | Vidya | FLUENT | 8 | July 31, 2006 09:28 |
Neumann pressure BC and velocity field | Antech | Main CFD Forum | 0 | April 25, 2006 03:15 |