CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Sinusoidal initialisation of initial holdup field. (

balkrishna December 13, 2011 09:29

Sinusoidal initialisation of initial holdup field.

I am using VOF to simulate a 2d case of bubble rising in a liquid. I wish to initialise the gas holdup field in a sinusoidal manner. Precisely ,

If y < Y
alpha =1

alpha =0

Is there any way to do this using setFields ?


Bernhard December 13, 2011 11:54

Using setFields you have the boxToCell method for initialization. Did you try this one?

balkrishna December 13, 2011 14:20

Yes , but i think that allows one to give only initialisations in the form of quadrilaterals ... thats why the name BOXtoCell . Pls correct me if I am wrong ...

Bernhard December 13, 2011 16:16

Ok, I misread your pseudocode, but I am quite sure you can do this with funkySetFields of the swak4Foam utility:

ngj December 13, 2011 16:51

Hi Balkrishna

You would also be able to do it with the waves2Foam utility found in

If you need a sinusoidal interface with a quiescent fluid, then you could initialise the computational domain with a 'stokesFirstStanding' type wave. However, it might be more easily merely to use swak4Foam.

Kind regards,


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