CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Error in compressibleInterFoam (https://www.cfd-online.com/Forums/openfoam-solving/178384-error-compressibleinterfoam.html)

gtpunnamarajuaju@gmail.co October 6, 2016 14:30

Error in compressibleInterFoam
 
Hi all,

I'm using compressibleInterFoam for solving the following problem: A liquid droplet falling on a liquid film. And I'm getting the following error while running the code:

Starting time loop

Courant Number mean: 0 max: 0
deltaT = 5.95238e-06
Time = 5.95238e-06

PIMPLE: iteration 1
MULES: Solving for alpha.water
Liquid phase volume fraction = 0.1 Min(alpha.water) = 0 Min(alpha.air) = 0
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
smoothSolver: Solving for T, Initial residual = 0.603844, Final residual = 0.365488, No Iterations 1000
min(T) 300
GAMG: Solving for p_rgh, Initial residual = nan, Final residual = nan, No Iterations 1000
max(U) 0
min(p_rgh) 0
GAMG: Solving for p_rgh, Initial residual = nan, Final residual = nan, No Iterations 1000


--> FOAM FATAL IO ERROR:
wrong token type - expected Scalar, found on line 0 the word 'nan'

file: /auto/home/vgpunnamaraju/depthCharge3D/system/data.solverPerformance.p_rgh at line 0.

From function Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::doubleScalar&)
in file lnInclude/Scalar.C at line 93.

FOAM exiting



I assume there is something wrong with my BC (p_rgh to be more specific) or my fvsolution file. So I'm attaching both of them below:


p_rgh file:

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

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

internalField uniform 0;

boundaryField
{
walls
{
type fixedValue;
value uniform 0;
}
bottom
{
type fixedValue;
value uniform 0;
}
atmosphere
{
type totalPressure;
p0 uniform 0;
U U;
T T;
phi phi;
rho rho;
psi none;
gamma 1;
value uniform 0;
}
frontAndBack
{
type fixedValue;
value uniform 0;

}
}


// ************************************************** *********************** //



fvsolution:


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

solvers
{
alpha.water
{
nAlphaCorr 1;
nAlphaSubCycles 1;
cAlpha 1;
}

pcorr
{
solver PCG;
preconditioner
{
preconditioner GAMG;
tolerance 1e-10;
relTol 0;
smoother DICGaussSeidel;
}
tolerance 1e-05;
relTol 0;
maxIter 100;
}

".*(rho|rhoFinal)"
{
solver diagonal;
}

p_rgh
{
solver GAMG;
tolerance 1e-07;
relTol 0;
smoother DIC;
}
/* p_rgh
{
solver GAMG;
preconditioner
{
preconditioner DIC;
tolerance 1e-07;
relTol 0;
nVcycles 2;
smoother DICGaussSeidel;
nPreSweeps 2;
}
tolerance 1e-07;
relTol 0;
maxIter 20;
}*/

/*p_rghFinal
{
solver PCG;
preconditioner
{
preconditioner GAMG;
tolerance 1e-07;
relTol 0;
nVcycles 2;
smoother DIC;
nPreSweeps 2;
}
tolerance 1e-07;
relTol 0;
maxIter 20;
}*/

U
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-06;
relTol 0;
nSweeps 1;
}

"(T|k|B|nuTilda).*"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-08;
relTol 0;
}
}

PIMPLE
{
momentumPredictor no;
transonic no;
nOuterCorrectors 1;
nCorrectors 4;
nNonOrthogonalCorrectors 0;
}


// ************************************************** ******************** //


Could someone please help me fix the error? I'm trying to do that from past few days and I'm not knowing what to do.



Thank you!

tas38 October 6, 2016 15:42

I think you want to use absolute pressure for p_rgh. Change the internalField value from 0 to say 101 kPa.

gtpunnamarajuaju@gmail.co October 6, 2016 15:51

Hi Snyder,
Tried even that. I'm getting the same error. Could it be anything else?

Thank you

tas38 October 7, 2016 06:29

Does checkMesh run without any errors?

Taataa October 7, 2016 10:02

You should set fixedFluxPressure for BC of p_rgh on walls. Also considering that you are solving a compressible flow you should set the atmospheric pressure for internal values.


All times are GMT -4. The time now is 20:48.