|
[Sponsors] |
September 2, 2010, 03:23 |
mutRoughWallFunction on OF 1.7.0
|
#1 |
New Member
Olivier Macchion
Join Date: Jun 2010
Posts: 12
Rep Power: 16 |
Hello
I tried to set up a rough wall for a run with buoyantSimpleFoam in OF 1.7 using the syntax: wall { type mutRoughWallFunction; Ks uniform 0.005; Cs uniform 0.5; value uniform 0; } and I got this error message after starting buoyantSimpleFoam: Selecting RAS turbulence model realizableKE #0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam170/lib/linuxGccDPOpt/libOpenFOAM.so" #1 Foam::sigFpe::sigFpeHandler(int) in "/opt/openfoam170/lib/linuxGccDPOpt/libOpenFOAM.so" #2 Uninterpreted: #3 log in "/lib/tls/i686/cmov/libm.so.6" #4 Foam::compressible::RASModel::yPlusLam(double, double) const in "/opt/openfoam170/lib/linuxGccDPOpt/libcompressibleRASModels.so" #5 Foam::compressible::RASModels::mutRoughWallFunctio nFvPatchScalarField::calcMut() const in "/opt/openfoam170/lib/linuxGccDPOpt/libcompressibleRASModels.so" #6 Foam::compressible::RASModels::mutWallFunctionFvPa tchScalarField::updateCoeffs() in "/opt/openfoam170/lib/linuxGccDPOpt/libcompressibleRASModels.so" #7 Foam::fvPatchField<double>::evaluate(Foam::Pstream ::commsTypes) in "/opt/openfoam170/applications/bin/linuxGccDPOpt/buoyantSimpleFoam" #8 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::evaluate() in "/opt/openfoam170/applications/bin/linuxGccDPOpt/buoyantSimpleFoam" #9 Foam::compressible::RASModels::realizableKE::reali zableKE(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo const&) in "/opt/openfoam170/lib/linuxGccDPOpt/libcompressibleRASModels.so" #10 Foam::compressible::RASModel::adddictionaryConstru ctorToTable<Foam::compressible::RASModels::realiza bleKE>::New(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo const&) in "/opt/openfoam170/lib/linuxGccDPOpt/libcompressibleRASModels.so" #11 Foam::compressible::RASModel::New(Foam::GeometricF ield<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo const&) in "/opt/openfoam170/lib/linuxGccDPOpt/libcompressibleRASModels.so" #12 in "/opt/openfoam170/applications/bin/linuxGccDPOpt/buoyantSimpleFoam" #13 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6" #14 in "/opt/openfoam170/applications/bin/linuxGccDPOpt/buoyantSimpleFoam" Floating point exception Would someone know what the problem is? Everything works fine with mutWallFunction. I also tried to use mutRoughWallFunction in the hotroom tutorial for buoyantSimpleFoam but I got the same error message. I also tried this with rhoPorousSimpleFoam and got the same error message. Is this a bug or my lack of understanding of the use of mutRoughWallFunction? Cheers Olivier |
|
September 2, 2010, 04:09 |
|
#2 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
We've finally got a proper bug reporting system :-)
Please report any 1.7 bugs on http://www.openfoam.com/bugs. Thanks, Mattijs |
|
September 20, 2010, 12:27 |
same problem with 1.7.x (git of today)
|
#3 |
Member
Thomas Wolfanger
Join Date: Mar 2009
Location: South West Germany
Posts: 62
Rep Power: 17 |
Hi Olivier,
I checked your and andy's communication on the bug tracker; is the issue resolved for you? Background: I tried the same for rhoPorousSimpleFoam with the angledDuctImplicit tutorial case. All my efforts failed miserably and I did not get the case to run, even with initializing all values in the 0/mut file (error message below). Selecting RAS turbulence model kEpsilon #0 Foam::error:rintStack(Foam::Ostream&) in "/soft/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt/libOpenFOAM.so" #1 Foam::sigFpe::sigFpeHandler(int) in "/soft/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt/libOpenFOAM.so" #2 ?? in "/lib/libc.so.6" #3 ?? in "/lib/libm.so.6" #4 log in "/lib/libm.so.6" #5 Foam::compressible::RASModel::yPlusLam(double, double) const in "/soft/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt/libcompressibleRASModels.so" #6 Foam::compressible::RASModels::mutRoughWallFunctio nFvPatchScalarField::calcMut() const in "/soft/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt/libcompressibleRASModels.so" #7 Foam::compressible::RASModels::mutWallFunctionFvPa tchScalarField::updateCoeffs() in "/soft/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt/libcompressibleRASModels.so" #8 Foam::fvPatchField<double>::evaluate(Foam::Pstream ::commsTypes) in "/soft/OpenFOAM/OpenFOAM-1.7.x/applications/bin/linux64GccDPOpt/rhoPorousSimpleFoam" #9 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::evaluate() in "/soft/OpenFOAM/OpenFOAM-1.7.x/applications/bin/linux64GccDPOpt/rhoPorousSimpleFoam" #10 Foam::compressible::RASModels::kEpsilon::kEpsilon( Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo const&) in "/soft/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt/libcompressibleRASModels.so" #11 Foam::compressible::RASModel::adddictionaryConstru ctorToTable<Foam::compressible::RASModels::kEpsilo n>::New(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo const&) in "/soft/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt/libcompressibleRASModels.so" #12 Foam::compressible::RASModel::New(Foam::GeometricF ield<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo const&) in "/soft/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt/libcompressibleRASModels.so" #13 main in "/soft/OpenFOAM/OpenFOAM-1.7.x/applications/bin/linux64GccDPOpt/rhoPorousSimpleFoam" #14 __libc_start_main in "/lib/libc.so.6" #15 _start at /build/buildd/eglibc-2.10.1/csu/../sysdeps/x86_64/elf/start.S:116 Floating point exception To my surprise the case ran through valgrind; I'm in no way an expert what this could mean, but probably an initialisation issue exists. What else did you change to get the case running? Regards, -- Thomas |
|
September 21, 2010, 03:06 |
I initialized with mutWallFunction
|
#4 |
New Member
Olivier Macchion
Join Date: Jun 2010
Posts: 12
Rep Power: 16 |
Hello
I ran the case with mutWallFunction for about 100 iterations, then I switched to mutRoughWallFunction. But I did that on my own case, not the tutorial. But it should work: it is indeed an initialization problem. But it is weird that it would affect the solution so strongly. Kind regards Olivier |
|
September 21, 2010, 04:30 |
Problem found (but not understood)
|
#5 |
Member
Thomas Wolfanger
Join Date: Mar 2009
Location: South West Germany
Posts: 62
Rep Power: 17 |
Hi,
thanks for your input, Olivier. Sadly, this did not work for me so I tried to track down this issue. The problem comes from ypl getting negative at around line 166 of file RASModel.C, so catching this resolves the issue technically; however I do not know what this means physically, i.e. whether an error may be introduced here. Maybe someone having more insight into the OF internals can comment on this. Best regards, -- Thomas |
|
November 10, 2010, 12:23 |
trying to use mutRoughWallFunction with kOmegaSST in rhoSimpleFoam
|
#6 |
Senior Member
|
I got same messages when trying to use mutRoughWallFunction with kOmegaSST in rhoSimpleFoam.
Is it a confirmed bug? Did someone know how to use wall functions wiht roughness? |
|
November 10, 2010, 14:06 |
|
#7 |
Senior Member
|
just try
Code:
export FOAM_SIGFPE=false Code:
unset FOAM_SIGFPE |
|
November 12, 2010, 04:05 |
|
#8 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
find the file RASModel.C
in src/turbulenceModels/compressible/RAS/RASModel and modify the line to calculate ypl to whats below Code:
scalar RASModel::yPlusLam(const scalar kappa, const scalar E) const { scalar ypl = 11.0; for (int i=0; i<10; i++) { ypl = log(max(E*ypl,1.0))/kappa; } return ypl; } and type wmake libso now try it again. Does that work better? |
|
November 12, 2010, 09:47 |
Other bugs in model implemented in mutRoughWallFuntion
|
#9 | |
Senior Member
|
Quote:
Thank you. It makes sense in order to prevent log(0) calculation. I will implement it anyway. However, I have found another potential bugs in equations of mutRoughWallFunction. The implementation does not reflect the mathematical modelling found in some references:
In order to fix that bug, I implemented additional changes to the code, which I called mymutRoughWallFunctionFvPatchScalarField.C. As you can see, I commented out the original lines for reference and traceability. Code:
tmp<scalarField> mymutRoughWallFunctionFvPatchScalarField::calcMut() const { const label patchI = patch().index(); const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); const scalarField& y = rasModel.y()[patchI]; const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; const tmp<volScalarField> tk = rasModel.k(); const volScalarField& k = tk(); const scalarField& muw = rasModel.mu().boundaryField()[patchI]; const scalar Cmu25 = pow(Cmu_, 0.25); tmp<scalarField> tmutw(new scalarField(*this)); scalarField& mutw = tmutw(); forAll(mutw, faceI) { label faceCellI = patch().faceCells()[faceI]; scalar uStar = Cmu25*sqrt(k[faceCellI]); scalar yPlus = uStar*y[faceI]/(muw[faceI]/rhow[faceI]); scalar KsPlus = uStar*Ks_[faceI]/(muw[faceI]/rhow[faceI]); // scalar Edash = E_; scalar Edash = 0; scalar yPlusLamNew = yPlusLam_; if (KsPlus > 2.25) { /* it was yPlusLamNew = rasModel.yPlusLam(kappa_, Edash); Edash /= fnRough(KsPlus, Cs_[faceI]);*/ /* it becomes */ Edash = 1/kappa_*log(fnRough(KsPlus, Cs_[faceI])); yPlusLamNew = rasModel.yPlusLam(kappa_, E_); } if (debug) { Info<< "yPlus = " << yPlus << ", KsPlus = " << KsPlus << ", Edash = " << Edash << ", yPlusLam = " << yPlusLam_ << endl; } if (yPlus > yPlusLamNew) { /* it was mutw[faceI] = muw[faceI]*(yPlus*kappa_/log(max(Edash*yPlus, 1+1e-4)) - 1); Calculation from OpenFOAM original mutWallFunction (smooth wall!!) mutw[faceI] = muw[faceI]*(yPlus*kappa_/log(E_*yPlus) - 1);*/ mutw[faceI] = muw[faceI]*(yPlus*kappa_/ log(max(E_*yPlus/exp(kappa_*Edash),1+1e-4)) - 1); } } return tmutw; } Regards, Guilherme |
||
November 12, 2010, 17:39 |
|
#10 |
Senior Member
|
E is a constant (non-zero).
yplus is 11 at the start and is calculated.... How does it go to zero anyway? |
|
June 14, 2011, 12:07 |
|
#11 |
Member
ak
Join Date: May 2011
Posts: 64
Rep Power: 15 |
Hi
I tried "unset FOAM_SIGFPE" in the .bashrc file followed by the “. $HOME/.bashrc” command, but when I run the case, I still get the following before the simulation starts: SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). SetNaN : Initialising allocated memory to NaN (FOAM_SETNAN). I tried "export FOAM_SIGFPE=false" as well but that didn't work either. Do we have to run ./Allwmake in the top-level source directory $WM_PROJECT_DIR as well? Can anyone who has successfully unset sigFpe provide the details? Sorry, it seems like it is easy to implement, but I am new to using OF, and would appreciate any help. Thanks so much. ak |
|
December 13, 2011, 08:11 |
|
#12 |
New Member
Join Date: May 2011
Posts: 8
Rep Power: 15 |
Hi all,
I have a quick and probably stupid question... I don't understans the code line: "scalar Edash /= E_" Even when E_ has not been initialised. Thank you in advance. Roger |
|
Tags |
wall functions |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFOAM 1.7.0 Released | opencfd | OpenFOAM Announcements from ESI-OpenCFD | 1 | May 26, 2011 04:09 |
mutRoughWallFunction | OMN | OpenFOAM | 1 | November 10, 2010 14:09 |
OpenFOAM 1.6.x, 1.7.0 and 1.7.x are not fully prepared to work with gcc-4.5.x | wyldckat | OpenFOAM Bugs | 18 | October 21, 2010 06:51 |
interFoam 1.7.0: continuityErrs.H in PSIO loop | idrama | OpenFOAM | 1 | July 8, 2010 03:56 |
Installation of OpenFOAM 1.7.0 on SLED10SP2 | olauer | OpenFOAM Installation | 2 | June 30, 2010 11:29 |