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

continuity error

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 4, 2012, 05:53
Default continuity error
  #1
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 9
samiam1000 is on a distinguished road
Dear All,

I am running chtMultiRegionSimpleFoam and I get a continuity error.

At the 3rd time step, in fact, I get this message:

Code:
Time = 3


Solving for fluid region internal_air
DILUPBiCG:  Solving for Ux, Initial residual = 0.04808972, Final residual = 0.0007848449, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.05127225, Final residual = 0.0006552669, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.0729375, Final residual = 0.001066777, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.02877754, Final residual = 0.001333761, No Iterations 1
Min/max T:273 280.0333
GAMG:  Solving for p_rgh, Initial residual = 0.7510464, Final residual = 0.00749785, No Iterations 12
time step continuity errors : sum local = 0.1550988, global = 1.846758e-16, cumulative = -2.644312e-07
Min/max rho:1.241297 1.277639

Solving for fluid region external_air
DILUPBiCG:  Solving for Ux, Initial residual = 0.08944471, Final residual = 0.0008127495, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.05704025, Final residual = 0.0005949483, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.09658343, Final residual = 0.0007494813, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.4380229, Final residual = 0.005028673, No Iterations 1
Min/max T:297.621 298.3227


--> FOAM FATAL ERROR: 
Continuity error cannot be removed by adjusting the outflow.
Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow.
Total flux              : 1564.848
Specified mass inflow   : 0.01700355
Specified mass outflow  : 0.0167709
Adjustable mass outflow : 0


    From function adjustPhi(surfaceScalarField& phi, const volVectorField& U,const volScalarField& p
    in file cfdTools/general/adjustPhi/adjustPhi.C at line 118.

FOAM exiting
It suggests to check the BC on the U field. I think that mine are properly set:
Code:
/*--------------------------------*- 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      binary;
    class       volVectorField;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform (0 0 0);

boundaryField
{
    wall-external_air-roof
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    wall-door-external_air
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    symmetry_1-external_air
    {
        type            symmetryPlane;
    }
    symmetry_2-external_air
    {
        type            symmetryPlane;
    }
    wall_back-external_air
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    wall_front
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    ceiling
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    floor-external_air
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    /*infinite_air_inlet
    {
	type        fixedValue;
	value       uniform (0 0.05 0);
    }
    infinite_air_outlet
    {
	type        fixedValue;
	value       uniform (0 0.05 0);
    }*/
    infinite_air_inlet
    {
	type        flowRateInletVelocity;
	flowRate    constant 0.017;
	value       uniform (0 0 0);
    }
    infinite_air_outlet
    {
	type        zeroGradient;
    }
}
// ************************************************************************* //
The p file is the following:
Code:
/*--------------------------------*- 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      binary;
    class       volScalarField;
    location    "0";
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform 100000;

boundaryField
{
    wall-external_air-roof
    {
        type            calculated;
        value           uniform 100000;
    }
    wall-door-external_air
    {
        type            calculated;
        value           uniform 100000;
    }
    symmetry_1-external_air
    {
        type            symmetryPlane;
    }
    symmetry_2-external_air
    {
        type            symmetryPlane;
    }
    wall_back-external_air
    {
        type            calculated;
        value           uniform 100000;
    }
    wall_front
    {
        type            calculated;
        value           uniform 100000;
    }
    ceiling
    {
        type            calculated;
        value           uniform 100000;
    }
    floor-external_air
    {
        type            calculated;
        value           uniform 100000;
    }
    /*infinite_air_inlet
    {
        type            calculated;
        value           uniform 100000;
    }*/
    infinite_air_inlet
    {
        type            zeroGradient;
    }
    infinite_air_outlet
    {
        type            fixedValue;
        value           uniform 100000;
    }
}

// ************************************************************************* //
Thanks for any help,

Samuele
samiam1000 is offline   Reply With Quote

Old   May 5, 2012, 14:47
Default
  #2
Senior Member
 
niaz's Avatar
 
A_R
Join Date: Jun 2009
Posts: 118
Rep Power: 8
niaz is on a distinguished road
Dear Samiam
are there any outlet in your test case?
in U field you determine all parameters?
is it that?
niaz is offline   Reply With Quote

Old   May 7, 2012, 02:49
Default
  #3
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 9
samiam1000 is on a distinguished road
Dear Niaz,

yeah, I have an outlet
Code:
    infinite_air_outlet
    {
        type            fixedValue;
        value           uniform 100000;
    }
Also, I think that I have set everything properly, haven't I?

What's wrong, to you?

Thanks a lot,

Samuele
samiam1000 is offline   Reply With Quote

Old   May 7, 2012, 03:40
Default
  #4
Senior Member
 
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 198
Rep Power: 8
Chris Lucas is on a distinguished road
Hi,

why are all BC of your p field of type calculated? I would say that they should be zeroGradient (for the walls).

Best Regards,
Christian
Chris Lucas is offline   Reply With Quote

Old   May 7, 2012, 03:43
Default
  #5
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 9
samiam1000 is on a distinguished road
Let me try like that.

The point is that (even tough I recognize that those BC are probably incorrect) I have a very similar case with the same BC that runs.

Let me give a try, then I get back to you.

Thanks,

Samuele.
samiam1000 is offline   Reply With Quote

Old   May 7, 2012, 03:46
Default
  #6
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 9
samiam1000 is on a distinguished road
I've just given a try and nothing changes. If you agree I can send you an email, attaching the case.

Do you agree?
samiam1000 is offline   Reply With Quote

Old   May 7, 2012, 06:55
Default
  #7
Senior Member
 
niaz's Avatar
 
A_R
Join Date: Jun 2009
Posts: 118
Rep Power: 8
niaz is on a distinguished road
Quote:
Originally Posted by samiam1000 View Post
Dear Niaz,

yeah, I have an outlet
Code:
    infinite_air_outlet
    {
        type            fixedValue;
        value           uniform 100000;
    }
Also, I think that I have set everything properly, haven't I?

What's wrong, to you?

Thanks a lot,

Samuele
Dear Samiam
you force your outlet to go at fixed value uniformly?
it is not correct
niaz is offline   Reply With Quote

Old   May 8, 2012, 07:12
Default
  #8
Member
 
Eysteinn Helgason
Join Date: Sep 2009
Location: Gothenburg, Sweden
Posts: 52
Rep Power: 7
eysteinn is on a distinguished road
Quote:
Originally Posted by niaz View Post
Dear Samiam
you force your outlet to go at fixed value uniformly?
it is not correct
Seems ok to me . . . . unless there is something specific with the cht solver.

You might try to change the outlet type for U to something like fluxCorrectedVelocity or inletOutlet instead of zeroGradient.

Also have you checked that your mesh has type: patch set for inlet and outlet in constant/polymesh/boundary and emtpy for your empty patches. . . . had that problem once after exporting my mesh from ansa or icem.
eysteinn is offline   Reply With Quote

Old   May 8, 2012, 08:27
Default
  #9
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 9
samiam1000 is on a distinguished road
It's very strange: I created a new case and it now runs.

I can't und why, but everything is ok!

Thanks for help.

Samuele.
samiam1000 is offline   Reply With Quote

Old   May 9, 2012, 03:01
Default
  #10
New Member
 
Adam Sitko
Join Date: Apr 2012
Posts: 12
Rep Power: 5
sitekss is on a distinguished road
Hi Foamers,
I think that samiam overdefined the model, especially the outlet. But I have similar problem in my case. I observe unexpected temperature rise when 'hot' air hit the outlet. My BC there p_rgh - fixedValue value 100000; U - zerogradient; p - calculated / zeroGradient; T - zeroGradient/ fixedValue. It's strange.
BR
Adam
sitekss 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
error compiling modified applications yvyan OpenFOAM Programming & Development 18 December 17, 2011 15:39
CGNS lib and Fortran compiler manaliac Main CFD Forum 2 November 29, 2010 07:25
attach/detach (valve opening/closing) phsieh2005 OpenFOAM Running, Solving & CFD 2 March 21, 2009 06:18
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50
user defined function cfduser CFX 0 April 29, 2006 10:58


All times are GMT -4. The time now is 13:06.