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/)
-   -   Error using GroobyBC (https://www.cfd-online.com/Forums/openfoam-solving/79653-error-using-groobybc.html)

NewFoamer August 30, 2010 09:58

Error using GroobyBC
 
Hello,

I'm trying to use GroovyBC to implement following boundary on the velocity field:

PHP Code:

feed
    
{
        
type            groovyBC;
        
variables       "pFeed@feed=p;pDraw@draw=p;";
        
valueExpression "(pFeed-pDraw)*normal()";
        
value           uniform (0 0 0);        
    }

    
draw
    
{
        
type            fixedValue;
        
variables       "pFeed@feed=p;pDraw@draw=p;";
        
valueExpression "(pFeed-pDraw)*normal()";
        
value           uniform (0 0 0);        
    } 

However, when trying to use icoFoam to solve my problem, I get following error:

PHP Code:

Courant Number mean0 max2e-05
DILUPBiCG
:  Solving for UxInitial residual 1, Final residual 3.1531e-07No Iterations 4
DILUPBiCG
:  Solving for UyInitial residual 0, Final residual 0No Iterations 0
DICPCG
:  Solving for pInitial residual 1, Final residual 9.95444e-07No Iterations 257
time step continuity errors 
sum local 2.58366e-13, global = 9.29505e-16cumulative 9.29505e-16
--> FOAM Warning 
    
From function PatchResult::getUniformInternal(const label size,bool noWarn)
    
in file PatchResultI.H at line 96
    The minimum value 53.321 
and the maximum 1346.83 differI will use the average 687.19
DICPCG
:  Solving for pInitial residual 0.999897, Final residual 8.51967e-07No Iterations 260
time step continuity errors 
sum local 8.51066e-09, global = 1.06309e-11cumulative 1.06318e-11
--> FOAM Warning 
    
From function PatchResult::getUniformInternal(const label size,bool noWarn)
    
in file PatchResultI.H at line 96
    The minimum value 
-2.21757e+09 and the maximum -3.40424e+08 differI will use the average -1.63456e+09
ExecutionTime 
1.1 s  ClockTime 1 s 

Is it that I cannot access the pressure fields in this way, or why is it happening?

gschaider August 30, 2010 11:48

Quote:

Originally Posted by NewFoamer (Post 273363)
Hello,

I'm trying to use GroovyBC to implement following boundary on the velocity field:

PHP Code:

feed
    
{
        
type            groovyBC;
        
variables       "pFeed@feed=p;pDraw@draw=p;";
        
valueExpression "(pFeed-pDraw)*normal()";
        
value           uniform (0 0 0);        
    } 

However, when trying to use icoFoam to solve my problem, I get following error:

PHP Code:

--> FOAM Warning 
    
From function PatchResult::getUniformInternal(const label size,bool noWarn)
    
in file PatchResultI.H at line 96
    The minimum value 53.321 
and the maximum 1346.83 differI will use the average 687.19 

Is it that I cannot access the pressure fields in this way, or why is it happening?

The problem is that feed and draw (for instance) may have differing numbers of faces. What would be the correct way to map pDraw to feed then? Therefor groovyBC only uses uniform values for external variables. If the variable is not uniform (as in your case) groovyBC decides to make it uniform and instead of keeping you in the dark about this decision tells you about it.

To avoid the warning you'll have to "uniformize" p with either min, max, sum or average.

Even if feed and draw are of the same size there is no guarantee that the faces there are orderered the same (and what means "the same" anyway if they are not oriented in parallel) so groovyBC even then makes no attempt to use non-uniform values. So if you wanted to use groovyBC to generate some cyclic-BC: sorry. Not possible at the time

Bernhard

NewFoamer August 30, 2010 11:56

Ah, okay, awesome, thanks for the answer..


All times are GMT -4. The time now is 05:02.