CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Boundary conditions for hydraulically developed flow in buoyantSimpleFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 1, 2015, 11:05
Default Boundary conditions for hydraulically developed flow in buoyantSimpleFoam
  #1
Member
 
Join Date: Jan 2011
Posts: 45
Rep Power: 15
buffi is on a distinguished road
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
buffi is offline   Reply With Quote

Old   September 5, 2015, 11:09
Default
  #2
New Member
 
Join Date: Aug 2015
Posts: 17
Rep Power: 11
ajonuz is on a distinguished road
Hi Christoph,

did you manage to find a solution to your problem? I'm experiencing quite similar issue at the moment.

Best regards
Admir
ajonuz is offline   Reply With Quote

Old   August 22, 2019, 11:38
Default
  #3
Member
 
Join Date: Mar 2019
Posts: 81
Rep Power: 7
mm66 is on a distinguished road
I know it might be quite late to reply to this thread but for future reference, the boundary condition for T should include:

Code:
    Inlet
    {
        type            fixedValue;
	patchType	cyclic;
        value     	uniform 298.15;
    }
mm66 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Issues on the simulation of high-speed compressible flow within turbomachinery dowlee OpenFOAM Running, Solving & CFD 11 August 6, 2021 07:40
Boundary conditions in channel flow with wall model GCMS_A OpenFOAM Pre-Processing 0 April 21, 2015 09:47
Boundary conditions for boundary layer flow harry123 Main CFD Forum 2 February 14, 2015 06:19
Radiation interface hinca CFX 15 January 26, 2014 18:11
Proper Pressure Boundary Conditions for Buoyant Flow mchurchf OpenFOAM 0 March 25, 2010 13:16


All times are GMT -4. The time now is 18:40.