CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   boundary conditions- new case problem (http://www.cfd-online.com/Forums/openfoam/91794-boundary-conditions-new-case-problem.html)

Sebaj August 23, 2011 04:24

boundary conditions- new case problem
 
Welcome everyone I have problem with new case..
When I translate mesh from icem I received mesh with 8 boundaries. then I try do standard simulation by solver icoFoam, but then I gets error :

--> FOAM FATAL IO ERROR:
keyword PIPE_EDGE_0 is undefined in dictionary "/mnt/auto/people/plgsebaa/test_case/pipe_test1/0/p::boundaryField"

file: /mnt/auto/people/plgsebaa/test_case/pipe_test1/0/p::boundaryField from line 25 to line 53.

From function dictionary::subDict(const word& keyword) const
in file db/dictionary/dictionary.C at line 456.

FOAM exiting



but in file p i defined Pipe egde..




version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform 0;

boundaryField
{
IN_OUT_0
{
type zeroGradient;
}
IN_OUT_1
{
type zeroGradient;
}
IN_OUT_2
{
type zeroGradient;
}
BODY_HOT
{
type zeroGradient;
}
BODY_COLD
{
type zeroGradient;
}
PIPE_EGDE_0
{
type empty;
}
PIPE_EGDE_1
{
type empty;
}
PIPE_EGDE_2
{
type empty;
}
}

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



here in_out it's holes
body hot it's internal mesh
body cold it's external mesh
and pipe edge it's surface at the hole

http://img846.imageshack.us/img846/6995/pipej.jpg



any Ideas how to do?

greet Seba ;)

stevenvanharen August 23, 2011 04:31

i think your spelling is incorrect, you seem to have EDGE and EGDE

Sebaj August 23, 2011 04:45

of course you're right.. :o

now another error.. may be badly defined ??



--> FOAM FATAL IO ERROR:

patch type 'wall' not constraint type 'empty'
for patch PIPE_EDGE_0 of field p in file "/mnt/auto/people/plgsebaa/test_case/pipe_test1/0/p"

file: /mnt/auto/people/plgsebaa/test_case/pipe_test1/0/p::boundaryField::PIPE_EDGE_0 from line 45 to line 45.

From function emptyFvPatchField<Type>::emptyFvPatchField
(
const fvPatch& p,
const Field<Type>& field,
const dictionary& dict
)

in file fields/fvPatchFields/constraint/empty/emptyFvPatchField.C at line 100.

FOAM exiting

??

stevenvanharen August 23, 2011 04:55

check you boundary definition in constant/polyMesh/boundary

Do you also have patches specified as empty there?

Sebaj August 23, 2011 05:01

there I have:

boundary
(
IN_OUT_0
{
type wall;
nFaces 7136;
startFace 8976957;
}
IN_OUT_1
{
type wall;
nFaces 7286;
startFace 8984093;
}
IN_OUT_2
{
type wall;
nFaces 6887;
startFace 8991379;
}
BODY_COLD
{
type wall;
nFaces 65467;
startFace 8998266;
}
BODY_HOT
{
type wall;
nFaces 123362;
startFace 9063733;
}
PIPE_EDGE_0
{
type wall;
nFaces 12612;
startFace 9187095;
}
PIPE_EDGE_1
{
type wall;
nFaces 12705;
startFace 9199707;
}
PIPE_EDGE_2
{
type wall;
nFaces 12135;
startFace 9212412;
}

stevenvanharen August 23, 2011 05:08

you should have type empty in your constant/polyMesh/boundary file for your empty patches

take a look at the cavity tutorial:

$FOAM_TUTORIALS/incompressible/icoFoam/cavity/

Sebaj August 23, 2011 05:23

next problem..

You're right also :) and file U i also must edit. now it almost works but

Starting time loop

Time = 0.005

Courant Number mean: 0 max: 0.0551093


--> FOAM FATAL ERROR:
This mesh contains patches of type empty but is not 1D or 2D
by virtue of the fact that the number of faces of this
empty patch is not divisible by the number of cells.

From function emptyFvPatchField<Type>::updateCoeffs()
in file fields/fvPatchFields/constraint/empty/emptyFvPatchField.C at line 150.

FOAM exiting


is that because time step (deltaT = 0.005) is to big?

stevenvanharen August 23, 2011 05:41

no, sorry, did not look at your mesh before, empty patches are only used for 2D or 1D problems

Why do you want to use empty patches? Where are you PIPE_EDGES exactly in your mesh? Are they not just walls?

Sebaj August 23, 2011 05:55

pipe_edge is wall and it should be fixedValue I suppose. but then when flow influence in pipe by entry.. I got new error:

Time = 0.005

Courant Number mean: 0 max: 0.0551093
DILUPBiCG: Solving for Ux, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 5.26457e-07, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 0, Final residual = 0, No Iterations 0


--> FOAM FATAL ERROR:
Continuity error cannot be removed by adjusting the outflow.
Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow.
Total flux : 36.481
Specified mass inflow : 7539.44
Specified mass outflow : 0
Adjustable mass outflow : 0


From function adjustPhi(surfaceScalarField& phi, const volVectorField& U,const volScalarField& p
in file cfdTools/general/adjustPhi/adjustPhi.C at line 115.

FOAM exiting

and then I try do "exit" from pipe by change wall into empty space :(

stevenvanharen August 23, 2011 07:24

OpenFOAM normally gives nice errors. In this case it tells you to use potentialFoam to initialize the flow, did you try this?

Sebaj August 24, 2011 05:34

now, I change files little bit and something is running.. I will see is that correct ;)

greets Seba

A.D.E August 24, 2011 05:58

Hi stevenvanharen

I saw how helpful you were with Sebaj and I was wondering if you can help me as well. I am running a 2d case in OpenFoam using simpleFoam (incompressible 60m/s) and it gives me this error.


DILUPBiCG: Solving for Ux, Initial residual = 0.324483, Final residual = 6.30403e-06, No Iterations 5
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam200/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam200/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Uninterpreted:
#3 Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam200/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#4
in "/opt/openfoam200/platforms/linuxGccDPOpt/bin/simpleFoam"
#5
in "/opt/openfoam200/platforms/linuxGccDPOpt/bin/simpleFoam"
#6
in "/opt/openfoam200/platforms/linuxGccDPOpt/bin/simpleFoam"
#7 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#8
in "/opt/openfoam200/platforms/linuxGccDPOpt/bin/simpleFoam"


Do you have any idea y?


Thank you in advance for your time,


Sincerely,


A.D.E

Sebaj August 24, 2011 06:52

me again.. :)

probably i have similiar problem..



Create time

Create mesh for time = 0

Reading transportProperties

Reading field p

Reading field U

Reading/calculating face flux field phi


Starting time loop

Time = 0.05

Courant Number mean: 0 max: 0.551093
DILUPBiCG: Solving for Ux, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 4.69515e-08, No Iterations 2
DILUPBiCG: Solving for Uz, Initial residual = 0, Final residual = 0, No Iterations 0
DICPCG: Solving for p, Initial residual = 1, Final residual = 9.60954e-07, No Iterations 609
time step continuity errors : sum local = 4.2065e-11, global = -1.63323e-14, cumulative = -1.63323e-14
DICPCG: Solving for p, Initial residual = 0.208382, Final residual = 9.50018e-07, No Iterations 506
time step continuity errors : sum local = 2.39418e-08, global = 5.87107e-12, cumulative = 5.85473e-12
ExecutionTime = 270.09 s ClockTime = 270 s

Time = 0.1

Courant Number mean: 0.00498182 max: 0.880283
DILUPBiCG: Solving for Ux, Initial residual = 0.31478, Final residual = 5.87127e-07, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 0.379635, Final residual = 1.43089e-07, No Iterations 2
DILUPBiCG: Solving for Uz, Initial residual = 0.333154, Final residual = 2.7084e-06, No Iterations 2
DICPCG: Solving for p, Initial residual = 0.0603557, Final residual = 9.74963e-07, No Iterations 538
time step continuity errors : sum local = 3.10184e-08, global = -4.42633e-11, cumulative = -3.84085e-11
DICPCG: Solving for p, Initial residual = 0.68873, Final residual = 9.67525e-07, No Iterations 522
time step continuity errors : sum local = 7.39548e-09, global = 1.9175e-11, cumulative = -1.92335e-11
ExecutionTime = 516.3 s ClockTime = 516 s

Time = 0.15

Courant Number mean: 0.00533215 max: 1.34034
DILUPBiCG: Solving for Ux, Initial residual = 0.0226568, Final residual = 2.8223e-06, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 0.0133874, Final residual = 5.66317e-06, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 0.116657, Final residual = 3.36112e-07, No Iterations 3
DICPCG: Solving for p, Initial residual = 0.5099, Final residual = 9.89826e-07, No Iterations 530
time step continuity errors : sum local = 2.90012e-09, global = 1.72753e-12, cumulative = -1.7506e-11
DICPCG: Solving for p, Initial residual = 0.216951, Final residual = 9.63454e-07, No Iterations 503
time step continuity errors : sum local = 1.80248e-09, global = -1.18666e-11, cumulative = -2.93726e-11
ExecutionTime = 778.59 s ClockTime = 778 s

Time = 0.2

Courant Number mean: 0.00529183 max: 3.17097
DILUPBiCG: Solving for Ux, Initial residual = 0.012159, Final residual = 7.18277e-06, No Iterations 9
DILUPBiCG: Solving for Uy, Initial residual = 0.00836557, Final residual = 6.1792e-06, No Iterations 3
DILUPBiCG: Solving for Uz, Initial residual = 0.0491227, Final residual = 2.08374e-06, No Iterations 8
DICPCG: Solving for p, Initial residual = 0.287848, Final residual = 9.7348e-07, No Iterations 552
time step continuity errors : sum local = 1.46002e-09, global = 6.9727e-13, cumulative = -2.86753e-11
DICPCG: Solving for p, Initial residual = 0.121064, Final residual = 8.8766e-07, No Iterations 557
time step continuity errors : sum local = 1.05088e-09, global = -1.58428e-12, cumulative = -3.02596e-11
ExecutionTime = 1066.14 s ClockTime = 1066 s

End



and it's not write time files..

what's wrong?

greets Seba

florian_krause August 24, 2011 07:06

Hello Seba,
data writing is specified in the controlDict, see http://www.openfoam.com/docs/user/controlDict.php

Hope this helps.
Florian

stevenvanharen August 24, 2011 07:13

Quote:

Originally Posted by A.D.E (Post 321340)
Hi stevenvanharen

I saw how helpful you were with Sebaj and I was wondering if you can help me as well. I am running a 2d case in OpenFoam using simpleFoam (incompressible 60m/s) and it gives me this error.


DILUPBiCG: Solving for Ux, Initial residual = 0.324483, Final residual = 6.30403e-06, No Iterations 5
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam200/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam200/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Uninterpreted:
#3 Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam200/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#4
in "/opt/openfoam200/platforms/linuxGccDPOpt/bin/simpleFoam"
#5
in "/opt/openfoam200/platforms/linuxGccDPOpt/bin/simpleFoam"
#6
in "/opt/openfoam200/platforms/linuxGccDPOpt/bin/simpleFoam"
#7 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#8
in "/opt/openfoam200/platforms/linuxGccDPOpt/bin/simpleFoam"


Do you have any idea y?


Thank you in advance for your time,


Sincerely,


A.D.E

I don't really know what generates this error. It seems to be originating from the matrix solver, maybe you can try a different matrix solver, see what happens?

Sebaj August 24, 2011 07:36

hi florian_krause

my controlDict file, here I think everything is ok :)

problem is maybe in other file?

FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application icoFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 0.2;

deltaT 0.05;

writeControl timeStep;

writeInterval 20;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression uncompressed;

timeFormat general;

timePrecision 6;

runTimeModifiable yes;

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

florian_krause August 24, 2011 07:52

Hello Seba,
you specify:

deltaT 0.05;

writeControl timeStep;

writeInterval 20;


you write out your fields every 20 time steps, but you have only 4 time steps of deltaT=0.05 to reach endTime 0.2.

Should be clear now.
Florian

Sebaj August 24, 2011 08:52

hey florian_krause,

when I change writeInterval 20; to 1 how You advised, it's work :)

thanks a lot :D

now i try to visualize data :)


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