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/)
-   -   SimpleFoam error with mesh imported from salome (http://www.cfd-online.com/Forums/openfoam-solving/59259-simplefoam-error-mesh-imported-salome.html)

matteo December 28, 2007 10:45

Hi everybody, I have just sta
 
Hi everybody,
I have just started learning openFoam. I build my 3D geometry and mesh with the last version of Salome. I export the .unv mesh file from salome and, when I create my new case, I use the comand ideasUnvToFoam. The foam see all my path (inlet, outle, walls), but if I use all parameters that are in the tutorial case I've an error. I can start the simulation but after 10 iterations I've the following error:

Time = 10

DILUPBiCG: Solving for Ux, Initial residual = 0.327973, Final residual = 0.00456721, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0.530278, Final residual = 0.0182674, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 0.485783, Final residual = 0.00232816, No Iterations 1
DICPCG: Solving for p, Initial residual = 0.098474, Final residual = 0.000961256, No Iterations 19
time step continuity errors : sum local = 74.4859, global = -0.0263687, cumulative = -0.0955674
DILUPBiCG: Solving for epsilon, Initial residual = 0.647741, Final residual = 0.0354648, No Iterations 1
bounding epsilon, min: -4.74268e+07 max: 1.69375e+14 average: 5.66884e+09
DILUPBiCG: Solving for k, Initial residual = 0.875281, Final residual = 0.0186655, No Iterations 1
ExecutionTime = 17.57 s ClockTime = 19 s

End


matteo@mLaptop:~/OpenFOAM/matteo-1.4.1/run$ paraFoam . pitz3d
Finishing FoamXCaseServer::main(int argc, char **argv)
Finishing FoamXCaseBrowser::main(int argc, char **argv)
Killed
runFoamXHB : cleanup
runFoamXHB: Killing name server nsd(pid 7185).
ErrorMessage
# Error or warning: There was a VTK Error in file: /home/dm2/henry/OpenFOAM/linuxSrc/paraview-2.4.4/VTK/Filtering/vtkPolyLine.cxx (195)
vtkPolyLine (0xa7d2c38): Coincident points in polyline...can't compute normals
ErrorMessage end
ErrorMessage
# Error or warning: There was a VTK Error in file: /home/dm2/henry/OpenFOAM/linuxSrc/paraview-2.4.4/VTK/Filtering/vtkPolyLine.cxx (195)
vtkPolyLine (0xaf3faf8): Coincident points in polyline...can't compute normals
ErrorMessage end
ErrorMessage
# Error or warning: There was a VTK Error in file: /home/dm2/henry/OpenFOAM/linuxSrc/paraview-2.4.4/VTK/Filtering/vtkPolyLine.cxx (195)
vtkPolyLine (0xb1d4348): Coincident points in polyline...can't compute normals
ErrorMessage end

the value of K and epsilon are very big. I think that is an error becouse I import the mesh from salome, becouse I change these values several times.
Is there anyone that could send me an example of simplefoam in wich the mesh was imported from salome as .unv file?
My example is a pipe with several barriers, 1 inlet and 1 outle.
thanks
Matteo

matteo December 28, 2007 10:58

Sorry, The error is the follow
 
Sorry, The error is the following:

Time = 82

DILUPBiCG: Solving for Ux, Initial residual = 0.00061936, Final residual = 5.0371e-05, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0.000213536, Final residual = 1.52511e-05, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 0.000509604, Final residual = 3.71241e-05, No Iterations 1
DICPCG: Solving for p, Initial residual = 1.12769e-38, Final residual = 1.12769e-38, No Iterations 0
time step continuity errors : sum local = 5.88619e+38, global = 1.63508e+22, cumulative = -5.25472e+48
DILUPBiCG: Solving for epsilon, Initial residual = 7.2226e-12, Final residual = 7.2226e-12, No Iterations 0
bounding epsilon, min: 9.75837e-24 max: 9.17659e+107 average: 5.00769e+104
DILUPBiCG: Solving for k, Initial residual = 0.0255573, Final residual = 0.000408825, No Iterations 2
bounding k, min: -2.82612e+69 max: 6.67849e+84 average: 1.33321e+81
ExecutionTime = 104.53 s ClockTime = 110 s

Time = 83

DILUPBiCG: Solving for Ux, Initial residual = 0.656169, Final residual = 0.0141657, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0.594194, Final residual = 0.00976614, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 0.550379, Final residual = 0.00212849, No Iterations 1
DICPCG: Solving for p, Initial residual = 2.01318e-29, Final residual = 2.01318e-29, No Iterations 0
time step continuity errors : sum local = 2.64595e+47, global = 7.72602e+30, cumulative = -5.25472e+48
DILUPBiCG: Solving for epsilon, Initial residual = 2.50757e-26, Final residual = 2.50757e-26, No Iterations 0
bounding epsilon, min: 1.14422e-23 max: 6.47572e+125 average: 2.06266e+121
#0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) in "/home/matteo/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/home/matteo/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted: [0xffffe420]
#3 Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/home/matteo/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#4 Foam::fvMatrix<double>::solve(Foam::Istream&) in "/home/matteo/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libfiniteVolume.so"
#5 Foam::lduMatrix::solverPerformance Foam::solve<double>(Foam::tmp<foam::fvmatrix<doubl e> > const&) in "/home/matteo/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libincompressibleTurbule nceModels.so"
#6 Foam::turbulenceModels::kEpsilon::correct() in "/home/matteo/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libincompressibleTurbule nceModels.so"
#7 main in "/home/matteo/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/simpleFoam"
#8 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#9 Foam::regIOobject::readIfModified() in "/home/matteo/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/simpleFoam"
Floating point exception (core dumped)
matteo@mLaptop:~/OpenFOAM/matteo-1.4.1/run$

msrinath80 December 28, 2007 20:11

Please post the output of chec
 
Please post the output of checkMesh here.

matteo December 29, 2007 11:42

Hi, the output of the checkMes
 
Hi, the output of the checkMesh is the following. It's ok..

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

Exec : checkMesh . simplepipe
Date : Dec 29 2007
Time : 16:25:17
Host : mLaptop
PID : 6069
Root : /home/matteo/OpenFOAM/matteo-1.4.1/run
Case : simplepipe
Nprocs : 1
Create time

Create polyMesh for time = constant

Time = constant

Mesh stats
points: 3074
edges: 15865
faces: 23287
internal faces: 18693
cells: 10495
boundary patches: 3
point zones: 0
face zones: 0
cell zones: 0

Number of cells of each type:
hexahedra: 0
prisms: 0
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 10495
polyhedra: 0

Checking topology...
Boundary definition OK.
Point usage OK.
Upper triangular ordering OK.
Topological cell zip-up check OK.
Face vertices OK.
Face-face connectivity OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface
inlet 88 56 ok (not multiply connected)
outlet 88 56 ok (not multiply connected)
walls 4418 2231 ok (not multiply connected)

Checking geometry...
Domain bounding box: (0 -9.99921 -10) (119.998 300 10)
Boundary openness (6.18271e-17 6.83681e-18 4.09771e-17) OK.
Max cell openness = 1.38267e-16 OK.
Max aspect ratio = 23.41 OK.
Minumum face area = 0.720911. Maximum face area = 83.8558. Face area magnitudes OK.
Min volume = 0.4764. Max volume = 134.782. Total volume = 121072. Cell volumes OK.
Mesh non-orthogonality Max: 82.1246 average: 23.3904
*Number of severely non-orthogonal faces: 28.
Non-orthogonality check OK.
<<Writing 28 non-orthogonal faces to set nonOrthoFaces
Face pyramids OK.
Max skewness = 1.06138 OK.
Min/max edge length = 1.1386 20.0175 OK.
All angles in faces OK.
All face flatness OK.

Mesh OK.

End

msrinath80 December 29, 2007 16:20

I would not be so sure about t
 
I would not be so sure about that. In my experience even one badly skewed or severely non-orthogonal cell can sometimes totally screw up a simulation. I would try either of the following:

i) Add more non-orthogonal correctors in system/fvSolution

ii) Try to create a more reasonable (i.e. much lesser non-orthogonality) mesh. Check out some recommendations by Hrv concerning mesh non-orthogonality[1].

[1]

http://www.cfd-online.com/OpenFOAM_D...es/1/6169.html
http://www.cfd-online.com/OpenFOAM_D...es/1/3258.html


If possible, post a screenshot of your mesh here. Zoom around the region of severe non-orthogonality.

matteo December 31, 2007 04:04

Hi Srinath, thank you for your
 
Hi Srinath, thank you for your advice, but the problem wasn't this. I've a question for you..
I saw in the tutorial the in the blockMeshDict file there is the comand "convertToMeter 0.001".
So I build my geometry with Salome that work in mm. Must I specify the convertToMeter in my files of mesh? How and where?
I import the mesh with ideasUnvToFoam and so I haven't blockMeshDict file.
Could you help me?
thank you very much.

msrinath80 December 31, 2007 17:19

Usually these conversion progr
 
Usually these conversion programs like ideasUnvToFoam offer a -scale switch which you can use to convert and rescale at the same time. Check.

matteo January 2, 2008 04:24

Thanks Srinath, but where can
 
Thanks Srinath,
but where can I find the scale switch of ideasUnvToFoam? In wich file? I'm not expert user of Foam..

msrinath80 January 2, 2008 04:36

I just checked. There is no sc
 
I just checked. There is no scale switch in ideasUnvToFoam, but others like fluentMeshToFoam have it. Not sure what is the best way to proceed now. Just hold on. Perhaps someone will come up with a solution to your problem.

lucchini January 2, 2008 05:04

Dear Matteo, I am not an ex
 
Dear Matteo,

I am not an expert of SALOME, but if you run the checkMesh utility you will see the bounding box of your mesh expressed in meters. In this way you will understand which scale factor you have to use.

To scale the points of your mesh run the command

transformPoints <root> <case> -scale "(scaleFactorX scaleFactorY scaleFactorZ)"

where:

scaleFactorX, scaleFactorY and scaleFactorZ are the scale factors along the X, Y, and Z axes.

so if you created your case in millimeters and you want to convert it into meters you need to run something like:

transformPoints . simplepipe -scale "(1e-3 1e-3 1e-3)"

Is that ok?

Another important thing: if the simpleFoam code is crashing there might be also three other different reasons:

1) boundary condition set-up: check that the pressure and velocity b.c. are consistent

2) After converting the grid, please check that in the constant/polyMesh/boundary file what is a wall is set to

type wall

and not to

type patch

3) Under-relaxation factors and numerics

Please run the first 50-100 iterations with first-order numerical schemes (Gauss upwind phi and Gauss linear limited 0.5) and use an under-relaxation factor of 0.5 for velocity and 0.1 for all the other fields in the fvSolution dictionary. Then you can re-run the case from the last iteration with higher under-relaxation factors (0.2 for pressure, 0.8 for velocity, 0.4 for k and epsilon for example).

Please check also that you have correctly set the ddtSchemes to steadyState and not Euler.

Also set the relTol parameter in the fvSolution to 0.01 for the pressure and 0.1 for all the other fields.

I hope these suggestions might help, please have a look at the forum, you will find lots of posts about this topic.

Also have a look at the Dr. Jasak Thesis (you can download it at the www.foamcfd.org web site). In the first three chapters there is almost everything about boundary conditions setup and numerical schemes implemented in OpenFOAM.

Bye and happy new year to all the OpenFOAM community!

Tommaso


All times are GMT -4. The time now is 21:56.