CFD Online Discussion Forums

CFD Online Discussion Forums (
-   STAR-CCM+ (
-   -   inital conditions (

jopawipr April 21, 2010 08:33

inital conditions
Hey everybody!
I desined 3 eulerian phases(Dodecane(L),Dodecane(G) and Nitrogen).
At the beginning of my simulation there is just Dodecane(L) and Nitrogen.
So how can I define where the inital position of the phases are?
It's a 3dimensional simulation. The inital position just depends in z direction.
So for example:
z<=0.5 --> Nitrogen
z>=0.5 --> Dodecane(L)
Can anybody help me?
thank you very much!

Vinicius April 22, 2010 09:20

Hi Johannes,

You have to create a scalar field function such as:

Initial Nitrogen:

($$Centroid[2] < 0.5 ) ? 1 : 0

Initial Dodecane:
($$Centroid[2] > 0.5) ? 1 : 0

at the Volume Fraction node, select it to composite and associate these field functions for each phase.

You can also use the $$Position field function instead $$Centroid. Be sure that you mesh has a good quality in this region, and if possible, try to have the cells aligned in the division line.



jopawipr April 26, 2010 07:22

Thank you very much for your answer!

But for what is the "?" in the equation?
And the [2] is for the z-axis?

Best regards,

Vinicius April 26, 2010 07:25

The ? in the equation is the "if" condition, for example (condition) ? true : false.

The axis are x =[0], y=[1] and z=[2].


jopawipr April 26, 2010 08:10

thank's a lot!
a last question:
Does it matter i which order I define the three eulerian phases?
Cause i still get a failure when I define Dodecane(L) and Nitrogen with a field function. The initial condition of Dodecane(G) is 0 and constant...
Thanks, and best regards

Vinicius April 26, 2010 08:56

The order that you create the phases just define the order you might input the data in some fields, like volume fraction... What is the error that appears?

All times are GMT -4. The time now is 21:24.