CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Bugs

laplacian(tensor,tensor) seg faults

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By jfw_cfd

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 17, 2011, 15:34
Default laplacian(tensor,tensor) seg faults
  #1
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 17
kmooney is on a distinguished road
Hello All,

In a recent attempt to implement a tensor based viscosity field I ran into a problem with taking a Laplacian involving two volTensorFields. To perform some more simplified testing I altered laplacianFoam with the following:

Code:
        for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
        {
            solve
            (
                fvm::ddt(tau) - fvm::laplacian(dTau, tau)
            );
        }
where dTau and tau are both volTensorFields. I get a segfault within the HashTable lib. Below is the stack trace I get from my development code which is a little more comprehensive than the one that laplacianFoam gives me but crashes at the same point.

Code:
#0  0x00007ffff76e8850 in Foam::HashTable<Foam::tmp<Foam::fv::laplacianScheme<Foam::Vector<double>, Foam::Tensor<double> > > (*)(Foam::fvMesh const&, Foam::Istream&), Foam::word, Foam::string::hash>::find (this=0x0, key=...) at /home/kmooney/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/HashTable.C:177
#1  0x00007ffff76de993 in Foam::fv::laplacianScheme<Foam::Vector<double>, Foam::Tensor<double> >::New (mesh=..., schemeData=...)
    at /home/kmooney/OpenFOAM/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude/laplacianScheme.C:73
#2  0x00007ffff76d646b in Foam::fvm::laplacian<Foam::Vector<double>, Foam::Tensor<double> > (gamma=..., vf=..., name=...)
    at /home/kmooney/OpenFOAM/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude/fvmLaplacian.C:220
#3  0x00007ffff76cf35d in Foam::fvm::laplacian<Foam::Vector<double>, Foam::Tensor<double> > (tgamma=..., vf=..., name=...)
    at /home/kmooney/OpenFOAM/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude/fvmLaplacian.C:233
#4  0x00007ffff76c99be in Foam::LPTT::divTau (this=0x4c9c430, U=...) at viscoelasticLaws/LPTT/LPTT.C:146
#5  0x00007ffff7790ad6 in Foam::multiMode::divTau(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&) const ()
   from /home/kmooney/OpenFOAM/OpenFOAM-1.6-ext/lib/linux64GccDPOpt/libviscoelasticTransportModels.so
#6  0x00007ffff76c6e89 in Foam::viscoelasticModel::divTau(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&) const ()
   from /home/kmooney/OpenFOAM/OpenFOAM-1.6-ext/lib/linux64GccDPOpt/libviscoelasticTransportModels.so
#7  0x000000000041bbf1 in main ()
I'm a tad confused because the code compiles just fine and the Programmer's Guide says that those fields are accepted by FOAM in both implicit and explicit laplacian schemes. Also note that this error occurs even if all of the tensor fields are zeros. Does anyone have any idea as to why this is happening? Thanks a lot for any insight you guys might have for me.

Last edited by kmooney; November 17, 2011 at 17:43.
kmooney is offline   Reply With Quote

Old   November 18, 2011, 02:05
Default
  #2
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
Maybe this bugreport can help you out, which is very similar:
http://www.openfoam.com/mantisbt/view.php?id=305
Maybe for the solution you have to look in the same direction.
Bernhard is offline   Reply With Quote

Old   November 18, 2011, 12:33
Default
  #3
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
FYI: bugs should be reported on the bug tracker, so that developers can see them.

OpenFOAM: http://www.openfoam.com/mantisbt/main_page.php

OpenFOAM-ext: http://sourceforge.net/apps/mantisbt.../main_page.php

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   November 18, 2011, 12:36
Default
  #4
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 17
kmooney is on a distinguished road
Perfect!

Thanks a lot Bernhard and Alberto.

I didn't post it to the bug tracker outright because I figured I was doing something wrong.

It appears that Henry W. fixed it in 2.0.x but the fix hasn't been propagated to the extend branch. I'll post a bug report on it now. I fixed it locally in 1.6-ext in the same manner that Henry did with no issues.
kmooney is offline   Reply With Quote

Old   November 26, 2013, 06:51
Default laplacian(tensor, tensor)
  #5
New Member
 
Johannes
Join Date: Mar 2011
Location: Austria
Posts: 12
Rep Power: 15
jfw_cfd is on a distinguished road
Hello all! Just to let everybody know (although the thread is quite old already and this problem does not arise in newer versions of OF):
The solution of henry posted here
http://www.openfoam.com/mantisbt/view.php?id=305
worked for me too

Problem:
Wanted to use the LRR-RSTM with the originally commented diffusion term in OF-1.6 (src/turbulenceModels/compressible/RAS/LRR/LRR.C)
Code:
- fvm::laplacian(Ceps_*rho_*(k_/epsilon_)*R_, epsilon_)
which compiles but gives a runtime error

Solution:
add the line
Code:
makeFvLaplacianTypeScheme(SS, symmTensor, symmTensor)    \
to laplacianScheme.H in
src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/

recompile the finiteVolume library and that's it!

The only strange thing which I could not resolve until now is, that it works fine in serial with Gauss linearUpwind scheme for divSchemes but not in parallel. In parallel I had to change the divSchemes to Gauss Gamma
wyldckat likes this.

Last edited by jfw_cfd; November 26, 2013 at 12:05.
jfw_cfd is offline   Reply With Quote

Old   November 26, 2013, 09:54
Default
  #6
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 17
kmooney is on a distinguished road
Thanks for the extra info on the div schemes! The fact that some schemes aren't functioning in parallel for this is suspicious.

cheers!
kmooney is offline   Reply With Quote

Old   November 26, 2013, 17:31
Default
  #7
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

@Johannes: Can you provide a simple test case?
And which OpenFOAM version/variant are you using?

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   November 27, 2013, 03:13
Default
  #8
New Member
 
Johannes
Join Date: Mar 2011
Location: Austria
Posts: 12
Rep Power: 15
jfw_cfd is on a distinguished road
Hi! Hello Bruno!

I use OpenFOAM-1.6.

Well, with respect to a simple test case, actually I did not try this on a simple case. My case is a stationary flame (so not that simple). I think one can reproduce this problem with any simple case using the LRR model, but with the diffusion term that originally is commented in OF-1.6
Code:
- fvm::laplacian(Ceps_*rho_*(k_/epsilon_)*R_, epsilon_)
instead of the "default" diffusion term
Code:
- fvm::laplacian(DepsilonEff(), epsilon_)
Concerning the mentioned problems with the diffSchemes, without having detailed knowledge in this topic, maybe it has something to do with
Code:
 tmp<surfaceInterpolationScheme<GType> > tinterpGammaScheme_;
 tmp<snGradScheme<Type> > tsnGradScheme_;
in laplacianScheme.H.

It seems that I just used the wrong schemes. But as I sad, in this topic I'm not an expert.
jfw_cfd is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory,CPU , page faults problems pk FLUENT 1 October 27, 2005 04:27


All times are GMT -4. The time now is 06:38.