|
[Sponsors] | |||||
(Pressure) Boundary Conditions for Atmospheric flow - BuoyantSimpleFoam |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
New Member
Gabriel Beltrami
Join Date: Mar 2025
Posts: 1
Rep Power: 0 ![]() |
Hello,
I am trying to set a simple test case in openfoam to test buoyantSimpleFoam, but I was not able to properly set my simulation, causing divergence/weird flows with every option I tried, I was hoping someone could give me some new insights. The case is a simple atmospheric flow through a 3D domain, from W (inlet) to E (outlet), or a flow along the x-axis. My bottom boundary should be a no-slip boundary, my side boundary (N) has to be symmetric, but the other one (S) can be symmetric or a slip boundary. My top boundary (sky) would ideally be an open boundary (maybe something like the S boundary, or an outlet-ish boundary?). When I try to run this, I get huge recirculations on the east boundary, with complete non-physical behavior. I will leave my U and p_rgh files here, but you can also find the case here. Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [ 0 1 -1 0 0 0 0 ];
internalField uniform (1.17 0 0);
boundaryField
{
"(W)"
{
type atmBoundaryLayerInletVelocity;
flowDir (1 0 0);
zDir (0 0 1);
Uref 0.5;
Zref 10;
z0 uniform 0.5;
d uniform 0.0;
value uniform (1.17 0 0);
}
"(E)"
{
type zeroGradient;
}
"(sky)"
{
type slip;
}
"(N|S)"
{
type symmetry;
}
bottom
{
type noSlip;
}
}
Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2406 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object p_rgh; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 101325; boundaryField { "(bottom)" { type fixedFluxExtrapolatedPressure; } "(W|sky)" { type fixedFluxExtrapolatedPressure; } "(N|S)" { type symmetry; } "(E)" { type fixedValue; value uniform 101325; } } // ************************************************************************* // uc.png |
|
|
|
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Dec 2021
Posts: 295
Rep Power: 7 ![]() |
Hey,
Depending on the vertical size of your domain, the hydrostatic pressure could play a significant role at the vertical boundaries. I assume you initialize the pressure p_rgh as constant in the domain? If you do, during the first steps, the density at high elevation will drop. The fixedValue at the East boundary will then see a lower pressure in the adjacent cells at the top of the domain, and thus add an inflow. The opposite happens at the bottom of the boundary (higher density in the domain than at the bottom of the boundary). At least that is how I interpret it, even though p_rgh supposedly gets rid of the rho*g*h part. It always is a headache to run buoyantSimpleFoam on large domains and open boundaries. If you use the ESI version, I had some decent results using the FO hydrostaticPressure. It creates another field, ph_rgh, accounting for hydrostatic contribution, and gives you access to an additional pressure boundary condition called prhgTotalHydrostaticPressure which is way better at handling density differences due to elevation. It is tricky to set up and I never quite got the hang of it, but maybe you can try to figure it out. To test out what I said, maybe try to run the case with a constant density in thermophysicalProperties and see if you get the same backflow at the outlet. If you do not, then this might be the reason
|
|
|
|
|
|
![]() |
| Tags |
| atmospheric flow, boundaryconditions, buoyantsimplefoam, openfoam |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Windkessel boundary implementation | Filippo70 | OpenFOAM Programming & Development | 0 | November 7, 2024 12:04 |
| reverse flow in centrifugal fan blades | kalm | CFX | 20 | December 2, 2023 07:25 |
| Issues on the simulation of high-speed compressible flow within turbomachinery | dowlee | OpenFOAM Running, Solving & CFD | 11 | August 6, 2021 07:40 |
| Basic Nozzle-Expander Design | karmavatar | CFX | 20 | March 20, 2016 09:44 |
| New topic on same subject - Flow around race car | Tudor Miron | CFX | 15 | April 2, 2004 07:18 |