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

Help resolving simple case in buoyantSimpleFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 3, 2017, 08:59
Default Help resolving simple case in buoyantSimpleFoam
  #1
Member
 
Join Date: Jun 2017
Posts: 58
Rep Power: 8
sturgeon is on a distinguished road
Hi all, I am trying to root out issues I am having with a more complex case (hence using bSF even though I am not using any temperature related things) and I have reduced my case to as simple a state as possible but I simply cannot get it to resolve. I must be missing something obvious because it really is a simple case - 2D, left side is inlet, right side is outlet, bottom is wall with slip and the ceiling is either an outlet as well or velocity parallel to the ceiling. (I have seen both used and tried both, with no success.) There are no obstacles to the flow and no turbulence, so really the initial conditions should be the converged solution. The simulation crashes almost immediately unless I have relaxation factors set to about 0.1% of their default values, then it crashes after 500 or so. If I have the ceiling set as pressureInletVelocityOutlet, this is the final iteration before crashing;



Pressure along x axis is:



So I am getting some strange oscillating pressure. When the ceiling is set to fixed U:





Here are the relevant 0 files:

p:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1612+                                |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    location    "0";
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform 101325;

boundaryField
{
    inlet
    {
        type            calculated;
        value 101325;
    }
    roof
    {
        type            calculated;
        value 101325;
    }
    outlet
    {
        type            calculated;
        value 101325;
    }
    coldWalls
    {
        type            calculated;
        value 101325;
    }
    hotWalls
    {
        type            calculated;
        value 101325;
    }
    defaultFaces
    {
        type            empty;
    }
}


// ************************************************************************* //
p_rgh:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  plus                                  |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
	    location    "0";
    object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform 101325;

boundaryField
{

	
    inlet
{
				type fixedFluxPressure;
				gradient uniform 0;
				value uniform 101325;       
}
	    roof
    {	
        type            totalPressure;
        p0              uniform 101325;    
    }
	

outlet
{
        type            totalPressure;
        p0              uniform 101325;
}

    coldWalls
    {
        type            fixedFluxPressure;
        gradient        uniform 0;
        value           uniform 101325;
    }
	
	 hotWalls
    {
        type            fixedFluxPressure;
        gradient        uniform 0;
        value           uniform 101325;
    }
	
	    frontAndBack
    {
        type            empty;
    }
	
	
	
}

// ************************************************************************* //
U:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1612+                                |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform (5 0 0);

boundaryField
{
    inlet
    {
type fixedValue;
value $internalField;
    }
	
	    roof
    {
type pressureInletOutletVelocity;
inletValue uniform (0 0 0);
value uniform (5 0 0);
    }
	
    outlet
    {
type pressureInletOutletVelocity;
inletValue uniform (0 0 0);
value uniform (5 0 0);
    }
    coldWalls
    {
        type            slip;
    }
    hotWalls
    {
        type            slip;
    }
    defaultFaces
    {
        type            empty;
    }
}


// ************************************************************************* //
T:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.1                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    location    "0";
    object      T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 1 0 0 0];

internalField   uniform 288.15;

boundaryField
{
    inlet
    {
        type            fixedValue;
        value uniform 288.15;
    }
    roof
    {
        type            inletOutlet;
		value uniform 288.15;
		inletValue uniform 288.15;
		}
    outlet
    {
	                type            inletOutlet;
		value uniform 288.15;
		inletValue uniform 288.15;
}
    coldWalls
    {
        type            zeroGradient;
    }
    hotWalls
    {
        type            zeroGradient;
    }
    defaultFaces
    {
        type            empty;
    }
}


// ************************************************************************* //
fvSchemes:

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

ddtSchemes
{
    default     steadyState;
}

gradSchemes
{
default         Gauss linear;
	
}

divSchemes
{
default         none; 
      div(phi,U)      bounded Gauss upwind; 
      div(phi,k)      bounded Gauss upwind; 
	        div(phi,K)      bounded Gauss upwind; 
	        div(phi,h)      bounded Gauss upwind; 
      div(phi,epsilon) bounded Gauss upwind; 
      div(phi,R)      bounded Gauss upwind; 
      div(R)          bounded Gauss upwind; 
      div(phi,nuTilda) bounded Gauss upwind; 
     div((nuEff*dev2(T(grad(U))))) bounded Gauss upwind;
	 div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear uncorrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         uncorrected;
}


// ************************************************************************* //
I have tried many combinations of boundary conditions for U and p_rgh, tried changing the schemes around and messed around with the tolerances in fvSolution but nothing will allow this case to resolve. It seems so straightforward but it invariably explodes.

Any advice is greatly appreciated... as I said, this is an extremely simplified version of a much more complex case but at this stage I can't think of any ways to reduce complexity further and I still can't get any sort of convergence.

Thank you
sturgeon
sturgeon is offline   Reply With Quote

Old   November 7, 2017, 12:49
Default
  #2
Member
 
Join Date: Jun 2017
Posts: 58
Rep Power: 8
sturgeon is on a distinguished road
I have made some progress and maybe based on this people could give me some advice that would help in bringing my case back to the original complex case.

I have managed to get the simulation to converge by setting zeroGradient for the roof and outlet for U, and fixedValue for p_rgh, then further, I lowered relaxation of p_rgh by a factor of 10, and left the others at their default values. The case then does converge, but I still get a buildup of increased velocity at the outlet (extremely small, but since there are no obstacles to the flow I am unsure why), and it also takes 5000 iterations to resolve. Is this normal? It seems very high for a case that should more or less begin at its converged solution.

If anyone has experienced this sort of thing and can give me advice on how to improve my use of OpenFOAM based on this I would be grateful. I am now beginning to modify the case towards the original more complex problem and see where the next issue arises, however, I feel like I am still doing something fundamentally wrong which will hamper me further down the line.
sturgeon is offline   Reply With Quote

Reply


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
Problems installing OpenFOAM 2.3.0, 1.6-ext and foam-extend 3.0 sam.ho OpenFOAM Installation 35 April 5, 2014 15:31
Problem with a simple 2D case: flow over an airfoil samiam1000 OpenFOAM 4 April 30, 2013 12:13
Problem with a simple 2D case: flow over an airfoil samiam1000 SU2 1 March 23, 2013 22:58
unsteady divergence simple case hugocis Main CFD Forum 2 June 10, 2010 04:24
Simple Q. How to complete a Case? W.A. Siemens 3 April 23, 2006 19:41


All times are GMT -4. The time now is 22:51.