CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   singularity? (http://www.cfd-online.com/Forums/openfoam-solving/100225-singularity.html)

mihaipruna April 21, 2012 21:25

singularity?
 
2 Attachment(s)
I am trying to model a simple pipe with total pressure at inlet and fixed 0 pressure at outlet. Tried various things, last one being a filleting of the edges.
Please see images. Flat face facing you is inlet,curved faces are wall and there is symmetry on the Z=0 plane.
I pasted the BCs,o refer to this post:
http://www.cfd-online.com/Forums/ope...ty-driven.html
I am attaching screenshots. I already tried smaller relaxation factors. still got huge values.


FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
rightZmax
{
type freestream;
freestreamValue uniform 0;
}
leftZmin
{
type symmetryPlane;
}
inletXmin
{
type freestream;
freestreamValue uniform 0;
}
outletXmax
{
type calculated;
value uniform 0;
}
topYmax
{
type freestream;
freestreamValue uniform 0;
}
bottomYmin
{
type freestream;
freestreamValue uniform 0;
}
Sductface1
{
type nutkWallFunction;
value uniform 0;
}
Sductface2
{
type nutkWallFunction;
value uniform 0;
}
SDuctInlet
{
type calculated;
value uniform 0;
}
SDuctOutlet
{
type calculated;
value uniform 0;
}
Sductface5
{
type nutkWallFunction;
value uniform 0;
}
Sductface6
{
type nutkWallFunction;
value uniform 0;
}
Sductface7
{
type nutkWallFunction;
value uniform 0;
}
Sductface8
{
type nutkWallFunction;
value uniform 0;
}
}






FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object k;
}
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0.240000;
boundaryField
{
outletXmax
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
inletXmin
{
type freestream;
freestreamValue uniform 0.240000;
}
bottomYmin
{
type freestream;
freestreamValue uniform 0.240000;
}
topYmax
{
type freestream;
freestreamValue uniform 0.240000;
}
leftZmin
{
type symmetryPlane;
}
rightZmax
{
type freestream;
freestreamValue uniform 0.240000;
}
Sductface1
{
type kqRWallFunction;
value $internalField;
}
Sductface2
{
type kqRWallFunction;
value $internalField;
}
SDuctInlet
{
type fixedValue;
value uniform 0.240000;
}
SDuctOutlet
{
type zeroGradient;
}
Sductface5
{
type kqRWallFunction;
value $internalField;
}
Sductface6
{
type kqRWallFunction;
value $internalField;
}
Sductface7
{
type kqRWallFunction;
value $internalField;
}
Sductface8
{
type kqRWallFunction;
value $internalField;
}
}





FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0.000000 0.000000 0.000000);
boundaryField
{
inletXmin
{
type freestream;
freestreamValue uniform (0.000000 0.000000 0.000000);
}
outletXmax
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
bottomYmin
{
type freestream;
freestreamValue uniform (0.000000 0.000000 0.000000);
}
topYmax
{
type freestream;
freestreamValue uniform (0.000000 0.000000 0.000000);
}
rightZmax
{
type freestream;
freestreamValue uniform (0.000000 0.000000 0.000000);
}
leftZmin
{
type symmetryPlane;
}
Sductface1
{
type fixedValue;
value uniform (0 0 0);
}
Sductface2
{
type fixedValue;
value uniform (0 0 0);
}
SDuctInlet
{
type zeroGradient;
}
SDuctOutlet
{
type zeroGradient;
}
Sductface5
{
type fixedValue;
value uniform (0 0 0);
}
Sductface6
{
type fixedValue;
value uniform (0 0 0);
}
Sductface7
{
type fixedValue;
value uniform (0 0 0);
}
Sductface8
{
type fixedValue;
value uniform (0 0 0);
}
}


FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object omega;
}
dimensions [0 0 -1 0 0 0 0];
internalField uniform 1.780000;
boundaryField
{
inletXmin
{
type freestream;
freestreamValue uniform 1.780000;
}
outletXmax
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
bottomYmin
{
type freestream;
freestreamValue uniform 1.780000;
}
topYmax
{
type freestream;
freestreamValue uniform 1.780000;
}
leftZmin
{
type symmetryPlane;
}
rightZmax
{
type freestream;
freestreamValue uniform 1.780000;
}
Sductface1
{
type omegaWallFunction;
value $internalField;
}
Sductface2
{
type omegaWallFunction;
value $internalField;
}
SDuctInlet
{
type fixedValue;
value uniform 1.780000;
}
SDuctOutlet
{
type zeroGradient;
}
Sductface5
{
type omegaWallFunction;
value $internalField;
}
Sductface6
{
type omegaWallFunction;
value $internalField;
}
Sductface7
{
type omegaWallFunction;
value $internalField;
}
Sductface8
{
type omegaWallFunction;
value $internalField;
}
}




FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0.000000;
boundaryField
{
inletXmin
{
type freestreamPressure;
freestreamValue 0.000000;
}
outletXmax
{
type fixedValue;
value $internalField;
}
bottomYmin
{
type freestreamPressure;
freestreamValue 0.000000;
}
topYmax
{
type freestreamPressure;
freestreamValue 0.000000;
}
leftZmin
{
type symmetryPlane;
}
rightZmax
{
type freestreamPressure;
freestreamValue 0.000000;
}
Sductface1
{
type zeroGradient;
}
Sductface2
{
type zeroGradient;
}
SDuctInlet
{
type totalPressure;
gamma 1.4;
p0 uniform 100000.000000;
}
SDuctOutlet
{
type fixedValue;
value uniform 0.000000;
}
Sductface5
{
type zeroGradient;
}
Sductface6
{
type zeroGradient;
}
Sductface7
{
type zeroGradient;
}
Sductface8
{
type zeroGradient;
}
}



FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
solvers
{
p
{
solver GAMG;
tolerance 1e-7;
relTol 0.1;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
cacheAgglomeration on;
agglomerator faceAreaPair;
nCellsInCoarsestLevel 10;
mergeLevels 1;
}
U
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.1;
nSweeps 1;
}
k
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.1;
nSweeps 1;
}
omega
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.1;
nSweeps 1;
}
}
SIMPLE
{
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
residualControl
{
p 1e-5;
U 1e-5;
k 1e-5;
omega 1e-5;
}
}
potentialFlow
{
nNonOrthogonalCorrectors 10;
pRefCell 0;
pRefValue 0;
}
relaxationFactors
{
p 0.3;
U 0.7;
k 0.7;
omega 0.7;
}
cache
{
grad(U);
}

alberto April 22, 2012 03:34

At a first sight, there could be something wrong in a group of cells (the red area). What discretization schemes are you using? If you have problematic cells, turn limiters on to see if the situation improves.

mihaipruna April 23, 2012 15:17

well, this is what i have in my fv schemes, copied from the motorbike tutorial.
will this work for internal flows as well? My solution seems to blow up only when I try to specify inlet pressure.

FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
ddtSchemes
{
default steadyState;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss linearUpwindV grad(U);
div(phi,k) Gauss upwind;
div(phi,omega) Gauss upwind;
div((nuEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
fluxRequired
{
default no;
p;
}

alberto April 23, 2012 16:49

Yes, but it might help to put a limiter on the gradients too:

Code:

gradSchemes
{
    default        cellLimited Gauss linear 1;
}

Also, check your mesh to see if there are very skewed cells (checkMesh will tell you).

mihaipruna April 23, 2012 17:36

Thanks for the suggestions. checkmesh returned all clear.
hmm, my numbers are too big too....been focused on the numerics didn't bother to check Bernoulli. 100000 deltap/rho gives supersonic velocity...and I was using simpleFoam....gonna try with 10000 instead.

mihaipruna April 24, 2012 18:18

thanks Alberto, the cell limiter helped prevent the values from attaining huge values.
However, I discovered another issue with my patches, which I fixed and I am hoping the simulation will run properly without limiters.


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