CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   zeroGradient vs fixedGradient vs mixedBC (https://www.cfd-online.com/Forums/openfoam-solving/126083-zerogradient-vs-fixedgradient-vs-mixedbc.html)

dl6tud November 7, 2013 14:45

zeroGradient vs fixedGradient vs mixedBC
 
I tried to make my own boundary condition, and discovered, that the mixed boundary condition does not behave as expected. With the following set, I thought it would work like 'zeroGradient' or 'fixedGradient' with gradient=0, but it does not. The Poisson equation for p does not converge ...

type mixed;
gradient 0;
value 0;
valueFraction 0;

Any hints? Mixed boundary condition is a mix of Dirichlet and a normal gradient?

dl6tud November 8, 2013 04:07

I found the solution: As implemented now, the mixed boundary condition can not be used as purely gradient boundary condition (valueFraction = 0).

Quote:

//- Return true if this patch field fixes a value.
// Needed to check if a level has to be specified while solving
// Poissons equations.
virtual bool fixesValue() const
{
return true;
}

malv83 October 5, 2018 10:30

Quote:

Originally Posted by dl6tud (Post 461154)
I found the solution: As implemented now, the mixed boundary condition can not be used as purely gradient boundary condition (valueFraction = 0).

Hello, I know it is a very old post but still useful. I have one question though, does this mean that we solve the problem changing true by false?

In my current implementation (OpenFOAM 5.x) the default value is true and valueFraction = 0 does not behave as zeroGradient BC


All times are GMT -4. The time now is 01:21.