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/)
-   -   BC Pressure Driven Flow (https://www.cfd-online.com/Forums/openfoam-solving/217918-bc-pressure-driven-flow.html)

Carlo_P May 30, 2019 07:59

BC Pressure Driven Flow
 
Hey guys,
I'm trying to simulate the flow in a T-Pipe, with two Inlet (upper and left) and 1 Outlet.


In the Inlet_up flows a fixed massFlowRate
In the Inlet_sx the flow is coming inside due to a difference of pressure
In the Outlet, the flow is going out.


I have some problems in the BC, in particolar in the Inlet_sx.
I'm not sure if is better to use TotalPressure or fixed value for p and pressureInletOutletVelocity for U.



In the Inlet_up: U=massFlowRate
p=zeroGradient


In the Outlet: U= zeroGrazdient
p= fixed value0


In the Inlet_sx:
U= zeroGradient or pressureInletOutletVelocity?:confused:
p=totalPressure or fixedValue?:confused:



Thanks for any suggestion!:)


Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      volVectorField;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


dimensions      [0 1 -1 0 0 0 0];

internalField  uniform (0 0 0);

boundaryField
{
    /*Inlet_up
    {
        type            fixedValue;
        value          uniform (0 -5 0);
    }*/
       
    /*{
        type            flowRateInletVelocity;
        massFlowRate    constant 0.000019;
        rhoInlet        1.22;
    }*/
   
    #include "include/fixedInlet"
   
        Inlet_sx
    {

    type            zeroGradient;

    }
    Outlet
    {
        type            zeroGradient;
    }

    Sym
    {
        type            symmetry;
    }
    Body
    {
      type          noSlip;
    } 

}




Code:

FoamFile
{
    version 2.0;
    format ascii;
    class volScalarField;
    location "0";
    object p;
}
dimensions [ 0 2 -2 0 0 0 0 ];
internalField uniform 0.0;
boundaryField
{
    Inlet_sx
    {
        type          fixedValue;
       
        value          uniform 0;
    }

    Outlet
    {
        type          fixedValue;
       
        value          uniform 0;
    }

    Inlet_up
    {
        type zeroGradient;
    }

    Sym
    {
        type symmetry;
    }

    Body
    {
        type zeroGradient;
    }

}



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