September 9, 2024, 18:06
|
Total flow volume mismatch for inflow and outflow
|
#1
|
New Member
Abdullah Saifee
Join Date: Feb 2021
Posts: 13
Rep Power: 6
|
I am running an incompressible laminar flow simulation with the pimpleFoam solver. It has two openings on one side (n1 and n2) and one on the other (n3). I have set up the pressure boundary conditions so that the flow is driven primarily by the pressure applied at n3. The flow should be changing direction halfway. Realistically, the total volume passing through an opening should be the same for the two flow direction. Yet, when I sum over the patch flow rates (postProcessing function) of the two flow directions and compare them, they are different. What could be the potential reason(s) for this phenomenon?
Following is the pressure boundary condition I set up:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 10
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
n1
{
type totalPressure;
p0 uniform 0; // Reference total pressure (e.g., atmospheric pressure in Pascals)
U U; // Velocity field name
phi phi; // Flux field name
rho none; // Density, use 'none' for incompressible flow
psi none; // Compressibility, use 'none' for incompressible flow
gamma 1; // For incompressible flow, use 1
}
n2
{
type totalPressure;
p0 uniform 0; // Reference total pressure
U U;
phi phi;
rho none;
psi none;
gamma 1;
}
n3
{
type uniformTotalPressure;
p0
{
type sine;
frequency 0.3333333333333333;
amplitude -50.0;
level 0;
}
}
walls
{
type zeroGradient;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //
and U boundary condition:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2006 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
n1
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
n2
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
n3
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
walls
{
type noSlip;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //
Last edited by saifee; September 10, 2024 at 17:32.
|
|
|