CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   STAR-CCM+ (http://www.cfd-online.com/Forums/star-ccm/)
-   -   creating velocity inlet profile on star ccm+ (http://www.cfd-online.com/Forums/star-ccm/64849-creating-velocity-inlet-profile-star-ccm.html)

loreaero May 26, 2009 13:06

creating velocity inlet profile on star ccm+
 
hallo :),
i'm an italian student and i've some problems with star ccm+.
i need to create a velocity log law profile but i don't know how to compile a field function. i 've tried to create some function component and to assemble these on vector one with no results.
i add my attempts:
i've tried to introduce the z variable with $$Position[2]
u(z) component definition:
((0.164696691/0.4)*log(($$Position[2]+5.32267E-05)/5.32267E-05*0.866)-3.084
v(z) component definition:
-(0.164696691/0.4)*log(($$Position[2]+5.32267E-05)/5.32267E-05)*0.5

help me please
thanks a lot

Maddin May 27, 2009 03:37

In my ccm the z variable is "Position_2" and to use them I make $Position_2 :)

/edith says: Often the field function is only shown when you had "used" them in a scene, don't know why but I only have the "Position"-Vector, when I used the scalar displayer Position -> Laboratory -> Z, I have the field function Position[Z].
I hope it helps you.

pad May 27, 2009 05:14

I actually did something similar with a power-law profile based on a desired flow rate where I used several field functions to calculate Re, exponents etc.

If you are using a cylindrical boundary (e.g. a pipe) you might find it easier to define a local cylindrical coordinate system (placed in the center of the inlet) and then use

$$Centroid(name_of_your_cylindrical_coordinate_sys tem)[0]
$$Centroid(name_of_your_cylindrical_coordinate_sys tem)[1]
$$Centroid(name_of_your_cylindrical_coordinate_sys tem)[2]

to calculate the velocity based on the distance from the center of this CS.

Consult the manuel regarding the details of the x, y, z of the cylindrical coordinate system.

Hope this helps a bit...

loreaero June 8, 2009 09:55

thanks very much at all
 
thanks very much at all!! :) i've solved my problem :p
i don't understand why, but starccm+ don't love number squared...and on my first expression i've digited ^2 and not the simple number result.
well! if you need to simulated a velocity profile for an atmospheric boundary layer, the best way is to write the log law in component like what i've do and to create a field function velocity where put the component expression.like this
[((0.164696691/0.4)*log(($$Position[2]+5.32267E-05)/5.32267E-05)*0.866)+3.084 , -(0.164696691/0.4)*log(($$Position[2]+5.32267E-05)/5.32267E-05)*0.5 ,0]

thanks again
good luck at all :)


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