blueCFD / Core

Coordination repository for the blueCFD-Core: Issue tracking, Wiki, project webpage and miscellaneous scripts
http://bluecfd.github.io/Core
49 stars 10 forks source link

simpleFoam running with error #125

Closed ymg2007 closed 4 years ago

ymg2007 commented 5 years ago

Hi guys, I am doing cfd simulation using blueCFD 2017-2. Yesterday simpleFoam ran with error suddenly. I uninstalled and installed blueCFD again. The error still here. Please tell me how to fix it

21223@DESKTOP-4NPO7P8 MINGW64 OpenFOAM-5.x /c/Users/21223/butterfly/outdoor_airflow_pudong $ simpleFoam /---------------------------------------------------------------------------\ | ========= | | | \ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \ / O peration | Version: 5.x | | \ / A nd | Web: www.OpenFOAM.org | | \/ M anipulation | | *---------------------------------------------------------------------------/ / Windows 32 and 64 bit porting by blueCAPE: http://www.bluecape.com.pt \ | Based on Windows porting (2.0.x v4) by Symscape: http://www.symscape.com | *---------------------------------------------------------------------------/ Build : 5.x-963176928289 Exec : C:/PROGRA~1/BLUECF~1/OpenFOAM-5.x/platforms/mingw_w64GccDPInt32Opt/bin/simpleFoam.exe Date : Jul 03 2019 Time : 18:36:39 Host : "DESKTOP-4NPO7P8" PID : 1776 I/O : uncollated Case : C:/Users/21223/butterfly/outdoor_airflow_pudong nProcs : 1 SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10) allowSystemOperations : Allowing user-supplied system call operations

// * // Create time

Create mesh for time = 2

SIMPLE: convergence criteria field nut tolerance 0.0001 field k tolerance 0.0001 field U tolerance 0.0001 field p tolerance 0.0001 field epsilon tolerance 0.0001

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian Selecting turbulence model type RAS Selecting RAS turbulence model kOmega RAS { RASModel kOmega; turbulence on; printCoeffs on; betaStar 0.09; beta 0.072; gamma 0.52; alphaK 0.5; alphaOmega 0.5; }

No MRF models present

No finite volume options present

Starting time loop

Time = 3

smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 0.0008738672, No Iterations 1 smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 0.00087386984, No Iterations 1 smoothSolver: Solving for Uz, Initial residual = 1, Final residual = 0.0014404024, No Iterations 1 Generating stack trace...

Backtrace: ZN10StackTraceC1Ev [0x705c1465+0x25] module: C:\PROGRA~1\BLUECF~1\ThirdParty-5.x\platforms\mingw_w64GccDPInt32\lib\libstack_trace.dll ZN4Foam5error10printStackERNS_7OstreamE [0x1131c88+0x218] module: C:\PROGRA~1\BLUECF~1\OpenFOAM-5.x\platforms\mingw_w64GccDPInt32Opt\lib\libOpenFOAM.dll ZN4Foam6sigFpe13sigFpeHandlerEi [0x1132af3+0x33] module: C:\PROGRA~1\BLUECF~1\OpenFOAM-5.x\platforms\mingw_w64GccDPInt32Opt\lib\libOpenFOAM.dll (No symbol) [0x403cad] module: C:\PROGRA~1\BLUECF~1\OpenFOAM-5.x\platforms\mingw_w64GccDPInt32Opt\bin\simpleFoam.exe _C_specific_handler [0x7ff9f4287c58+0x98] module: C:\WINDOWS\System32\msvcrt.dll 0_chkstk [0x7ff9f698f7dd+0x11d] module: C:\WINDOWS\SYSTEM32\ntdll.dll RtlWalkFrameChain [0x7ff9f68fd856+0x13f6] module: C:\WINDOWS\SYSTEM32\ntdll.dll KiUserExceptionDispatcher [0x7ff9f698e70e+0x2e] module: C:\WINDOWS\SYSTEM32\ntdll.dll ZNK4Foam10GAMGSolver5scaleERNS_5FieldIdEES3_RKNS_9lduMatrixERKNS_10FieldFieldIS1_dEERKNS_8UPtrListIKNS_17lduInterfaceFieldEEERKS2_h [0xfe7a64+0xb4] module: C:\PROGRA~1\BLUECF~1\OpenFOAM-5.x\platforms\mingw_w64GccDPInt32Opt\lib\libOpenFOAM.dll ZNK4Foam10GAMGSolver6VcycleERKNS_7PtrListINS_9lduMatrix8smootherEEERNS_5FieldIdEERKS8_S9_S9_S9_S9_S9_RNS1_IS8_EESD_h [0xfeaa6e+0x7fe] module: C:\PROGRA~1\BLUECF~1\OpenFOAM-5.x\platforms\mingw_w64GccDPInt32Opt\lib\libOpenFOAM.dll ZNK4Foam10GAMGSolver5solveERNS_5FieldIdEERKS2_h [0xfec92f+0x36f] module: C:\PROGRA~1\BLUECF~1\OpenFOAM-5.x\platforms\mingw_w64GccDPInt32Opt\lib\libOpenFOAM.dll ZN4Foam8fvMatrixIdE15solveSegregatedERKNS_10dictionaryE [0x65ef1c17+0x127] module: C:\PROGRA~1\BLUECF~1\OpenFOAM-5.x\platforms\mingw_w64GccDPInt32Opt\lib\libfiniteVolume.dll (No symbol) [0x42d551] module: C:\PROGRA~1\BLUECF~1\OpenFOAM-5.x\platforms\mingw_w64GccDPInt32Opt\bin\simpleFoam.exe (No symbol) [0x42d84c] module: C:\PROGRA~1\BLUECF~1\OpenFOAM-5.x\platforms\mingw_w64GccDPInt32Opt\bin\simpleFoam.exe (No symbol) [0x44e342] module: C:\PROGRA~1\BLUECF~1\OpenFOAM-5.x\platforms\mingw_w64GccDPInt32Opt\bin\simpleFoam.exe (No symbol) [0x4013f7] module: C:\PROGRA~1\BLUECF~1\OpenFOAM-5.x\platforms\mingw_w64GccDPInt32Opt\bin\simpleFoam.exe (No symbol) [0x40152b] module: C:\PROGRA~1\BLUECF~1\OpenFOAM-5.x\platforms\mingw_w64GccDPInt32Opt\bin\simpleFoam.exe BaseThreadInitThunk [0x7ff9f3be4034+0x14] module: C:\WINDOWS\System32\KERNEL32.DLL RtlUserThreadStart [0x7ff9f6963691+0x21] module: C:\WINDOWS\SYSTEM32\ntdll.dll

wyldckat commented 5 years ago

Quick answer: The first thing you can look for in the text is "sigFpe", which you can find in "ZN4Foam6sigFpe13sigFpeHandlerEi". This means that the Signal for Floating Point Exception (sigFPE) was triggered, which usually refers to a division by zero or square root of -1.

The reason is found a few lines below:

Since the output tells us that it was able to solve the U equation before crashing, and simpleFoam was used, that means that it crashed the pressure equation could not be solved properly.

Now, the problem is that since this is simpleFoam, I don't remember of any specific situations that can lead to a division by zero or some other mathematical error. So perhaps the time steps 1 and 2 would give us a bit more insight into the past history of the simulation.

My guess is that something is incorrectly defined in the boundary conditions for the p (pressure) field, such as specifying 101325 in a boundary condition and 0 on all other boundaries and internal field. That would result in a massive pressure shock-wave that could not be properly solved for, hence the crash.

If you can provide the fields p and U, it would make it easier to diagnose the issue.

The other possibility is if the mesh is damaged. Run this command:

checkMesh -allGeometry -allTopology -constant

It will tell you if there are any cell volumes with negative or size 0, which would also justify this situation.

ymg2007 commented 4 years ago

Hi,wyldckat Sorry to reply you late. Here is the p and u file. p+U.zip After run check, there are 39 cells with negative volume. 20190710184559

wyldckat commented 4 years ago

The negative cells are likely the reason for the crash.

Furthermore, a few lines above, the Max aspect ratio is indicating 2.55e+101, which is a very crazy value and also likely responsible for the crash.

My guess is that there is something wrong with the CAD or the resulting STL file, that is used to mesh with snappyHexMesh or perhaps cfMesh. For example, duplicate triangles in the STL file can result in confusion on which side is which.

I'll close this report, since the error is clearly due to the mesh.