CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   OpenChannel with Two Cylinders in icoFoam (https://www.cfd-online.com/Forums/openfoam-solving/120406-openchannel-two-cylinders-icofoam.html)

 jimbean July 6, 2013 06:36

OpenChannel with Two Cylinders in icoFoam

1 Attachment(s)
Hi,

I am trying to set up a case, like cavity, in icoFoam folder.

The case is to simulate 3D water flow around two tandem cylinders in open channel.

The mesh is generated with Gridgen (see attached figure, top view), hexahedral.

The left is inlet boundary and right is outlet boundary. The surface give symmetry boundary and the side and bottom wall are wall boundary.

velocity-inlet-4
{
type patch;
nFaces 56;
startFace 16992;
}
wall-5
{
type wall;
nFaces 4120;
startFace 17048;
}
symmetry-6
{
type symmetryPlane;
inGroups 1(symmetryPlane);
nFaces 3528;
startFace 21168;
}
outflow-8
{
type patch;
nFaces 56;
startFace 24696;
}

Initial boundary: P
dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
velocity-inlet-4
{
}

wall-5
{
}
outflow-8
{
type fixedValue;
value uniform 0;
}
symmetry-6
{
type symmetryPlane;
}
}

U
dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
velocity-inlet-4
{
type fixedValue;
value uniform (0.1 0 0);
}
outflow-8
{
}
symmetry-6
{
type symmetryPlane;
}
wall-5
{
type fixedValue;
value uniform (0 0 0);
}

}

I also changed the deltaT to make sure the Courant number is less than 1.
For the fvschemes and fvsolution i didn't change them.

With these modifies, i run the checkMesh. The mesh is ok.
And the icoFoma,
The Courant number increases too high and make the calculation break down.

Could anyone help me out?

Best

 nimasam July 6, 2013 10:34

Hello

maybe assign an appropriate initial condition help for numerical convergence,
i suggest to use for example:
for U:
Quote:
 internalField uniform (0.1 0 0);

 jimbean July 6, 2013 10:50

Hi Nima,

I tried to change the initial condition you suggested, but it still has the same problem.

Now I post the error message

Courant Number mean: 4.27005e+101 max: 1.43938e+104
#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 double Foam::sumProd<double>(Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
#4 Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#5
at ??:?
#6
at ??:?
#7
at ??:?
#8
at ??:?
#9
at ??:?
#10 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#11
at ??:?
Floating point exception (core dumped)

Quote:
 Originally Posted by nimasam (Post 438135) Hello maybe assign an appropriate initial condition help for numerical convergence, i suggest to use for example: for U: also post your error log file, it may help OpenFOAM users to help you

 nimasam July 6, 2013 12:33

use a very small time step for example 1e-6 or 1e-08

 subhsngh July 6, 2013 14:47

no it does not work i am having the same problem

 nimasam July 6, 2013 15:09

 subhsngh July 6, 2013 17:01

Time = 0.000145

Courant Number mean: 1.41367e+82 max: 1.17207e+86
DILUPBiCG: Solving for Ux, Initial residual = 0.999949, Final residual = 5.82071, No Iterations 1001
DILUPBiCG: Solving for Uy, Initial residual = 0.999934, Final residual = 6.42952, No Iterations 1001
DILUPBiCG: Solving for Uz, Initial residual = 0.999958, Final residual = 4.32912, No Iterations 1001
DICPCG: Solving for p, Initial residual = 1, Final residual = 23.5112, No Iterations 1001
time step continuity errors : sum local = 1.55446e+90, global = 1.20778e+75, cumulative = 1.20778e+75
DICPCG: Solving for p, Initial residual = 0.946822, Final residual = 8.63811, No Iterations 1001
time step continuity errors : sum local = 2.01094e+92, global = -3.33867e+76, cumulative = -3.2179e+76
ExecutionTime = 1546.13 s ClockTime = 1553 s

Time = 0.00015

Courant Number mean: 3.61103e+92 max: 4.64632e+96
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 double Foam::sumProd<double>(Foam::UList<double> const&, Foam::UList<double> const&) in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4 Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#5
in "/opt/openfoam220/platforms/linux64GccDPOpt/bin/icoFoam"
#6
in "/opt/openfoam220/platforms/linux64GccDPOpt/bin/icoFoam"
#7
in "/opt/openfoam220/platforms/linux64GccDPOpt/bin/icoFoam"
#8
in "/opt/openfoam220/platforms/linux64GccDPOpt/bin/icoFoam"
#9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10
in "/opt/openfoam220/platforms/linux64GccDPOpt/bin/icoFoam"
Floating point exception (core dumped)

my delta t was 0.000005 u was 0.0001

 nimasam July 7, 2013 02:25

Dear

your solution does not converge in each iteration, look that after 1001 iteration your residual is uprising, i said post your whole case :) not just a few last error log :)

 subhsngh July 7, 2013 02:33

which files do u want

 nimasam July 7, 2013 02:39

post the contents of 0, constant and system ;) the whole case :P, then i can try it by my own :D

 subhsngh July 7, 2013 02:47

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

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

internalField uniform 0;

boundaryField
{
movingWall
{
}

fixedWalls
{
}

frontAndBack
{
}
}

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

 subhsngh July 7, 2013 02:49

directory 0
file u
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform (0 0 0);

boundaryField
{
movingWall
{
type fixedValue;
value uniform (0 0 1);
}

fixedWalls
{
type fixedValue;
value uniform (0 0 1);
}

frontAndBack
{
type fixedValue;
value uniform (0 0 0);
}
}

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

 subhsngh July 7, 2013 02:52

transportProperties

nu nu [ 0 2 -1 0 0 0 0 ] 0.01;

 subhsngh July 7, 2013 02:55

boundary
3
(
movingWall
{
type patch;
nFaces 10;
startFace 252345;
}
fixedWalls
{
type patch;
nFaces 10;
startFace 252355;
}
frontAndBack
{
type patch;
nFaces 25198;
startFace 252365;
}
)

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

 subhsngh July 7, 2013 03:27

case

3 Attachment(s)
i have created a cylicrical mesh with inlet and outlet of radius 100 and diam,eter of 1000

 jimbean July 7, 2013 07:55

4 Attachment(s)
Hi Nimasam,

I have attached constant folders.
Since the size of constant folds exceed the limitation, i split it into four.
Due to the upload file type, i add .tar.gz suffix to each split file, so first please delete the suffix .tar.gz and then
Using
cat constant* > constant.tar.gz
to recover the constant files.

Quote:
 Originally Posted by nimasam (Post 438157) post your case here

 jimbean July 7, 2013 07:57

2 Attachment(s)
Here is the 0 and system folders.

Quote:
 Originally Posted by nimasam (Post 438157) post your case here

 nimasam July 7, 2013 07:59

you could create a zip file, and you could upload it!, if its size was more than site allowed upload size, you could use dropbox or 4shared to upload your case :)

also it would be helpful for you to read this post, it shows you how to post in forum :) to receive much more help

 jimbean July 7, 2013 08:37

Hi Nimasam,

Thanks for the suggestion.
Could you help me check this case?