View Issue Details

IDProjectCategoryView StatusLast Update
0001582OpenFOAMBugpublic2015-03-27 15:14
Reporteruser1101Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
PlatformGNU/LinuxOSUbuntuOS Version14.04
Summary0001582: Inoperant groovyBC conditionnal boundary conditions if inflow or outflow normal velocity
DescriptionI am trying to define a different boundary condition for the salinity S if the velocity on my boundary is inflow or outflow:

-> fixedValue 1 if inflow
-> zeroGradient if outflow

I use the following code unsuccessfully (nothing happened) using shallowWaterFoam solver:

[CODE]
Sea
    {
        type groovyBC;
        valueExpression "1";
        gradientExpression "0";
        fractionExpression "(U&normal()>0)?0:1";
        value uniform 0;

    }
[/CODE]
Steps To ReproduceImplement a salinity equation in shallowWaterFoam with the above boundary conditions.
TagsNo tags attached.

Activities

henry

2015-03-23 16:00

manager   ~0004191

We do not support or maintain groovyBC; this functionality is a small sub-set of what is possible with the code-stream BCs we offer. If you rewrite your BC using codedFixedValue we will investigate further.

For an example of using the codedFixedValue BC see the 0.org/U file in the
incompressible/simpleFoam/pipeCyclic tutorial.

wyldckat

2015-03-26 20:32

updater   ~0004493

Greetings to all!

@loic_d: From your description... have you tried using the boundary type "inletOutlet"? See the last table on this page: http://www.openfoam.org/docs/user/boundaries.php - the reference to "p" is actually in reference to the field where the boundary type is defined.

Best regards,
Bruno

user1101

2015-03-27 15:07

  ~0004495

Thank you very much @wyldckat! It seems work, I had not noticed that I can use inletOutlet patch type for other field that U-p

Thank you @henry, I won't use groovyBC this time.

Best regards
Loïc

Issue History

Date Modified Username Field Change
2015-03-23 13:11 user1101 New Issue
2015-03-23 16:00 henry Note Added: 0004191
2015-03-24 00:17 liuhuafei Issue cloned: 0001583
2015-03-26 20:32 wyldckat Note Added: 0004493
2015-03-27 15:07 user1101 Note Added: 0004495
2015-03-27 15:14 henry Status new => closed
2015-03-27 15:14 henry Assigned To => henry
2015-03-27 15:14 henry Resolution open => no change required