CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   compressible low speed channel flow (http://www.cfd-online.com/Forums/openfoam-solving/117442-compressible-low-speed-channel-flow.html)

-Ali May 8, 2013 12:27

compressible low speed channel flow
 
Hi all

I am trying to simulate the low Reynolds (say Re=5) mass driven compressible flow in a rectangular microchannel. I used rhoCentralFoam with the following BC:
Pressure:
inlet
{
type zeroGradient;
}

outlet
{
type fixedValue;
value uniform 101315;
}

Velocity:
inlet
{
type fixedValue;
value uniform (0.79473 0 0);
}

outlet
{
type zeroGradient;
}
However, the results are not physical for example a reverse flow appears at the inlet!
I am wondering if I should use another solver or other BC?
Is there anyone who can help me?
Thanks.

-Ali May 9, 2013 00:25

Hi
I am really confused with the simple problem of straight rectangular channel.
I need to solve the flow but really cant find out what the problem is with the setting of the openFoam. I would be greatly thankful if any body has a promising feedback. :(

nimasam May 9, 2013 01:26

Dear Ali

@ inlet, fixed your pressure and @ outlet, assign a zeroGradient :)

fredo490 May 9, 2013 03:54

The problem in your case is that the pressure gradient in your domain is too small. You should work with a solver using a "relative pressure".

Your case reminds me this topic: http://www.cfd-online.com/Forums/ope...on-fluent.html

You can also try another solver. rhoSimplecFoam / rhoPimpleFoam

Edit: put your full case here. Maybe your problem is not located in the boundary conidtion.

-Ali May 9, 2013 04:35

Dear Nima
Thanks a lot for your kind reply.
I changed the BC as you said but the solution is wrong again.
I also set the inlet pressure somewhat higher that the interior to avoid any back flow but surprisingly this leads to a stronger reverse flow.
can you please help me on this?

fredo490 May 9, 2013 04:54

By the way, why do you need a compressible flow ?

And try to post your full case. Maybe you made a mistake somewhere else.

-Ali May 9, 2013 05:03

Dear Frédéric
Thanks for your comment. It really make scene and I think OF has some problem in solving the pressure field. Actually, I am new with OF and so I supposed rhoSimplecFoam / rhoPimpleFoam are for turbulent flow and cannot be used for low speed laminar cases.
My case is a compressible flow throw a microchannel at Re~1. Here are the details of my mesh and BC and solver settings.
It is a great help to me if you can show me the way.
Many many Thanks.

blockMeshDict:
[QUOTE][]
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.0.1 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 5e-5;

vertices
(
(0 0 0)
(10 0 0)
(10 1 0)
(0 1 0)

(0 0 1)
(10 0 1)
(10 1 1)
(0 1 1)

);

blocks
(
hex (0 1 2 3 4 5 6 7) (151 51 1) simpleGrading (1 1 1) // (141 51 51) simpleGrading (3292 0.047 0.047)
);

edges
(
);

boundary
(
inlet
{
type patch;
faces
(
(0 3 7 4)
);
}
outlet
{
type patch;
faces
(
(1 5 6 2)
);
}

bottom
{
type symmetryPlane;
faces
(
(0 4 5 1)
);
}
top
{
type patch;
faces
(
(3 7 6 2)
);
}
front_back
{
type empty;
faces
(
(0 1 2 3)
(4 7 6 5)
);
}

);

mergePatchPairs
(
);

// ************************************************** *********************** //]



thermoPhysicalProperties:

[QUOTE][
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.0.1 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

thermoType ePsiThermo<pureMixture<constTransport<specieThermo <hConstThermo<perfectGas>>>>>;

mixture
{
specie
{
nMoles 1;
molWeight 28.96;
}
thermodynamics
{
Cp 1007;
Hf 0;
}
transport
{
mu 1.846e-05;
Pr 0.711;
}
}


// ************************************************** *********************** //]


turbulenceProperties:

[QUOTE][
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.0.1 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

simulationType laminar;


// ************************************************** *********************** //]

Pressure BC:
[QUOTE][/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.0.1 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform 101315;

boundaryField
{
inlet
{
type fixedValue;
value uniform 111315;
}

outlet
{
type zeroGradient;
}

bottom
{
type symmetryPlane;
}

top
{
type zeroGradient;
}
front_back
{
type empty;
}
}

// ************************************************** *********************** //]

Temperature BC:

[QUOTE][//*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.0.1 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 1 0 0 0];

internalField uniform 300;

boundaryField
{
inlet
{
type fixedValue;
value uniform 300;
}

outlet
{
type zeroGradient;
}

bottom
{
type symmetryPlane;
}

top
{
type fixedValue;
value uniform 350;
}
front_back
{
type empty;
}
}

// ************************************************** *********************** //]


Velocity BC:
[QUOTE][/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.0.1 |
| \\ / A nd | Web: 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.79473 0 0);

boundaryField
{
inlet
{
type fixedValue;
value uniform (0.79473 0 0);
}

outlet
{
type zeroGradient;
}

bottom
{
type symmetryPlane;
}

top
{
type fixedValue;
value uniform (0 0 0);
}
front_back
{
type empty;
}
}

// ************************************************** *********************** //]


controlDict:

[QUOTE][/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application rhoCentralFoam;

startFrom latestTime;

startTime 0;

stopAt endTime;

endTime 1e-02;

deltaT 1e-6;

writeControl adjustableRunTime;

writeInterval 1e-5;

cycleWrite 0;

writeFormat ascii;

writePrecision 10;

writeCompression off;

timeFormat general;

timePrecision 6;

adjustTimeStep yes;

maxCo 0.2;

maxDeltaT 1;


// ************************************************** *********************** //]


fvSchemes:

[QUOTE][/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

fluxScheme Kurganov;
//fluxScheme Tadmor;

ddtSchemes
{
default Euler;
}

gradSchemes
{
default Gauss linear;
}

divSchemes
{
default none;
div(tauMC) Gauss linear;
}

laplacianSchemes
{
default Gauss linear corrected;
}

interpolationSchemes
{
default linear;
reconstruct(rho) vanLeer;
reconstruct(U) vanLeerV;
reconstruct(T) vanLeer;
//reconstruct(rho) upwind;
//reconstruct(U) upwind;
//reconstruct(T) upwind;
}

snGradSchemes
{
default corrected;
}


// ************************************************** *********************** //]

fv solution:

[QUOTE][/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
"(rho|rhoU|rhoE)"
{
solver diagonal;
}

U //"(U|e)"
{
solver smoothSolver;
smoother GaussSeidel;
nSweeps 2;
tolerance 1e-09;
relTol 0.01;
}

e
{
solver smoothSolver;
smoother GaussSeidel;
nSweeps 2;
tolerance 1e-10 relTol 0;
}

h
{
$U;
tolerance 1e-10;
relTol 0;
}
}


// ************************************************** *********************** //]

fredo490 May 9, 2013 05:11

Instead of copying all the file here, you can actually upload them. There is a function "Attach Files" just below the submit button.

rhoSimplecFoam can be either turbulent or laminar. You can use k-epsilon, k-omega, Sparlat Allmaras, or laminar. And if you use rhoPimpleFoam, you can use all those model and even LES.

The official description is:
Quote:

rhoSimplecFoam Steady-state SIMPLEC solver for laminar or turbulent RANS flow of compressible fluids
So yes, this solver can do the job...

fredo490 May 9, 2013 05:15

I'm not familiar with rhoCentralFoam but I don't think it is suitable for you. rhoCentralFoam is a density based solver (which was primarily designed for supersonic flow) while rhoSimplecFoam is a pressure based solver (which was primarily designed for subsonic flow).

-Ali May 9, 2013 05:17

Quote:

Originally Posted by fredo490 (Post 426296)
By the way, why do you need a compressible flow ?

And try to post your full case. Maybe you made a mistake somewhere else.

Dear Frédéric
I have solved the flow with an incompressible CFD code but whereas the pressure drop in microchannels are considerable and also there is a considerable temperature gradient in my problem, I am curious to see what happen if I use a compressible solver. Actually I have to compare my results with those of compressible case.

-Ali May 9, 2013 05:29

Thanks for you comments dear Frédéric
(I am a row new member in this site :) )OK; I will try the rhoSimplecFoam hope it work.
Then I will tell you about the results.
Again thanks for your kind informative comments.

fredo490 May 9, 2013 07:40

Quote:

Originally Posted by -Ali (Post 426303)
Dear Frédéric
I have solved the flow with an incompressible CFD code but whereas the pressure drop in microchannels are considerable and also there is a considerable temperature gradient in my problem, I am curious to see what happen if I use a compressible solver. Actually I have to compare my results with those of compressible case.

Well, you didn't mention that before... I'm not familiar with micro channels. Where does the heat come from ?

Also, are you sure your flow is really 100% laminar ? How is the flow at the inlet of your simulation ? Does it come from a "tube", how long ? If yes, you might need to consider the turbulence of the upstream flow.

The problem in micro channel, if I remember well, is that the boundary layers tend to meet at the middle of the channel. Maybe a fine mesh with a k-omega SST model can handle this problem. You might need to compare two simulations (laminar vs k-omega sst).


All times are GMT -4. The time now is 00:58.