CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Cosinusoidal free-surface (

nuovodna April 26, 2010 02:50

Cosinusoidal free-surface
Hi, i'd like to set up the initial values of "alpha1" to design a cosinusoidal free surface (not a straight line but following a specified function). I attach a image file: the green line is the function
y = 0.05*cos(x/.1)+.3
over the damBreak mesh points. How can i set up this type of free surface??

Image file:

Thanks in advance


ngj April 26, 2010 04:39

Hi Emanuele

I would suggest that you take a look on funkySetFields. Here you should be able to set more general void fractions than with setFields. Here is a link to the wiki:

Have fun,


nuovodna April 27, 2010 06:03

thanks for the tip!! It works :D

PS I'd like to have for each cell the fraction alpha in order to initiate the simulation with a continuous interface (without steps on the interface). I imagine it's not easy to program for a general case, I've already made it for rectangle and sphere but it would be better if associated with funkySetFields.

All times are GMT -4. The time now is 22:04.