CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   STAR-CCM+ (https://www.cfd-online.com/Forums/star-ccm/)
-   -   Volume Fraction Scene Initialisation (https://www.cfd-online.com/Forums/star-ccm/236086-volume-fraction-scene-initialisation.html)

jp2617 May 13, 2021 06:21

Volume Fraction Scene Initialisation
 
2 Attachment(s)
Hi there!

Apologies if this was addressed in another thread - I haven't found anyone facing a similar issue.

I'd like to initialise an oil volume fraction scene of a disc and a gear immersed into oil within two separate simulations. I have successfully initialised the oil volume fraction scene for the disc, but not the gear. Could you please help me get the two colour- to represent the two-phases (oil below and air above) - appearance in the scene for the case of the gear as you see for the disc in the image attached - VOF_disc?

I have defined within the 'Volume Fraction' initial conditions segment, a field function for the initial volume fraction of the oil. The formula I used is ($$Centroid[1]<=-0.023?1:0) as recommended in minute 8:35 of the following video:- https://www.youtube.com/watch?v=qKUU5l1BmDA. I have also followed the exact procedure of this video to set up the volume fraction, with exception of changing the [2] in the above field function to [1] to reflect a difference in the coordinate directions.

In the case of the gear, both the scale for the oil volume fraction and colour of the scene does not change in value or colour respectively, in response to any changes in the definition of the -0.023 value - the immersion depth defined from the y-midspan downwards - in the mentioned field function. The scale of the oil volume fraction here maintains a value of 0.0 on either end always.

Funnily enough, when I define the initial condition of the oil volume fraction as a constant instead, with a value of 0.5, the upper and lower bounds of the scale change in its values to 0.5, but the scene colour remains unchanged (all-blue) when the scene is initialised (see attached image, VOF_Gear). I am happy to privately share my model with you if you dropped me an email:- jesidhn@gmail.com.

Thanks so much!:)

LuckyTran May 13, 2021 11:04

[0] is the x-coordinate, [1] is the y-coordinate and [2] is the z-coordinate. Your image is on the xy-plane so it would make sense that it is constant on this plane if you used position[2] as a threshold in your field function definition.

jp2617 May 13, 2021 11:53

Thanks for the reply. The immersion depth varies in the y-direction however, corresponding to position [1]. This works for the case of the disc.:confused:

LuckyTran May 13, 2021 18:02

Try plotting the y-position. You might have your gear placed in a location where you think it is not.


All times are GMT -4. The time now is 12:59.