CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Continuity error cannot be removed by adjusting the outflow (https://www.cfd-online.com/Forums/openfoam/207001-continuity-error-cannot-removed-adjusting-outflow.html)

Mondal131211 September 21, 2018 02:36

Continuity error cannot be removed by adjusting the outflow
 
1 Attachment(s)
Hi Foamers,

I am a new OpenFOAM user. Now I am trying to simulate a case relating heat transfer in a cavity shape geometry just for learning. I choose buoyantsimplefoam for my case. I am trying to push the air (inside the cavity) from the patch called "Jet" created from top wall by using toposetdict and createpatchdict. All other walls are defined in the blockMeshdict file. For better understanding, I shared my case directory with this message. Please see the files and try to fix the problem. It will help me a lot. Thanks in advance.

Anyways, The command lines are as follows,
blockMesh
topoSet
createPatch -overwrite
buoyantSimpleFoam
paraFoam

When I simulate my case I face the continuity error like that
[code]
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 : 4.18896e-05
Specified mass inflow : 0.00269453
Specified mass outflow : 0
Adjustable mass outflow : 0

Tobi September 24, 2018 04:34

Hi,

please use code tags around your terminal outputs to improve the readability of your stuff. Additionally, I think that your statement
Quote:

I think all is ok except defining the pressure boundary conditions.
is in contradiction to your problem, isnīt it. In order to give any feedback resolving the problem, you have to provide more information. However, checking just your boundary conditions give the answer. You do not specifiy any patch for your pressure. You can use a fixed point as pressure (referencePressure) but this should only work for closed domains.

Mondal131211 September 24, 2018 21:08

Continuity error cannot be removed by adjusting the outflow.
 
1 Attachment(s)
Quote:

Originally Posted by Tobi (Post 707224)
Hi,

please use code tags around your terminal outputs to improve the readability of your stuff. Additionally, I think that your statement

is in contradiction to your problem, isnīt it. In order to give any feedback resolving the problem, you have to provide more information. However, checking just your boundary conditions give the answer. You do not specifiy any patch for your pressure. You can use a fixed point as pressure (referencePressure) but this should only work for closed domains.

Hi Tobi,

Thank you for your response. Actually, I am new in this forum. This is my first post. That is why I could not make my post attractive to the forum stuff. Anyways, I am now trying to simulate a case like a cavity shape by buoyantsimplefoam. I want to push the air inside the cavity by a patch called "Jet" (created from top wall by using toposetdict and createpatchdict) in my simulations while the left wall is considered hot and right wall is cold wall. For the clear understanding about my simulation, I attached my case directory with the problem image in this message. Please see the attached file here and try to solve my problem. it will help me a lot.

How to set reference pressure in BC? I am quite new with OpenFOAM. Sorry for bothering.

Tobi September 26, 2018 05:21

Dear Mondal,

I will have a look at your case today in the evening - if there is time. However, I will not solve your problem and give you the answer straightaways. I might give you hints but the best way to learn FOAM is to solve the problems yourself. Keep in mind, that the basics of numerics are a fundamental part of applying appropriate boundary conditions.

To you question - set reference pressure:

- you cannot set a reference pressure in the boundaries (that does not make sense)
- you can set a reference pressure at a specific numerical cell within the fvSolutions file; however, this is only needed for closed domains (no inlet/outlet).

Mondal131211 September 26, 2018 07:18

Hi Tobi,

I have been trying this problem for almost one month. But it shows same problem each time. However, please have a look my case directories and give me hints if there any other problem. Thank you very much for your help.

Tobi September 26, 2018 16:24

1 Attachment(s)
1 minute after checking your stuff. See attachment.
Check you p_rgh boundary conditions :)


Good luck

Mondal131211 September 26, 2018 21:14

1 Attachment(s)
Quote:

Originally Posted by Tobi (Post 707727)
1 minute after checking your stuff. See attachment.
Check you p_rgh boundary conditions :)


Good luck

Hi Tobi,
I am very happy to see this kind of picture. Thank you very much. I checked the boundary conditions and this time iteration is running but is not converging on my solution. After 118 iterations simulations stopped and show the error like this. Below error message, I also add my defined p_rgh file that runs 118 iterations and stooped. I think I am really disturbing you. I am just starting to learn OpenFOAM that's why I ask very silly things about my simulations. I have to solve this problem in any way as early as possible. Any suggestions for that error?

Code:

...........bounding k, min: -42.1468 max: 482.077 average: 0.350154
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3  log in "/lib/x86_64-linux-gnu/libm.so.6"
#4  Foam::nutUWallFunctionFvPatchScalarField::calcYPlus(Foam::Field<double> const&) const at ??:?
#5  Foam::nutUWallFunctionFvPatchScalarField::calcNut() const at ??:?
#6  Foam::nutWallFunctionFvPatchScalarField::updateCoeffs() at ??:?
#7  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::evaluate() at ??:?
#8  Foam::RASModels::kEpsilon<Foam::EddyDiffusivity<Foam::ThermalDiffusivity<Foam::CompressibleTurbulenceModel<Foam::fluidThermo> > > >::correctNut() at ??:?
#9  Foam::RASModels::kEpsilon<Foam::EddyDiffusivity<Foam::ThermalDiffusivity<Foam::CompressibleTurbulenceModel<Foam::fluidThermo> > > >::correct() at ??:?
#10  ? at ??:?
#11  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#12  ? at ??:?
Floating point exception (core dumped)
...............
FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    location    "0";
    object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
p_rgh...........
dimensions      [1 -1 -2 0 0 0 0];

internalField  uniform 1e5;

boundaryField
{
    cold
    {
        //type            fixedFluxPressure;
        type            fixedValue;
        value          uniform 1e5;
    }

    hot
    {
        //type            fixedFluxPressure;
        type            fixedValue;
        value          uniform 1e5;
    }

    top
    {
        //type            fixedFluxPressure;
        type            fixedValue;
        value          uniform 1e5;
    }

    bottom
    {
        //type            fixedFluxPressure;
        type            fixedValue;
        value          uniform 1e5;
    }
    front
    {
        //type            fixedFluxPressure;
        type            fixedValue;
        value          uniform 1e5;
    }
    back
    {
        //type            fixedFluxPressure;
        type            fixedValue;
        value          uniform 1e5;
    }
    Jet
    {
        //type            zeroGradient;
        type            fixedValue;
        value          uniform 1e5;
    }
}


Tobi September 27, 2018 01:49

I am not investigating into that problem because:
  • I guess it is just a simple test case without any real application
  • as far as the solver is running and afterward failing, it is probably a problem of the physics that you cannot resolve, wrong set-up of the solver such as a wrong chosen algorithm and therefore non-sense settings for e.q. relaxation, PIMPLE, SIMPLE, residual control, linear solver settings and so on :)
  • It is a different topic; so I recommend you to open a new question
  • No time

For your interest, the quantity k makes trouble.
Code:

bounding k, min: -42.1468 max: 482.077 average: 0.350154
Besides, I stopped the calculation after 60 iterations. I guess I would run into the same problems without adopting your case concerning the numerics.
Good luck.

PS: Please use C O D E T A G S


All times are GMT -4. The time now is 01:49.