View Issue Details

IDProjectCategoryView StatusLast Update
0000307OpenFOAM[All Projects] Bugpublic2011-10-14 15:47
Reporteruser267Assigned Tohenry 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSUbuntuOS Version10.04
Product Version 
Fixed in Version 
Summary0000307: realizableKE crashes motorbike tutorial as well as my own cases - works in 1.7.1
DescriptionIn the motorbike simpleFoam tutorial, if I change to kEpsilon turbulence model, create an epsilon file in 0/, with a turbulentEpsilon of 0.0075, and add div(phi,epsilon) in fvSchemes and an epsilon dictionary in fvSolution, and all the other missing entries, I get it to work.

But if I change to realizableKE, then it fails.

I tried in 1.7.1 and it works.

This is consistent with other cases I have been running (or trying to run).
Steps To Reproducesee above
TagsNo tags attached.

Activities

user267

2011-10-05 14:00

 

log_motorbike.txt (3,287 bytes)
olivier@olivier-VirtualBox:~/OpenFOAM/olivier-2.0.1/run/motorBike$ simpleFoam
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.0.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.0.1-51f1de99a4bc
Exec   : simpleFoam
Date   : Oct 05 2011
Time   : 14:58:37
Host   : olivier-VirtualBox
PID    : 6150
Case   : /home/olivier/OpenFOAM/olivier-2.0.1/run/motorBike
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting RAS turbulence model realizableKE
realizableKECoeffs
{
    Cmu             0.09;
    A0              4;
    C2              1.9;
    sigmak          1;
    sigmaEps        1.2;
}


SIMPLE: no convergence criteria found. Calculations will run for 500 steps.


Starting time loop

Reading surface description:
    yNormal

Time = 1

smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 0.0594187, No Iterations 3
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 0.0948271, No Iterations 3
smoothSolver:  Solving for Uz, Initial residual = 1, Final residual = 0.048977, No Iterations 4
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.0769033, No Iterations 3
time step continuity errors : sum local = 0.00557725, global = 5.53354e-05, cumulative = 5.53354e-05
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigSegv::sigHandler(int) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2   in "/lib/libc.so.6"
#3  Foam::DimensionedField<Foam::Tensor<double>, Foam::volMesh>::DimensionedField(Foam::DimensionedField<Foam::Tensor<double>, Foam::volMesh>&, bool) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#4  Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::tmp<Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> > const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#5  Foam::incompressible::RASModels::realizableKE::correct() in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#6  
 in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/simpleFoam"
#7  __libc_start_main in "/lib/libc.so.6"
#8  
 in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/simpleFoam"
Segmentation fault
olivier@olivier-VirtualBox:~/OpenFOAM/olivier-2.0.1/run/motorBike$ 

log_motorbike.txt (3,287 bytes)

henry

2011-10-05 14:30

manager   ~0000685

The realizableKE model is very sensitive to mesh quality and you may find you need to generate a finer mesh for the motobitke to improve quality to use this model or you could select "Gauss pointLinear" as the scheme for grad(U) to ensure the cubic term in grad(U) in the model behaves more smoothly.

user267

2011-10-07 07:32

  ~0000698

Thank you Henry.
I will try that.
Kind regards
Olivier

user267

2011-10-07 08:38

  ~0000699

Hi Henry
It doesn't help to change to pointLinear in the gradient schemes.
I wonder one thing: if it is as you say then it should not work in 1.7.1 either. But the motorbike tutorial does work fine with the realizableKE in OpenFOAM 1.7.1.

I will try to see what changes have been done between the two versions.

Kind regards

Olivier

user267

2011-10-14 07:56

 

channel.tar (204,800 bytes)

user267

2011-10-14 08:03

  ~0000712

Hi Henry

I uploaded a channel.tar file containing a channel case that runs fine for OpenFOAM 1.7.1 with realizableKE (except that you need to run the blockMesh with blockMesh 2.0.1) but not with OpenFOAM 2.0.1 with realizableKE.

Run like this:
cp -r 0.org/* 0
blockMesh (from 2.0.1 otherwise it complains that the patches dictionary is missing)
potentialFoam -noFunctionObjects -writep
simpleFoam (for 1.7.1)
simpleFoam (for 2.0.1)

In the tar file there is a log file for OpenFOAM 1.7.1 and a log file for OpenFOAM 2.0.1 showing that it does work with OpenFOAM 1.7.1.

Kind regards

Olivier

henry

2011-10-14 14:57

manager   ~0000713

My understandeng from your initial post was that the realizableKE model runs for a while but that the case diverges and then crashes. Now that I run your simple case here I see that the crash is actually a segmentation fault which is an entirely different issue. Attaching the error message from the log would have been very helpful in assessing the problem and providing a fix quickly.

Further investigation shows that the problem is not to do with the realizableKE model per se but with the caching of grad(U) which is resolved by

commit 0dbedd3676028dedc199623836f4e745c9f027f0

user267

2011-10-14 15:15

  ~0000714

Hi

Thanks Henry, but what do you mean by "Further investigation shows that the problem is not to do with the realizableKE model per se but with the caching of grad(U) which is resolved by

commit 0dbedd3676028dedc199623836f4e745c9f027f0"

Where can I find out what "commit 0dbedd3676028dedc199623836f4e745c9f027f0" means?

Sorry to be a bother about this. Just new to Mantis I guess.

Kind regards

Olivier

henry

2011-10-14 15:47

manager   ~0000715

commit 0dbedd3676028dedc199623836f4e745c9f027f0 is the commit into the OpenFOAM-2.0.x git repository corresponding to the bug fix for your problem.

See http://www.openfoam.org/git.php and https://github.com/OpenFOAM/OpenFOAM-2.0.x

Issue History

Date Modified Username Field Change
2011-10-05 14:00 user267 New Issue
2011-10-05 14:00 user267 File Added: log_motorbike.txt
2011-10-05 14:30 henry Note Added: 0000685
2011-10-07 07:32 user267 Note Added: 0000698
2011-10-07 08:38 user267 Note Added: 0000699
2011-10-14 07:56 user267 File Added: channel.tar
2011-10-14 08:03 user267 Note Added: 0000712
2011-10-14 14:57 henry Note Added: 0000713
2011-10-14 14:57 henry Status new => resolved
2011-10-14 14:57 henry Resolution open => fixed
2011-10-14 14:57 henry Assigned To => henry
2011-10-14 15:15 user267 Note Added: 0000714
2011-10-14 15:15 user267 Status resolved => feedback
2011-10-14 15:15 user267 Resolution fixed => reopened
2011-10-14 15:47 henry Note Added: 0000715
2011-10-14 15:47 henry Status feedback => resolved
2011-10-14 15:47 henry Resolution reopened => fixed