|
[Sponsors] |
January 6, 2017, 15:04 |
SimpleFoam werid Error!
|
#1 |
Senior Member
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16 |
Hello Foamers,
I was using simpleFoam on a simple problem and came to an error that I don't understand what it means. The error is as follows ; Code:
#0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigFpe::sigHandler(int) at ??:? #2 in "/lib/x86_64-linux-gnu/libc.so.6" #3 acos in "/lib/x86_64-linux-gnu/libm.so.6" #4 at ??:? #5 at ??:? #6 at ??:? #7 at ??:? #8 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #9 at ??:? Floating point exception (core dumped) |
|
January 6, 2017, 15:39 |
|
#2 |
Member
Oleg Sutyrin
Join Date: Feb 2016
Location: Russia
Posts: 41
Rep Power: 10 |
It's segmentation fault. There is no way to tell more until you post the case you tried to run (whole case dir is best) here. And don't forget to tell what version of OpenFOAM you use.
|
|
January 7, 2017, 06:42 |
|
#3 |
Senior Member
|
Hi,
This is NOT segmentation fault, this is floating point exception in acos. According to man acos: Code:
SPECIAL VALUES acos(1) returns +0. acos(x) returns a NAN and raises the "invalid" floating-point exception for |x| > 1. |
|
January 7, 2017, 17:22 |
Thank you both for the reply!
|
#4 |
Senior Member
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16 |
I have added a volume source term to the momentum equation to be able to simulate the flow over a HAWT using the blade element theory. I don't really know why am trying to calculate acos of value greater than 1? I am a bit confused on what to do?
Thank you, |
|
January 7, 2017, 20:53 |
|
#5 | |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,272
Rep Power: 34 |
Quote:
Its not clear whether he is doing or openfoam is calculating acos of x greater than 1. The programmer has to be careful about it (who so ever programmed it). |
||
January 8, 2017, 03:40 |
|
#6 |
Senior Member
|
You have LOTS of choices:
1. Wait. Maybe in several days (weeks, months) you won't need the simulation. 2. Wait. Till someone with stronger mentalist powers comes to the thread, guesses your set up, guesses your modifications, and posts solution. 3. Go to $FOAM_SRC and run `ack acos`, through this you learn that in general, when using acos OpenFOAM limits argument except: Code:
applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/Lamb/Lamb.C applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/Lamb/Lamb.C applications/utilities/mesh/conversion/star3ToFoam/createCoupleMatches.C applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertFeaturePoints.C applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C applications/utilities/surface/surfaceCoarsen/bunnylod/vector.C applications/utilities/surface/surfaceCoarsen/bunnylod/vector.h src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C src/OpenFOAM/primitives/Tensor/tensor/tensor.C src/OpenFOAM/primitives/quaternion/quaternion.C src/OpenFOAM/primitives/quaternion/quaternionI.H src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C src/lagrangian/spray/submodels/BreakupModel/ETAB/ETAB.C src/lagrangian/spray/submodels/BreakupModel/TAB/TAB.C src/mesh/blockMesh/curvedEdges/arcEdge.C src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C src/meshTools/primitiveMeshGeometry/primitiveMeshGeometry.C 4. You can post your case description and case files, so people can check if you made some obvious error in case description, or just run your case and look for error. Though this could be problematic if your are under NDA. 5. Run simulation with debug version of OpenFOAM, so instead of your truncated printStack (and looking at you printStack output: do you run OpenFOAM 2.2.x?), you get output with method names and locations in the code. So you can learn, which method is calling acos. I stop here, 5 variants are enough to start. Last edited by alexeym; January 8, 2017 at 15:08. |
|
January 8, 2017, 03:43 |
|
#7 |
Senior Member
|
||
January 8, 2017, 14:11 |
Grid issue...
|
#8 |
Member
OpenFoam
Join Date: Jun 2016
Posts: 82
Rep Power: 9 |
Hello Tareqkh,
I think the issue could be relevant to the mesh. Best, |
|
January 8, 2017, 15:16 |
|
#9 |
Senior Member
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16 |
Dear Alexy,
What this error is telling from your experience? Code:
#0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigFpe::sigHandler(int) at ??:? #2 in "/lib/x86_64-linux-gnu/libc.so.6" #3 in "/lib/x86_64-linux-gnu/libm.so.6" #4 exp in "/lib/x86_64-linux-gnu/libm.so.6" #5 at ??:? #6 at ??:? #7 at ??:? #8 at ??:? #9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #10 at ??:? Floating point exception (core dumped) |
|
January 8, 2017, 15:30 |
|
#10 |
Senior Member
|
Is it some kind of joke?
|
|
January 8, 2017, 15:31 |
|
#11 |
Senior Member
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16 |
Code:
You have LOTS of choices: 1. Wait. Maybe in several days (weeks, months) you won't need the simulation. Code:
You have LOTS of choices: 2. Wait. Till someone with stronger mentalist powers comes to the thread, guesses your set up, guesses your modifications, and posts solution. Thank you, |
|
January 8, 2017, 15:38 |
|
#12 |
Senior Member
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16 |
What do you mean? I want to know the main reason of the error because when I ran the same case using different rotational speed, it worked.
The main simulation is using the actuator disk model to simulate the flow over a wind turbine. I am using fixed wind speed with different rotational speed to obtain different tip speed so that I can build the power curve of the wind turbine. I am experiencing this issue when I increase the rotation speed, which corresponds to values above 4. That's why I posted the error to know what could be the reason and am thankful for your help. Best, |
|
January 8, 2017, 15:39 |
|
#13 |
Senior Member
|
I am not. And in fact I do not have to. I will just run set of standard tests and then try to figure out, where you call acos and why absolute value of argument is greater then 1. But if familiarity with BEM theory is a requirement for posting case files, then no, do not post them.
|
|
January 8, 2017, 15:42 |
|
#14 | |
Senior Member
|
Quote:
Code:
SPECIAL VALUES ... For all these functions, a range error occurs if the magnitude of x is too large. Code:
Errors See math_error(7) for information on how to determine whether an error has occurred when calling these functions. The following errors can occur: Range error, overflow errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised. Range error, underflow errno is set to ERANGE. An underflow floating-point exception (FE_UNDERFLOW) is raised. |
||
January 8, 2017, 15:50 |
|
#15 |
Senior Member
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16 |
Thanks again for your help and hints.
Code:
I do not know why you are trying to exponentiate very large value. I am trying to do a validation study and in the paper that am trying to validate with, they used fixed wind speed to create the power curve. Therefore, to get different tip speed ratios, I have to change the rotational speed to match their results. Best, |
|
January 8, 2017, 20:24 |
|
#16 |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,272
Rep Power: 34 |
First it was cos then it is exp so from it, it seems that the actual problem happenmuch earlier than these places where the values are blown up.
So the good news is that you calculation has diverged which is something could be fixed and not a programming bug. Bad news is that simulation is diverged and you don't know why. My advise try playing with under-relaxation, courant criteria etc etc. Good luck. |
|
January 8, 2017, 20:42 |
|
#17 |
Senior Member
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16 |
Dear Arjun,
Many thanks for the hint. It might solve the issue. I will give it a try and let you know how it goes. Another issue you might know is about running in parallel and monitor the results. When I run the code (Actuator disk + simpleFoam) in single core and monitor the results i.e. forces using "log.simpleFoam", the code outputs the value. However, when I run the solver in parallel, all forces in the "log.simpleFoam" become zero even after use reconstruct. What could be the issue? Best, |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFOAM without MPI | kokizzu | OpenFOAM Installation | 4 | May 26, 2014 09:17 |
Ansys Fluent 13.0 UDF compilation problem in Window XP (32 bit) | Yogini | Fluent UDF and Scheme Programming | 7 | October 3, 2012 07:24 |
[swak4Foam] groovyBC: problems compiling: "flex: not found" and "undefined reference to ..." | sega | OpenFOAM Community Contributions | 12 | February 17, 2010 09:30 |
Installation OF1.5-dev | ttdtud | OpenFOAM Installation | 46 | May 5, 2009 02:32 |
Problem with compile the setParabolicInlet | ivanyao | OpenFOAM Running, Solving & CFD | 6 | September 5, 2008 20:50 |