CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Setting a pressure threshold as boundary condition (https://www.cfd-online.com/Forums/openfoam-programming-development/130660-setting-pressure-threshold-boundary-condition.html)

james91 March 2, 2014 05:10

Setting a pressure threshold as boundary condition
 
Dear Foamers

For an inlet condition I need a pressure dependent boundary condition:
if the pressure is higher than the p_threshold then there should be injection of fresh mixture
if the pressure is lower than the p_threshold then there should be blockage of the inlet (simplified: a wall condition).

I am working with the inletOutlet boundary condition (not really working yet) so if anyone of you would have suggestions, or better/simpler idea please let me know!


Thanks!

Quentin July 9, 2014 08:30

Hi Janes,

I'm also working on a pressure threshold BC ; i'm also working with he existant inleoutlet BC but can't get the trick working. Did you manage to find a solution ?

Right now my updatecoeff fuction looks like :

Code:

if (this->updated())
    {
        return;
    }
    const Field<scalar>& phip =
        this->patch().template lookupPatchField<volScalarField, scalar>
        (
            "p"
        );
   
    this->valueFraction() = pos(phip - pthreshold_);

    mixedFvPatchField<Type>::updateCoeffs();

The calculation works fine (without crasing) but my BC doesn't seem to do anything more than a zeroGradient one.

thanks

dli December 2, 2017 20:09

hi,james
Did you find was to solve it? For this dependent pressure boundary, is the codedfixedvalue is convinient? could you please give me some advices on this? thanks.


All times are GMT -4. The time now is 11:13.