March 1, 2025, 22:41
|
Negative temperature, density, and pressure in buoyantSimpleFoam
|
#1
|
New Member
Ash
Join Date: Mar 2025
Posts: 1
Rep Power: 0
|
Hello all,
I'm simulating laminar flow past a cuboidal obstruction in a cuboidal domain. The domain has an inlet, outlet, sides, and the bottom is a wall. The cuboidal obstruction is a wall on all sides and is located on the bottom face of the domain. I know the velocity and temprature at the inlet coming into the domain. When I try solving this with buoyantSimpleFoam, the temperature, density, and pressure become negative within 2 iterations and the simulation crashes. (The pressure becomes negative at the face of the obstruction opposite the face facing the inlet). If I remove the cuboidal obstruction and just simulate flow in the domain it works fine. Can someone please help me identify the issue? Thank you!
The p_rgh file is here:
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2412 |
| \\ / 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
{
"domain_.*"
{
type fixedFluxPressure;
value uniform 101325;
}
domain_outlet
{
type fixedValue;
value uniform 101325;
}
obstruction
{
type fixedFluxPressure;
value uniform 101325;
}
}
// ************************************************** *********************** //
|
Quote:
Here is U:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2412 |
| \\ / 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 4.47);
boundaryField
{
domain_inlet
{
type fixedValue;
value $internalField;
}
domain_outlet
{
type inletOutlet;
inletValue uniform (0 0 0);
value $internalField;
}
domain_left
{
type zeroGradient;
}
domain_right
{
type zeroGradient;
}
domain_up
{
type zeroGradient;
}
domain_down
{
type noSlip;
}
obstruction
{
type noSlip;
}
}
// ************************************************** *********************** //
|
Last edited by acsfhd97; March 2, 2025 at 18:21.
Reason: Clarity
|
|
|