CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   switch between zerogradient and fixedvalue (https://www.cfd-online.com/Forums/openfoam-pre-processing/128189-switch-between-zerogradient-fixedvalue.html)

ahliyu January 6, 2014 07:36

switch between zerogradient and fixedvalue
 
hi,everyone~
i am a rookie of openfoam.
currently, i am simulating DEM with the model in /lagrangian/icoUncoupledKinematicParcelFoam/hopper/.
i'd like to switch the bottom outlet between "wall" and "zerogradient", so that i can control the flowrate of particles running out of the hopper.
i write the groovyBC as follows:

outlet
{
type groovyBC;
valueExpression "vector(0,0,0)";
gradientExpression "vector(0,0,0)";
fractionExpression "(sum(mass)>0.359)?0:1";
value uniform (0 0 0);
}


as shown, when the total mass is less than 0.359, i want to stop the leakage of particles.
i set type of outlet in blockmeshdic as "patch".
as last, there is no mistakes but the leakage of particles does not stop as i expect when the total mass is less than 0.359.

any suggestions will be appreciated.

and i have no idea whether there is a BC that can switch between "wall" and "zerogradient"?


All times are GMT -4. The time now is 17:45.