CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [swak4Foam] using groovy boundry condition in multiphase problom (https://www.cfd-online.com/Forums/openfoam-community-contributions/94949-using-groovy-boundry-condition-multiphase-problom.html)

javad814 November 30, 2011 17:12

using groovy boundry condition in multiphase problom
 
3 Attachment(s)
Hi every body
I have 2D open channel and want to defined a groovy condition in inlet and just for water (when alpha=1)
this is my velocity profile

[ type groovyBC;
value uniform (0 0 0);

valueExpression
"((pos().y-y0)<=(A*cos(-w*time()+pi/2.0)+0.5*k*A*A*cos(2*(-w*time())+pi))) ? 1*A*w*pos().y/y0*vector( cos(-w*time()+pi/2), sin(-w*time()+pi/2), 0) : vector(0,0,0)";]


with this profile the effect of an air is above the water is similar a wind that i dont want it is it possible to change velocity profile or other things to defined the velocity profile just for alpha=1?:confused:

gschaider November 30, 2011 17:29

Quote:

Originally Posted by javad814 (Post 334202)
Hi every body
I have 2D open channel and want to defined a groovy condition in inlet and just for water (when alpha=1)
this is my velocity profile

[ type groovyBC;
value uniform (0 0 0);

valueExpression
"((pos().y-y0)<=(A*cos(-w*time()+pi/2.0)+0.5*k*A*A*cos(2*(-w*time())+pi))) ? 1*A*w*pos().y/y0*vector( cos(-w*time()+pi/2), sin(-w*time()+pi/2), 0) : vector(0,0,0)";]


with this profile the effect of an air is above the water is similar a wind that i dont want it is it possible to change velocity profile or other things to defined the velocity profile just for alpha=1?:confused:

Took me some time to understand your question. Basically you want above the waterline a zeroGradient for the velocity? That is possible as groovyBC is derived from the mixed boundary condition (look it up in the User Guide).

fractionExpression "alpha1>0.5";

or something similar should do the trick


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