CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CD-adapco (http://www.cfd-online.com/Forums/cd-adapco/)
-   -   Initial velocity field in StarCCM+ (http://www.cfd-online.com/Forums/cd-adapco/56915-initial-velocity-field-starccm.html)

Subhadeep December 18, 2008 16:54

Initial velocity field in StarCCM+
 
I want to initialize a 3D velocity field to my problem

u(x) = f(y) = a cubic velocity profile

u(y) = 0.0

u(z) = 0.0

I understand the scalar field function but not quite sure how to implement this vector field to my problem.

f(y) will look like :

a*pow($$Position[1],3) + b*pow($$Position[1],2) + c*$$Position[1]

All the vector field function examples are kind of problem specific and I am unable to figure out how I will achieve what I am trying. So if anyone could point me in the right direction then that will be great.


a December 18, 2008 17:17

Re: Initial velocity field in StarCCM+
 
The field function you are looking for is $$Centroid not $$Position.

Just paste the code you have written into a new field function definition, and set the initial velocity in the x direction to use that field funciont.

Subhadeep December 18, 2008 17:22

Re: Initial velocity field in StarCCM+
 
not quite following what you are trying to say here.

Why should I use centroid first of all?

Secondly, should this be a scalar or vector field function?

if scalar and u(x) only how will I make sure u(y) and u(z) = 0, respectively?


steve December 21, 2008 04:40

Re: Initial velocity field in StarCCM+
 
Hi

Make your FF (field function) of type vector not scalar.

Give it the definition [0,0,$YourFieldFunction]

You can use position, it is the vertex position and is known to STAR-CCM+ before you hit initialise. The value of centroid is calculated during initialisation.

With position there can be potentially problems with tolerances particularly if you try a FF containing for example a sqrt operation if a vertex position falls below zero :), hence I like to use centroid.

Regards

Steve


All times are GMT -4. The time now is 02:25.