Boundary conditions for hydraulically developed flow in buoyantSimpleFoam
Hi,
I want to set up a case where the flow is hydraulically developed, but the fluid enters the domain with a constant temperature. This means that I need
- cyclic patches at the inlet and at the outlet,
- a fan boundary condition for the pressure,
- a cyclic boundary condition for the velocity and
- fixedValue/zeroGradient (or equivalent) boundary conditions for the temperature.
The walls will have no-slip/constant temperature BCs. Here are my files from the 0/ directory:
p:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 1e5;
boundaryField
{
"walls"
{
type zeroGradient;
}
"front|back"
{
type empty;
}
inlet
{
type fan;
patchType cyclic;
f List<scalar> 1(-22.058);
value uniform 0;
}
outlet
{
type fan;
patchType cyclic;
f List<scalar> 1(-22.058);
value uniform 0;
}
}
// ************************************************************************* //
p_rgh:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 1e5;
boundaryField
{
"walls"
{
type zeroGradient;
}
"front|back"
{
type empty;
}
inlet
{
type fan;
patchType cyclic;
f List<scalar> 1(-22.058);
value uniform 0;
}
outlet
{
type fan;
patchType cyclic;
f List<scalar> 1(-22.058);
value uniform 0;
}
}
// ************************************************************************* //
U:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.0 |
| \\ / 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 (0.1 0 0);
boundaryField
{
walls
{
type fixedValue;
value uniform (0 0 0);
}
front
{
type empty;
}
back
{
type empty;
}
inlet
{
type cyclic;
}
outlet
{
type cyclic;
}
}
// ************************************************************************* //
T:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 293;
boundaryField
{
"walls"
{
type fixedValue;
value uniform 300;
}
"front|back"
{
type empty;
}
inlet
{
type fixedValue;
value uniform 293;
}
outlet
{
type zeroGradient;
}
}
// ************************************************************************* //
constant/thermophysicalProperties:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType
{
type heRhoThermo;
mixture pureMixture;
transport const;
thermo hConst;
equationOfState rhoConst;
specie specie;
energy sensibleEnthalpy;
}
mixture
{
specie
{
nMoles 1;
molWeight 18.02;
}
thermodynamics
{
Cp 4185;
Hf 0;
}
transport
{
mu 1e-03;
Pr 7;
}
}
// ************************************************************************* //
buoyantSimpleFoam complains about
Code:
--> FOAM FATAL IO ERROR:
inconsistent patch and patchField types for
patch type cyclic and patchField type fixedValue
which does not really surprise me, but do I circumvent it? I'm also not sure about p and p_rgh, which BCs should I use for those? They both have fan BCs above, but I don't think that's correct.
The flow is a 2D channel flow in horizontal direction, with heated walls (see T). I know that I should probably use a constant heat flux BC for T on the walls, but that's not the problem now.
Can anyone shed some light on this?
Regards
Christoph
|