CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Backflow option for pressure outlet boundary condition

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 30, 2014, 03:46
Default Backflow option for pressure outlet boundary condition
  #1
Member
 
Kan
Join Date: Feb 2014
Location: Australia
Posts: 54
Rep Power: 12
nwpukaka is on a distinguished road
Hi,

For this outlet boundary condition with backflow, I want to set turbulence kinetic energy and dissipation rate for this backflow, what kind of boundary conditions should I set? and how does the code determine that this is backflow?

Thanks in advance

Kan
nwpukaka is offline   Reply With Quote

Old   May 1, 2014, 00:45
Default
  #2
Member
 
skyinventorbt's Avatar
 
Dr. B T KANNAN
Join Date: Jul 2011
Location: CHENNAI (MADRAS), INDIA
Posts: 55
Rep Power: 15
skyinventorbt is on a distinguished road
Quote:
Originally Posted by nwpukaka View Post
Hi,

For this outlet boundary condition with backflow, I want to set turbulence kinetic energy and dissipation rate for this backflow, what kind of boundary conditions should I set? and how does the code determine that this is backflow?

Thanks in advance

Kan
Try inletOutletVelocity BC

--
KANNAN B T
skyinventorbt is offline   Reply With Quote

Old   May 1, 2014, 04:58
Default
  #3
Member
 
Kan
Join Date: Feb 2014
Location: Australia
Posts: 54
Rep Power: 12
nwpukaka is on a distinguished road
Quote:
Originally Posted by skyinventorbt View Post
Try inletOutletVelocity BC

--
KANNAN B T
Thank you very much, KANNAN.

About this inletOutlet BC, it says it switches U and p between fixedValue and zeroGradient depending on direction of U, for the direction of U, does that mean the normal direction of velocity of bounding cell?

Kan
nwpukaka is offline   Reply With Quote

Old   May 1, 2014, 18:16
Default
  #4
Senior Member
 
fumiya's Avatar
 
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 266
Blog Entries: 1
Rep Power: 19
fumiya is on a distinguished road
Hi,

The direction of U is determined by the sign of the flux ("phi" field) across the patch faces:

https://github.com/OpenFOAM/OpenFOAM...FvPatchField.C
Code:
template<class Type>
void Foam::inletOutletFvPatchField<Type>::updateCoeffs()
{
    if (this->updated())
    {
        return;
    }

    const Field<scalar>& phip =
        this->patch().template lookupPatchField<surfaceScalarField, scalar>
        (
            phiName_
        );

    this->valueFraction() = 1.0 - pos(phip);

    mixedFvPatchField<Type>::updateCoeffs();
}
On the outlet patches
  • positive flux (out of domain) phi>=0: pos(phi)=1 and valueFraction=0 apply zero-gradient condition
  • negative flux (into of domain) phi<0: pos(phi)=0 and valueFraction = 1 apply the user-specified fixed value

This switching is performed using the mixedFvPatchField:
https://github.com/OpenFOAM/OpenFOAM...FvPatchField.C
Code:
template<class Type>
void mixedFvPatchField<Type>::evaluate(const Pstream::commsTypes)
{
    if (!this->updated())
    {
        this->updateCoeffs();
    }

    Field<Type>::operator=
    (
        valueFraction_*refValue_
      +
        (1.0 - valueFraction_)*
        (
            this->patchInternalField()
          + refGrad_/this->patch().deltaCoeffs()
        )
    );

    fvPatchField<Type>::evaluate();
}
Hope this helps,
Fumiya
__________________
[Personal]
fumiya is offline   Reply With Quote

Old   May 1, 2014, 21:00
Default
  #5
Member
 
Kan
Join Date: Feb 2014
Location: Australia
Posts: 54
Rep Power: 12
nwpukaka is on a distinguished road
Quote:
Originally Posted by fumiya View Post
Hi,

The direction of U is determined by the sign of the flux ("phi" field) across the patch faces:

https://github.com/OpenFOAM/OpenFOAM...FvPatchField.C
Code:
template<class Type>
void Foam::inletOutletFvPatchField<Type>::updateCoeffs()
{
    if (this->updated())
    {
        return;
    }

    const Field<scalar>& phip =
        this->patch().template lookupPatchField<surfaceScalarField, scalar>
        (
            phiName_
        );

    this->valueFraction() = 1.0 - pos(phip);

    mixedFvPatchField<Type>::updateCoeffs();
}
On the outlet patches
  • positive flux (out of domain) phi>=0: pos(phi)=1 and valueFraction=0 apply zero-gradient condition
  • negative flux (into of domain) phi<0: pos(phi)=0 and valueFraction = 1 apply the user-specified fixed value

This switching is performed using the mixedFvPatchField:
https://github.com/OpenFOAM/OpenFOAM...FvPatchField.C
Code:
template<class Type>
void mixedFvPatchField<Type>::evaluate(const Pstream::commsTypes)
{
    if (!this->updated())
    {
        this->updateCoeffs();
    }

    Field<Type>::operator=
    (
        valueFraction_*refValue_
      +
        (1.0 - valueFraction_)*
        (
            this->patchInternalField()
          + refGrad_/this->patch().deltaCoeffs()
        )
    );

    fvPatchField<Type>::evaluate();
}
Hope this helps,
Fumiya
Thank you very much. Fumiya.

It really helps!

Kan
nwpukaka is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difficulty in calculating angular velocity of Savonius turbine simulation alfaruk CFX 14 March 17, 2017 07:08
Low Mixing time Problem Mavier CFX 5 April 29, 2013 01:00
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 08:00
No results for solid domain Gary Holland CFX 10 March 13, 2009 04:30
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 16:55


All times are GMT -4. The time now is 03:53.