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

Bug in rhoSimpleFOAM (OF-1.6.x)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 26, 2010, 09:01
Question Bug in rhoSimpleFOAM (OF-1.6.x)
  #1
New Member
 
Johannes Kneer
Join Date: Mar 2009
Location: Germany, Karlsruhe
Posts: 13
Rep Power: 17
johannesk is on a distinguished road
Hi,

lines 44 to 47 in OpenFOAM-1.6.x/applications/solvers/compressible/rhoSimpleFoam/pEqn.H read:
Code:
#44        if (nonOrth == nNonOrthCorr)
#45         {
#46            phi == pEqn.flux();
#47        }
I think line#46 should be an assignment not a comparison (also compare to line #77) and should be replaced with:
phi -= pEqn.flux();

I haven't fully gone through the whole rhoSimpleFoam code, so I'm not sure if my suggestion is physically correct. Can someone with more OF experience have a look at this?
johannesk is offline   Reply With Quote

Old   April 27, 2010, 03:18
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by johannesk View Post
]I think line#46 should be an assignment not a comparison (also compare to line #77) ...
For C++ non-primitives, an 'operator==' is not necessary a comparison.
Eg, http://foam.sourceforge.net/doc/Doxygen/html/classFoam_1_1GeometricField.html#6381380e7eabc0bb2 2e86f2513a2c1d5
and http://foam.sourceforge.net/doc/Doxy...ce.html#l01090
olesen is offline   Reply With Quote

Old   April 27, 2010, 14:09
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
Let's say it's a confusing notation at a first sight
__________________
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

Reply

Tags
bug, flux, rhosimplefoam


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
Bug in turbulentHeatFluxTemperatureFvPatchScalarField; OF 1.6.x evrikon OpenFOAM Bugs 5 September 27, 2010 09:52
Question about rhoSimpleFoam "if (transonic)" universez OpenFOAM 4 April 17, 2010 11:21
Problem with rhoSimpleFoam mecbe2002 OpenFOAM 3 April 11, 2010 01:54
Serious bug in LES interface fs82 OpenFOAM Bugs 21 November 16, 2009 09:15
Forum y2k Bug Jonas Larsson Main CFD Forum 1 January 5, 2000 11:22


All times are GMT -4. The time now is 16:43.