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

rhoPimpleFoam does not work with higher velocity

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By Swirl

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 29, 2023, 12:36
Default rhoPimpleFoam does not work with higher velocity
  #1
New Member
 
Lukas
Join Date: May 2023
Location: Aachen, Germany
Posts: 4
Rep Power: 3
Lukas1 is on a distinguished road
Hello everyone,

I´m quite new to OpenFOAM and have a problem with rhoPimpleFoam.
The case is a 3D pipeline with a orifice and a vessel at the end of the pipeline. The excitation is a sinusoidal excitation of velocity (mean flow 10 m/s) with an amplitude of 10 m/s and a frequency of 40 Hz. The aim is to evaluate the pressure fluctuations. The pipeline is splitted in the middle to use symmetry (xyplanes are symmetry planes). (see model in geometry.jpg)
When I start the simulation it stops after about 0,1 s of simulation and there comes the error message which can be seen in error.jpg. The final residual rises to a very high value. Moreover there are strong fluctuations behind the orifice which not really makes sense (see fluctuations.jpg). The turbulence model I use ist k omega SST. The medium is air (atmospheric pressure at outlet).
I tried the exact same simulation with a mean flow of 5 m/s, an amplitude of 5 m/s and a frequency of 40 Hz. This simulation runs normally and gives reasonable results. Can someone maybe tell me why the simulation with rhoPimpleFoam works for 5 m/s mean flow velocity but not for 10 m/s?

0/U:
Code:
dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    inlet
    {
		type			uniformFixedValue;
		uniformValue	sine;
		uniformValueCoeffs		
		{
			frequency	40;
			amplitude	10;
			scale 		(1 0 0);
                        level 		(10 0 0);
			t0  		0; 
		}
    }

    outlet
    {
        type            zeroGradient;
    }

	xyplane
    {
        type            symmetry;
    }

    wall
    {
        type            noSlip;
    }
	
	wallrefine
    {
        type            noSlip;
    }
	
	xyplanevessel
    {
        type            symmetry;
    }
	
	vessel
    {
        type            noSlip;
    }
}
0/p:
Code:
dimensions      [1 -1 -2 0 0 0 0];

internalField   uniform 101325;

boundaryField
{
    inlet
    {
        type            zeroGradient;
    }

    outlet
    {
        type            fixedValue;
        value           uniform 101325;
    }

	xyplane
    {
        type            symmetry;
    }
	
    wall
    {
        type            zeroGradient;
    }
	
    wallrefine
    {
        type            zeroGradient;
    }
	
	xyplanevessel
    {
        type            symmetry;
    }
	
	vessel
    {
        type            zeroGradient;
    }
	
	#includeEtc "caseDicts/setConstraintTypes"
}
0/T:
Code:
dimensions      [0 0 0 1 0 0 0];

internalField   uniform 293;

boundaryField
{
	#includeEtc "caseDicts/setConstraintTypes"
	
    inlet
    {
        type            fixedValue;
        value           uniform 293;
    }

    outlet
    {
        type            zeroGradient;
    }

	xyplane
    {
        type            symmetry;
    }

    wall
    {
        type            zeroGradient;
    }
	
	wallrefine
    {
        type            zeroGradient;
    }
	
	xyplanevessel
    {
        type            symmetry;
    }
	
	vessel
    {
        type            zeroGradient;
    }
	
	#includeEtc "caseDicts/setConstraintTypes"
	
}
0/omega:
Code:
dimensions      [0 0 -1 0 0 0 0];

internalField   uniform 25.88;

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

    outlet
    {
        type            zeroGradient;
    }

	xyplane
    {
        type            symmetry;
    }
	
    wall
    {
        type            omegaWallFunction;
        value           uniform 25.88;
    }

    wallrefine
    {
        type            omegaWallFunction;
        value           uniform 25.88;
    }
	
	xyplanevessel
    {
        type            symmetry;
    }
	
	vessel
    {
        type            omegaWallFunction;
        value           uniform 25.88;
    }
}
0/k:
Code:
dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0.375;

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

    outlet
    {
        type            zeroGradient;
    }

	xyplane
    {
        type            symmetry;
    }
	
    wall
    {
        type            kqRWallFunction;
        value           uniform 0.375;
    }

    wallrefine
    {
        type            kqRWallFunction;
        value           uniform 0.375;
    }
	
	xyplanevessel
    {
        type            symmetry;
    }
	
	vessel
    {
        type            kqRWallFunction;
        value           uniform 0.375;
    }
	
}
0/nut:
Code:
dimensions      [0 2 -1 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    inlet
    {
        type            calculated;
        value           uniform 0;
    }

    outlet
    {
        type            calculated;
        value           uniform 0;
    }

	xyplane
    {
        type            symmetry;
    }
	
    wall
    {
        type            nutkWallFunction;
        value           uniform 0;
    }

    wallrefine
    {
        type            nutkWallFunction;
        value           uniform 0;
    }
	
	xyplanevessel
    {
        type            symmetry;
    }
	
	vessel
    {
        type            nutkWallFunction;
        value           uniform 0;
    }
}
controlDict:
Code:
application     rhoPimpleFoam;

startFrom       latestTime;

startTime       0;

stopAt          endTime;

endTime         1;

deltaT          0.0001;

writeControl    adjustable;

writeInterval   0.002;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable yes;

adjustTimeStep  yes;

maxCo           5;
fvSchemes:
Code:
ddtSchemes
{
    default         Euler;
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    default         none;

    div(phi,U)       Gauss upwind;
    
    div(phi,k)       Gauss upwind;
    div(phi,omega)   Gauss upwind;
    div(phi,nuTilda) Gauss upwind;
    div(phi,R)       Gauss upwind;
    div(R)           Gauss linear;

    div(phi,e)      Gauss upwind;
    div(phi,K)      Gauss upwind;
    div(phi,Ekp)    Gauss upwind;

    div(phiv,p)     Gauss upwind;
    div((phi|interpolate(rho)),p)  Gauss upwind;

    div(((rho*nuEff)*dev2(T(grad(U)))))    Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

wallDist
{
    method          meshWave;
}
fvSolution:
Code:
solvers
{
    "pcorr.*"
    {
        solver          GAMG;
        tolerance       1e-2;
        relTol             0;
        smoother        DICGaussSeidel;
        cacheAgglomeration no;
        maxIter         50;
    }
	
	p
    {
        $pcorr;
        tolerance        1e-6;
        relTol           0.01;
    }

    pFinal
    {
        $pcorr;
        tolerance        1e-6;
        relTol           0;
    }

    "(U|k|omega|R|nuTilda|e|rho)"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-06;
        relTol          0.1;
    }

    "(U|k|omega|R|nuTilda|e|rho)Final"
    {
        $U;
        relTol          0;
    }
}

PIMPLE
{
    nNonOrthogonalCorrectors 1;
    nCorrectors         2;
}
Thanks for your help!

Lukas
Attached Images
File Type: jpg error.jpg (140.2 KB, 13 views)
File Type: png fluctuations.png (73.4 KB, 14 views)
File Type: jpg geometry.jpg (13.6 KB, 12 views)
Lukas1 is offline   Reply With Quote

Old   July 5, 2023, 12:09
Default
  #2
Member
 
Join Date: Jun 2020
Posts: 49
Rep Power: 6
Swirl is on a distinguished road
Hi,

from what you posted, I can see two things you may try.

1) reduce the maxmimum Courant number in your controlDict. rhoPimpleFoam does work with values larger than 1, but in any case it is a good idea to keep them below 1.

2) Try to use a waveTransmissive BC for the pressure field at your outlet. Since you are actively trying to generate pressure fluctuations, the fixed value BC at the outlet could be a problem. There is an explanation of how to use it under the link below.

https://openfoamwiki.net/index.php/H...dary_condition


Please let me know if this works.
dlahaye and hogsonik like this.
Swirl is offline   Reply With Quote

Old   July 5, 2023, 17:31
Default
  #3
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 802
Blog Entries: 1
Rep Power: 18
dlahaye is on a distinguished road
Agree to waveTransmissive BC.

We succesfully applied them in https://www.mdpi.com/2311-5521/7/6/205

I am interested in seeing how it works for you.
dlahaye is offline   Reply With Quote

Old   July 6, 2023, 09:52
Default
  #4
New Member
 
Lukas
Join Date: May 2023
Location: Aachen, Germany
Posts: 4
Rep Power: 3
Lukas1 is on a distinguished road
Quote:
Originally Posted by Swirl View Post
Hi,

from what you posted, I can see two things you may try.

1) reduce the maxmimum Courant number in your controlDict. rhoPimpleFoam does work with values larger than 1, but in any case it is a good idea to keep them below 1.

2) Try to use a waveTransmissive BC for the pressure field at your outlet. Since you are actively trying to generate pressure fluctuations, the fixed value BC at the outlet could be a problem. There is an explanation of how to use it under the link below.

https://openfoamwiki.net/index.php/H...dary_condition


Please let me know if this works.

Thank you! I reduced the maxCo to 1 and now the simulation works!
Lukas1 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
Import .csv - velocity profile - error eSKa CFX 9 April 3, 2021 14:38
Viscous Work in rhoPimpleFoam (OF 1612) L_W OpenFOAM Programming & Development 1 August 1, 2018 11:56
atmBoundaryLayerInletVelocity - Velocity Profile not continuous through domain sdfij6354 OpenFOAM Running, Solving & CFD 3 July 26, 2017 17:16
Steady pipe flow mean velocity higher than inlet velocity anita OpenFOAM Running, Solving & CFD 7 September 25, 2012 06:35
Velocity in Porous medium : HELP! HELP! HELP! Kali Sanjay Phoenics 0 November 6, 2006 07:10


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