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

Pressure driven compressible flow between two gas reservoirs

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 23, 2020, 09:36
Default Pressure driven compressible flow between two gas reservoirs
  #1
dld
New Member
 
Michael
Join Date: Apr 2020
Posts: 1
Rep Power: 0
dld is on a distinguished road
Hello,


i want to simulate the flow of helium between two gas reservoirs through a microscopic channel (d = 60 um).


On one side I pump in with a pressure of 100 bar, the other side is evacuated using a vacuum pump. Both sides are connected by a small channel (d = 60um, l = 2mm). I attached a sketch of the setup. For now I set the pressure in the low pressure region to 1 bar. In the end I'm interested in the pressure distribution and the mass flow rate.



I managed to achieve some results by using setFields. I set the pressures in the high pressure region to 100 bar and to 1 bar every else. Afterwards I could see how it evolved over time. (I copied the decompressionTank tutorial and used rhoPimpleFoam)


To save time, I just wanted to simulate the pressure driven flow in a circular pipe using rhoPimpleFoam.



I set the folliwng boundary conditions for p and U. I tried to estimate the flow velocity and set it as internalField.

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       volScalarField;
    location    "0";
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [1 -1 -2 0 0 0 0]; // Pascal

internalField   uniform 1e5;

boundaryField
{
    axis
    {
        type            empty;
    }
    inlet
    {
        type            totalPressure;
        p0              uniform 1e7;
        value           $internalField;
        
    }
    wall
    {
        type            zeroGradient;
    }
    outlet
    {
        type            fixedValue;
        value           uniform 1e5;
    }
    front
    {
        type            wedge;
    }
    back
    {
        type            wedge;
    }
}


// ************************************************************************* //
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       volVectorField;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (800 0 0);

boundaryField
{
    axis
    {
        type            empty;
    }
    inlet
    {
        type            zeroGradient;
    }
    wall
    {
        type            noSlip;
    }
    outlet
    {
        type            zeroGradient;
    }
    front
    {
        type            wedge;
    }
    back
    {
        type            wedge;
    }
}


// ************************************************************************* //
For helium I set the following thermophysicalProperties
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       dictionary;
    location    "constant";
    object      thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

thermoType
{
    type            heRhoThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleInternalEnergy;
}

mixture
{
    specie
    {
        nMoles          1;
        molWeight       4;
    }
    thermodynamics
    {
        Cp              5193.2;
        Hf              0;
    }
    transport
    {
        mu              1.96e-5;
        Pr              0.424;
    }
}

// ************************************************************************* //
I tried around a lot, but when I try to run the simulation I always get an error like this:
Code:
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/usr/lib/libc.so.6"
#3  Foam::symGaussSeidelSmoother::smooth(Foam::word const&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::Field<double> const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, unsigned char, int) at ??:?
#4  Foam::symGaussSeidelSmoother::smooth(Foam::Field<double>&, Foam::Field<double> const&, unsigned char, int) const at ??:?
#5  Foam::smoothSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#6  ? in "/opt/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/rhoPimpleFoam"
#7  ? in "/opt/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/rhoPimpleFoam"
#8  ? in "/opt/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/rhoPimpleFoam"
#9  ? in "/opt/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/rhoPimpleFoam"
#10  __libc_start_main in "/usr/lib/libc.so.6"
#11  ? in "/opt/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/rhoPimpleFoam"
Floating point exception (core dumped)
I'm quite new to CFD simulation, could you give me some pointers in the right direction? I also attached the whole case directory.
Attached Images
File Type: jpg setup.jpg (30.2 KB, 7 views)
Attached Files
File Type: zip pipe-comp.zip (6.6 KB, 2 views)
dld is offline   Reply With Quote

Old   October 27, 2022, 14:45
Default
  #2
Senior Member
 
Sakun
Join Date: Nov 2019
Location: United Kingdom
Posts: 107
Rep Power: 6
Sakun is on a distinguished road
Hi,


i do have the exactly the same boundary conditions and error for my compressor blade simulation and did you able to find the solution ?
Sakun is offline   Reply With Quote

Reply

Tags
compressible flow, helium, pressure driven flow, rhopimplefoam


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
problem about pressure driven flow yhaomin2007 OpenFOAM Running, Solving & CFD 8 June 4, 2021 07:51
Pressure driven flow in 2D LES channelFoam sheaker OpenFOAM Running, Solving & CFD 0 June 26, 2017 14:44
Inlet and Outlet Pressure condition for Compressible Flow in FLUENT rsdsaurav FLUENT 1 May 17, 2015 14:19
what the result is negatif pressure at inlet chong chee nan FLUENT 0 December 29, 2001 05:13
Hydrostatic pressure in 2-phase flow modeling (long) DS & HB Main CFD Forum 0 January 8, 2000 15:00


All times are GMT -4. The time now is 21:50.