CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

2D Fan Boundary Condition

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 16, 2020, 19:50
Default 2D Fan Boundary Condition
  #1
New Member
 
Join Date: Oct 2020
Posts: 1
Rep Power: 0
sholland is on a distinguished road
Hi,



I am looking in the ventilation of a battery module. As I am new to OpenFOAM I have simplified the model as much as possible, making it both 2D and only using rectangular space claims.



I am trying to determine the flow rate across each level of the battery due to different fans.



How is openFOAM computing the volumetric flow rate in my fanCurve file if the model is "infinitely" deep?



Can any one explain why I get the following two error with my fanCurve file. If I don't comment out lines 8-15


I get the error



Quote:
--> FOAM FATAL IO ERROR:
incorrect first token, expected <int> or '(', found on line 8 the word 'FoamFile'

file: /home/sholland/OpenFOAM/sholland-8/run/full_mod_initial_tests/y30_fan_inlet/constant/fanCurve at line 8.

From function Foam::Istream& Foam:perator>>(Foam::Istream&, Foam::List<T>&) [with T = Foam::Tuple2<double, double>]
in file lnInclude/ListIO.C at line 148.

FOAM exiting

But if I comment it out when I go to open ParaView I get the following error message.



Quote:
--> FOAM Warning :
From function bool Foam::IOobject::readHeader(Foam::Istream&)
in file db/IOobject/IOobjectReadHeader.C at line 88
Reading "/home/sholland/OpenFOAM/sholland-8/run/full_mod_initial_tests/y30_fan_inlet/constant/fanCurve" at line 17
First token could not be read or is not the keyword 'FoamFile'

Check header is of the form:


/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 7
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class IOobject;
location "constant";
object fanCurve;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


See fan curve file below.



Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  7
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
// FoamFile
// {
//    version     2.0;
//    format      ascii;
//    class       IOobject;
//    location    "constant";
//    object      fanCurve;
//}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
5
(
(34 192.06) //(velocity pressure_jump)
(40 174.60)
(45 163.25)
(50 151.03)
(58 126.58)
)


// ************************************************************************* //
Secondly as this is a 2D case, how is openFOAM process the volumetric flow rate aspect of the fan curve? As it has no depth.





p initial conditions:


Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  8
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    back
    {
        type            empty;
    }

    bottom
    {
        type            zeroGradient;
    }

    front
    {
        type            empty;
    }

    inlet
    {
        type            fanPressure;
        file            "./constant/fanCurve";
        outOfBounds     clamp;
        direction       in;         //in | out
        p0              uniform 0;
        value           uniform 0;
    }

    left
    {
        type            zeroGradient;
    }

    outlet
    {
        type            fixedValue;
        value           uniform 0;
    }

    right
    {
        type            zeroGradient;
    }

    submod_0
    {
        type            zeroGradient;
    }


    submod_1
    {
        type            zeroGradient;
    }

    submod_2
    {
        type            zeroGradient;
    }

    submod_3
    {
        type            zeroGradient;
    }

    submod_4
    {
        type            zeroGradient;
    }

    submod_5
    {
        type            zeroGradient;
    }

    submod_6
    {
        type            zeroGradient;
    }

    top
    {
        type            zeroGradient;
    }

}

// ************************************************************************* //

U initial conditions


Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  8
     \\/     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
{
    back
    {
        type            empty;
    }

    bottom
    {
        type            noSlip;
    }

    front
    {
        type            empty;
    }

    inlet
    {
        type            pressureInletOutletVelocity;
        value           uniform (0 0 0);    
    }

    left
    {
        type            noSlip;
    }

    outlet
    {
        type            zeroGradient;
    }

    right
    {
        type            noSlip;
    }

    submod_0
    {
        type            noSlip;
    }

    submod_1
    {
        type            noSlip;
    }

    submod_2
    {
        type            noSlip;
    }

    submod_3
    {
        type            noSlip;
    }

    submod_4
    {
        type            noSlip;
    }

    submod_5
    {
        type            noSlip;
    }

    submod_6
    {
        type            noSlip;
    }

    top
    {
        type            noSlip;
    }

}

// ************************************************************************* //
Picture attached for clarity. The inlet is at the bottom left and the outlet it the top right.



Looking to replicate the following fan:



https://docs.rs-online.com/b185/A700000006481223.pdf
Attached Images
File Type: png Screenshot from 2020-11-17 10-11-04.png (8.2 KB, 13 views)
sholland is offline   Reply With Quote

Reply

Tags
2d fan, fan boundary conditions


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
Centrifugal fan j0hnny CFX 13 October 1, 2019 14:55
Swirl-Velocity Specification of 2-D Fan Boundary Condition erdenh FLUENT 10 October 3, 2018 11:52
Basic Nozzle-Expander Design karmavatar CFX 20 March 20, 2016 09:44
Problem in setting Boundary Condition Madhatter92 CFX 12 January 12, 2016 05:39
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 08:00


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