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/)
-   -   Basic turbFoam error message (https://www.cfd-online.com/Forums/openfoam-solving/58887-basic-turbfoam-error-message.html)

sippycup August 14, 2007 11:23

I have been using the tutorial
 
I have been using the tutorials to become familiar with OpenFOAM and have been trying to recreate a cfdesign "turbulent flow over heated cylinder" case to compare different cfd packages. I know how to use FoamX, paraview etc, but my experience with flow is pretty minimal... I'm mostly the computer guy that's trying to get it to work.

I've created a satisfactory 2d (3d in foam but 2d for my purposes) mesh: it's a pipe cut in half lengthwise, with half a circle cut out where the "heated cylinder" would is. I therefore have six patches: left (needs to be a velocity inlet at 50 m/s), right (pressure outlet at 0 pa) down and cylinder (symmetryplanes), and up (wallFunctions).

I could not find an explicit "velocity inlet" in FoamX for the left side. From the example "cavity" case in the turbFoam directory I decided to make it a "wallFunction" and defined 50 for the x coordinate.

I calculated k and epsilon values for my particular case and input them in FoamX. They are 9.375 and 188.7 respectively. I think the delta_t required for the courant number is something like 0.003 s.

What I'm having problems with is the p field file. I get the following error: Create mesh for

time = 0
Reading field p
--> FOAM FATAL IO ERROR : attempt to read beyond EOF

I'm guessing that it would try to read beyond the end of file if it wasn't finding everything it needed, but that's a pretty feeble guess.

I tried to compare the cavity p and my file for differences, and the only thing I see is that I defined a p=0 for the right patch, all of the cavity patches are zeroGradient, and my internalField is nonuniform, whereas the cavity one is set to 0. I'm going to append my p file to the end of this message. Any help at all would be greatly appreciated.

/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.4 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

// Field Dictionary

FoamFile
{
version 2.0;
format ascii;

root "/home/flowloop/OpenFOAM/flowloop-1.4/run/tutorials/turbFoam";
case "2.20";
instance "0";
local "";

class volScalarField;
object p;
}

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


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

internalField nonuniform;

boundaryField
{
down
{
type symmetryPlane;
}

right
{
type fixedValue;
value uniform 0;
}

up
{
type zeroGradient;
}

left
{
type zeroGradient;
}

cylinder
{
type symmetryPlane;
}

defaultFaces
{
type empty;
}
}


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

sippycup August 14, 2007 11:24

In the previous message, I lis
 
In the previous message, I listed 5/6 patches. My 6th patches are the top and bottom of the 3d mesh, and I have set them to empty. I guess you can see that in the p file anyway, but just to clarify http://www.cfd-online.com/OpenFOAM_D...part/happy.gif.

alberto August 14, 2007 11:48

This is wrong: internalFiel
 
This is wrong:

internalField nonuniform;

Try with something like:

internalField uniform 0.0;

Bye,
Alberto

sippycup August 14, 2007 13:42

That fixed my error, thank you
 
That fixed my error, thank you! Sadly I have another error, and I can't make any sense of it. This may be the result of me cloning the cavity case, then using a completely different mesh. I read somewhere about compiling solvers... would I need to do that for my situation? Thanks, Eric.

Selecting incompressible transport model Newtonian
Selecting turbulence model kEpsilon
#0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&)
#1 Foam::sigFpe::sigFpeHandler(int)
#2 Uninterpreted: [0xffffe420]
#3 Foam::turbulenceModels::kEpsilon::kEpsilon(Foam::G eometricField<foam::vector<dou ble>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double,> const&, Foam::transportModel&)
#4 Foam::turbulenceModel::adddictionaryConstructorToT able<foam::turbulencemodels::k epsilon>::New(Foam::GeometricField<foam::vector<do uble>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double,> const&, Foam::transportModel&)
#5 Foam::turbulenceModel::New(Foam::GeometricField<fo am::vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double,> const&, Foam::transportModel&)
#6 main
#7 __libc_start_main
#8 __gxx_personality_v0 at /usr/src/packages/BUILD/glibc-2.3/csu/../sysdeps/i386/elf/start.S:122
^[[5~^[OH^[[5~^[[5~

alberto August 14, 2007 13:57

You're probably initializing k
 
You're probably initializing k and/or eps to zero. Check the value specified in k and epsilon dictionaries for the internalField.

A.

sippycup August 14, 2007 14:34

I've got k set to 9.375 and ep
 
I've got k set to 9.375 and eps set to 188.7. Do I need to set R and Nut as well? I left them blank.

alberto August 14, 2007 14:44

For R: internalField unif
 
For R:

internalField uniform (0 0 0 0 0 0 0 0 0);

For nuTilda:

internalField uniform 0;

Give a look to the turbFoam tutorial.

sippycup August 14, 2007 15:00

I made sure those values were
 
I made sure those values were set, but I still get the message.

alberto August 14, 2007 15:16

Please post the case, so we ca
 
Please post the case, so we can give it a look.

Regards,
A.

sippycup August 14, 2007 15:49

Here's the entire thing. I don
 
Here's the entire thing. I don't know that the mesh has enough resolution, but I'm mainly trying to get the solver to run right now.

http://web.utk.edu/~emoore20/cyl2.tar.gz

Thanks again,

Eric

alberto August 14, 2007 16:09

Here are the issues: - In t
 
Here are the issues:

- In transportProperties: nu = 0.
- Empty schemes field in fvSchemes:

divSchemes
{
default none;
div(phi,U) Gauss <>;
div(phi,k) Gauss <>;
div(phi,epsilon) Gauss <>;
div(phi,R) Gauss <>;
div(R) Gauss linear;
div(phi,nuTilda) Gauss <>;
div((nuEff*dev(grad(U).T()))) Gauss linear;
}

Plus all boundary conditions have zero velocity. I fixed these settings, and now the code runs, but of course you're solving for nothing, being U = 0.

http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif correctedCase.tar.gz

Regards,
Alberto

alberto August 14, 2007 16:14

Note: I removed the mesh to cr
 
Note: I removed the mesh to create a small file.

A.

sippycup August 15, 2007 14:45

Thanks for looking at the code
 
Thanks for looking at the code, now I can at least get some iterations done! However, I set left to [50 0 0] in the U field and the solver errors after completing t=0.03 after six iterations. When I view the results in parafoam, t=0.3 and even t=0 have the U field at infinity at all points and the p field is NaN at all points. Here's the error, any ideas?

#0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&)
#1 Foam::sigFpe::sigFpeHandler(int)
#2 Uninterpreted: [0xffffe420]
#3 Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const
#4 Foam::fvMatrix<double>::solve(Foam::Istream&)
#5 Foam::lduMatrix::solverPerformance Foam::solve<double>(Foam::tmp<foam::fvmatrix<doubl e> > const&)
#6 Foam::turbulenceModels::kEpsilon::correct()
#7 main
#8 __libc_start_main
#9 __gxx_personality_v0 at /usr/src/packages/BUILD/glibc-2.3/csu/../sysdeps/i386/elf/start.S:122

sippycup August 15, 2007 14:59

I think it may be the courant
 
I think it may be the courant number... isn't it supposed to be under 1?

Time = 0.03

Courant Number mean: 1.07121e+48 max: 1.51093e+51
DILUPBiCG: Solving for Ux, Initial residual = 7.37701e-06, Final residual = 7.37701e-06, No Iterations 0
DILUPBiCG: Solving for Uy, Initial residual = 2.56253e-06, Final residual = 2.56253e-06, No Iterations 0
DICPCG: Solving for p, Initial residual = 1, Final residual = 5.79649e-07, No Iterations 104
time step continuity errors : sum local = 5.76439e+60, global = 3.20979e+58, cumulative = 3.20979e+58
DICPCG: Solving for p, Initial residual = 3.18555e-12, Final residual = 3.18555e-12, No Iterations 0
time step continuity errors : sum local = 5.19003e+167, global = -1.3427e+151, cumulative = -1.3427e+151

yousuf May 18, 2008 23:45

Eric......... What have you do
 
Eric......... What have you done to decrease the courant no. in the above case?


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