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

icoFoam same pressure throughout

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   May 23, 2017, 22:41
Default icoFoam same pressure throughout
  #1
New Member
 
Sugajen
Join Date: Jan 2012
Location: Tempe, USA
Posts: 29
Rep Power: 7
Sugajen is on a distinguished road
Hi all,

I am new to OpenFOAM. I started modeling a rectangular domain with inlet velocity and outlet pressure. Tried to solve it with icoFoam but unfortunately from the very first time step, the pressure in the internalField is equal to the outlet pressure. No matter how small the outlet pressure is, internalField takes that value. Any help/suggestions will be very much appreciated.

Pressure BC
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform 0;

boundaryField
{

    inlet
    {
        type            zeroGradient;
    }

    outlet
    {
        type            fixedValue;
        value           uniform 6010;
    }

    fixedWalls
    {
        type            zeroGradient;
    }

    lowerMembrane
    {
        type            zeroGradient;
    }

    upperMembrane
    {
        type            zeroGradient;
    }

}

Velocity BC
Code:
dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{

    inlet
    {
        type            fixedValue;
        value           uniform (0.1 0 0);
    }

    outlet
    {
        type            zeroGradient;
    }

    fixedWalls
    {
        type            noSlip;
    }
    lowerMembrane
    {
        type            noSlip;
    }
    upperMembrane
    {
        type            noSlip;
    }

}
blockMeshDict
Code:
convertToMeters 0.001;

vertices
(
    (0 0 0)   
    (4.5 0 0)
    (4.5 4.5 0)
    (0 4.5 0)
    (0 0 1)
    (4.5 0 1)
    (4.5 4.5 1)
    (0 4.5 1)
);

blocks
(
    hex (0 1 2 3 4 5 6 7) (9 9 2) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
    inlet
    {
        type patch;
        faces
        (
         (0 4 7 3)   
        );
    }

    outlet
    {
        type patch;
        faces
        (
         (1 2 6 5)   
        );
    }

    fixedWalls
    {
        type wall;
        faces
        (   (3 7 6 2)
            (1 5 4 0)
            
        );
    }
	
    upperMembrane
    {
	type wall;
	faces
	(
	 (4 5 6 7)
	);
    }

    lowerMembrane
    {
	type wall;
	faces
	(
         (0 3 2 1)
	);
    }

);

mergePatchPairs
(
);
Sugajen is offline   Reply With Quote

Old   May 24, 2017, 05:48
Default
  #2
New Member
 
Join Date: May 2017
Posts: 1
Rep Power: 0
bao42 is on a distinguished road
How did you find "the pressure in the internalField is equal to the outlet pressure"? By viewing the results in some post-processor like paraview? If that's the case, you could probably try cell data instead of point data.
bao42 is offline   Reply With Quote

Old   May 24, 2017, 09:53
Default
  #3
Member
 
Joshua
Join Date: Dec 2016
Location: St. Louis, Missouri
Posts: 77
Rep Power: 2
Joshua14 is on a distinguished road
You have initial fields set to 0 for pressure, with a high outlet pressure of 6010. Your pressure outlet is therefore going to dominate the domain. I would suggest initializing your pressure field as 6010 (same as your outlet). That way velocity can then effect the initialized system.

Joshua
Joshua14 is offline   Reply With Quote

Old   May 24, 2017, 21:03
Default Still searching for a solution
  #4
New Member
 
Sugajen
Join Date: Jan 2012
Location: Tempe, USA
Posts: 29
Rep Power: 7
Sugajen is on a distinguished road
@Bao & @Joshua,
I tried both your suggestions but didn't work. Do you think I should consider changing my boundary conditions - zeroGradient to something else? When I changed them to 0, it did not work.
Sugajen is offline   Reply With Quote

Old   May 25, 2017, 09:12
Default
  #5
Member
 
Joshua
Join Date: Dec 2016
Location: St. Louis, Missouri
Posts: 77
Rep Power: 2
Joshua14 is on a distinguished road
Have you tried running another transient solver like pisoFoam or pimpleFoam? In my opinion they are much better solvers then icoFoam.

Joshua
Joshua14 is offline   Reply With Quote

Old   May 25, 2017, 14:23
Default pimpleFoam crashes
  #6
New Member
 
Sugajen
Join Date: Jan 2012
Location: Tempe, USA
Posts: 29
Rep Power: 7
Sugajen is on a distinguished road
@Joshua
Actually, I was using pimpleFoam at first. But it throws an error at the eight time step which I am posting below. That's why I switched to icoFoam.

Code:
 Courant Number mean: 1.95828e+100 max: 1.87544e+101
Time = 0.088

PIMPLE: iteration 1
GAMG:  Solving for p, Initial residual = 0.832383, Final residual = 0.0176052, No Iterations 1
time step continuity errors : sum local = 1.25645e+99, global = -9.31495e+98, cumulative = -1.0294e+99
smoothSolver:  Solving for sigmaxx, Initial residual = 0.747741, Final residual = 0.0639805, No Iterations 2
smoothSolver:  Solving for sigmaxy, Initial residual = 0.693769, Final residual = 0.055105, No Iterations 2
smoothSolver:  Solving for sigmaxz, Initial residual = 0.682691, Final residual = 0.054775, No Iterations 2
smoothSolver:  Solving for sigmayy, Initial residual = 0.56351, Final residual = 0.0472953, No Iterations 2
smoothSolver:  Solving for sigmayz, Initial residual = 0.543234, Final residual = 0.0470379, No Iterations 2
smoothSolver:  Solving for sigmazz, Initial residual = 0.528148, Final residual = 0.0493034, No Iterations 2
PIMPLE: iteration 2
GAMG:  Solving for p, Initial residual = 0.710975, Final residual = 0.0105144, No Iterations 1
time step continuity errors : sum local = 2.26049e+99, global = -5.74118e+98, cumulative = -1.60351e+99
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3  void Foam::dot<Foam::SymmTensor<double>, Foam::Tensor<double> >(Foam::Field<Foam::innerProduct<Foam::SymmTensor<double>, Foam::Tensor<double> >::type>&, Foam::UList<Foam::SymmTensor<double> > const&, Foam::UList<Foam::Tensor<double> > const&) at ??:?
#4  Foam::tmp<Foam::GeometricField<Foam::innerProduct<Foam::SymmTensor<double>, Foam::Tensor<double> >::type, Foam::fvPatchField, Foam::volMesh> > Foam::operator&<Foam::SymmTensor<double>, Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
#5  Foam::laminarModels::Maxwell<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::correct() at ??:?
#6  ? in "/home/sugajen/OpenFOAM/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/bin/pimpleFoam"
#7  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#8  ? in "/home/sugajen/OpenFOAM/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/bin/pimpleFoam"
Floating point exception (core dumped)
The Courant number shoots up. What do you think is the problem ?

Thanks!
Sugajen is offline   Reply With Quote

Old   May 25, 2017, 14:26
Default
  #7
Member
 
Joshua
Join Date: Dec 2016
Location: St. Louis, Missouri
Posts: 77
Rep Power: 2
Joshua14 is on a distinguished road
Your time step is too large.
1) Reduce your time step by a magnitude of 10
2) You can turn on adjustable timestep for pimple and set a max Co of 1.

Joshua
Joshua14 is offline   Reply With Quote

Old   May 25, 2017, 14:52
Default Still crashing
  #8
New Member
 
Sugajen
Join Date: Jan 2012
Location: Tempe, USA
Posts: 29
Rep Power: 7
Sugajen is on a distinguished road
Thank you Joshua!

Did as you suggested. Reduced the timeStep size as well as set a maxCo. But it is still crashing. Though we set a maxCo of 0.5, the iterations go well beyond that. Am I missing something?

Please find my controlDict file and output of the last successful iteration below.

controlDict:
Code:
 FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     pimpleFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         0.1;

deltaT          0.0001;

writeControl    timeStep;

writeInterval   100;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

adjustTimeStep true;

maxDeltaT	0.0001;

maxCo		0.5;
Output:
Code:
 Courant Number mean: 0.663709 max: 6.71235
deltaT = 2.38759e-104
Time = 0.0714291

PIMPLE: iteration 1
GAMG:  Solving for p, Initial residual = 0.729669, Final residual = 0.00895447, No Iterations 1
time step continuity errors : sum local = 0.000363231, global = 2.0545e-05, cumulative = 23.0525
smoothSolver:  Solving for sigmaxx, Initial residual = 0.156834, Final residual = 0.000662181, No Iterations 1
smoothSolver:  Solving for sigmaxy, Initial residual = 0.13604, Final residual = 0.000885931, No Iterations 1
smoothSolver:  Solving for sigmaxz, Initial residual = 0.140816, Final residual = 0.000860439, No Iterations 1
smoothSolver:  Solving for sigmayy, Initial residual = 0.126032, Final residual = 0.00120917, No Iterations 1
smoothSolver:  Solving for sigmayz, Initial residual = 0.126016, Final residual = 0.0011654, No Iterations 1
smoothSolver:  Solving for sigmazz, Initial residual = 0.128925, Final residual = 0.00115707, No Iterations 1
PIMPLE: iteration 2
GAMG:  Solving for p, Initial residual = 0.143409, Final residual = 0.00322247, No Iterations 1
time step continuity errors : sum local = 0.000251366, global = 4.45186e-05, cumulative = 23.0525
smoothSolver:  Solving for sigmaxx, Initial residual = 0.134324, Final residual = 0.000689652, No Iterations 1
smoothSolver:  Solving for sigmaxy, Initial residual = 0.119069, Final residual = 0.00070716, No Iterations 1
smoothSolver:  Solving for sigmaxz, Initial residual = 0.121229, Final residual = 0.000755986, No Iterations 1
smoothSolver:  Solving for sigmayy, Initial residual = 0.094852, Final residual = 0.000903834, No Iterations 1
smoothSolver:  Solving for sigmayz, Initial residual = 0.0985399, Final residual = 0.000890833, No Iterations 1
smoothSolver:  Solving for sigmazz, Initial residual = 0.103933, Final residual = 0.000922095, No Iterations 1
PIMPLE: iteration 3
GAMG:  Solving for p, Initial residual = 0.13444, Final residual = 0.00277385, No Iterations 1
time step continuity errors : sum local = 0.000274193, global = 4.10307e-05, cumulative = 23.0526
smoothSolver:  Solving for sigmaxx, Initial residual = 0.1354, Final residual = 0.00123334, No Iterations 1
smoothSolver:  Solving for sigmaxy, Initial residual = 0.130423, Final residual = 0.00140532, No Iterations 1
smoothSolver:  Solving for sigmaxz, Initial residual = 0.133621, Final residual = 0.00144555, No Iterations 1
smoothSolver:  Solving for sigmayy, Initial residual = 0.107672, Final residual = 0.00154916, No Iterations 1
smoothSolver:  Solving for sigmayz, Initial residual = 0.112155, Final residual = 0.00160124, No Iterations 1
smoothSolver:  Solving for sigmazz, Initial residual = 0.116955, Final residual = 0.0016714, No Iterations 1
PIMPLE: iteration 4
GAMG:  Solving for p, Initial residual = 0.154451, Final residual = 0.00313977, No Iterations 1
time step continuity errors : sum local = 0.000397578, global = 3.54349e-05, cumulative = 23.0526
smoothSolver:  Solving for sigmaxx, Initial residual = 0.157579, Final residual = 0.00266918, No Iterations 1
smoothSolver:  Solving for sigmaxy, Initial residual = 0.152596, Final residual = 0.00308912, No Iterations 1
smoothSolver:  Solving for sigmaxz, Initial residual = 0.156793, Final residual = 0.00311075, No Iterations 1
smoothSolver:  Solving for sigmayy, Initial residual = 0.146138, Final residual = 0.00377687, No Iterations 1
smoothSolver:  Solving for sigmayz, Initial residual = 0.15078, Final residual = 0.00380433, No Iterations 1
smoothSolver:  Solving for sigmazz, Initial residual = 0.154905, Final residual = 0.0038161, No Iterations 1
PIMPLE: iteration 5
GAMG:  Solving for p, Initial residual = 0.196638, Final residual = 0.00411544, No Iterations 1
time step continuity errors : sum local = 0.000704938, global = 3.31079e-05, cumulative = 23.0526
smoothSolver:  Solving for sigmaxx, Initial residual = 0.205283, Final residual = 0.00651574, No Iterations 1
smoothSolver:  Solving for sigmaxy, Initial residual = 0.197487, Final residual = 0.00771348, No Iterations 1
smoothSolver:  Solving for sigmaxz, Initial residual = 0.202468, Final residual = 0.00770267, No Iterations 1
smoothSolver:  Solving for sigmayy, Initial residual = 0.196547, Final residual = 0.00977995, No Iterations 1
smoothSolver:  Solving for sigmayz, Initial residual = 0.198549, Final residual = 0.00964261, No Iterations 1
smoothSolver:  Solving for sigmazz, Initial residual = 0.205165, Final residual = 0.00963499, No Iterations 1
PIMPLE: iteration 6
GAMG:  Solving for p, Initial residual = 0.267345, Final residual = 0.00569992, No Iterations 1
time step continuity errors : sum local = 0.00145128, global = 3.15007e-05, cumulative = 23.0527
smoothSolver:  Solving for sigmaxx, Initial residual = 0.277455, Final residual = 0.0152066, No Iterations 1
smoothSolver:  Solving for sigmaxy, Initial residual = 0.265611, Final residual = 0.0184275, No Iterations 1
smoothSolver:  Solving for sigmaxz, Initial residual = 0.270851, Final residual = 0.0180328, No Iterations 1
smoothSolver:  Solving for sigmayy, Initial residual = 0.271589, Final residual = 0.0241334, No Iterations 1
smoothSolver:  Solving for sigmayz, Initial residual = 0.269955, Final residual = 0.0229864, No Iterations 1
smoothSolver:  Solving for sigmazz, Initial residual = 0.276123, Final residual = 0.0222251, No Iterations 1
PIMPLE: iteration 7
GAMG:  Solving for p, Initial residual = 0.354711, Final residual = 0.00776282, No Iterations 1
time step continuity errors : sum local = 0.00330826, global = 1.97892e-05, cumulative = 23.0527
smoothSolver:  Solving for sigmaxx, Initial residual = 0.356287, Final residual = 0.0325556, No Iterations 1
smoothSolver:  Solving for sigmaxy, Initial residual = 0.341959, Final residual = 0.00701936, No Iterations 2
smoothSolver:  Solving for sigmaxz, Initial residual = 0.346168, Final residual = 0.00671219, No Iterations 2
smoothSolver:  Solving for sigmayy, Initial residual = 0.356212, Final residual = 0.00887653, No Iterations 2
smoothSolver:  Solving for sigmayz, Initial residual = 0.352708, Final residual = 0.00833179, No Iterations 2
smoothSolver:  Solving for sigmazz, Initial residual = 0.356016, Final residual = 0.00778691, No Iterations 2
PIMPLE: iteration 8
GAMG:  Solving for p, Initial residual = 0.435929, Final residual = 0.00935036, No Iterations 1
time step continuity errors : sum local = 0.00741005, global = 0.000179898, cumulative = 23.0529
smoothSolver:  Solving for sigmaxx, Initial residual = 0.42109, Final residual = 0.0130746, No Iterations 2
smoothSolver:  Solving for sigmaxy, Initial residual = 0.432944, Final residual = 0.0158246, No Iterations 2
smoothSolver:  Solving for sigmaxz, Initial residual = 0.436075, Final residual = 0.0151397, No Iterations 2
smoothSolver:  Solving for sigmayy, Initial residual = 0.445616, Final residual = 0.0183585, No Iterations 2
smoothSolver:  Solving for sigmayz, Initial residual = 0.439054, Final residual = 0.0176198, No Iterations 2
smoothSolver:  Solving for sigmazz, Initial residual = 0.433173, Final residual = 0.016696, No Iterations 2
PIMPLE: iteration 9
GAMG:  Solving for p, Initial residual = 0.50547, Final residual = 0.010613, No Iterations 1
time step continuity errors : sum local = 0.0168803, global = 0.00190167, cumulative = 23.0548
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::twoSymm(Foam::Field<Foam::SymmTensor<double> >&, Foam::UList<Foam::Tensor<double> > const&) at ??:?
#4  Foam::tmp<Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh> > Foam::twoSymm<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
#5  Foam::laminarModels::Maxwell<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::correct() at ??:?
#6  ? in "/home/sugajen/OpenFOAM/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/bin/pimpleFoam"
#7  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#8  ? in "/home/sugajen/OpenFOAM/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/bin/pimpleFoam"
Floating point exception (core dumped)
Sugajen is offline   Reply With Quote

Old   May 25, 2017, 14:56
Default
  #9
Member
 
Joshua
Join Date: Dec 2016
Location: St. Louis, Missouri
Posts: 77
Rep Power: 2
Joshua14 is on a distinguished road
What scheme are you using for time? Euler?

Joshua
Joshua14 is offline   Reply With Quote

Old   May 25, 2017, 15:00
Default backward
  #10
New Member
 
Sugajen
Join Date: Jan 2012
Location: Tempe, USA
Posts: 29
Rep Power: 7
Sugajen is on a distinguished road
I have been using backward!
Sugajen is offline   Reply With Quote

Old   May 25, 2017, 15:13
Default
  #11
Member
 
Joshua
Join Date: Dec 2016
Location: St. Louis, Missouri
Posts: 77
Rep Power: 2
Joshua14 is on a distinguished road
Try using Euler as see how that does.

Joshua
Joshua14 is offline   Reply With Quote

Old   May 25, 2017, 15:15
Default All time schemes fail
  #12
New Member
 
Sugajen
Join Date: Jan 2012
Location: Tempe, USA
Posts: 29
Rep Power: 7
Sugajen is on a distinguished road
Sure Joshua! Just tried CrankNicolson 0.9, Euler, localEuler, none and steadyState.
All of them fail at time = 0.07.
There is something happening at t = 0.07.
Sugajen is offline   Reply With Quote

Old   May 25, 2017, 15:30
Default
  #13
Member
 
Joshua
Join Date: Dec 2016
Location: St. Louis, Missouri
Posts: 77
Rep Power: 2
Joshua14 is on a distinguished road
At this point I would be guessing its your mesh. Maybe something isn't refined enough or you have a funky cell.

Joshua
Joshua14 is offline   Reply With Quote

Old   May 25, 2017, 17:46
Default It must be the mesh
  #14
New Member
 
Sugajen
Join Date: Jan 2012
Location: Tempe, USA
Posts: 29
Rep Power: 7
Sugajen is on a distinguished road
That was a good guess! As I doubled and quadrupled the cells per side of the mesh, the solution crashed at half and quarter of the previous total times correspondingly.

I checked the mesh and vertices multiple times but nothing I can see wrong. Any thoughts?

Thank you!
Sugajen is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pressure Outlet Guage pressure Mohsin FLUENT 36 April 29, 2016 17:16
Pressure Inlet Boundary Conditions Mr.Goodcat FLUENT 2 March 16, 2016 14:24
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27
[ANSYS Meshing] Help with element size sandri_92 ANSYS Meshing & Geometry 13 May 26, 2014 09:05
pressure distribution in water flow, differences in icoFoam and COMSOL deniggo OpenFOAM Running, Solving & CFD 14 September 30, 2010 03:48


All times are GMT -4. The time now is 03:15.