# Bug in enterDymFoam?

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

 March 5, 2012, 15:37 Bug in enterDymFoam? #1 New Member   Serge Shlump Join Date: Oct 2011 Posts: 24 Rep Power: 5 Hi While working on custom solver based on enterDymFoam and erfConvectiveMeltingPimpleFoam found some strange thing in pEqn.H file in the enterDymFoam directory : ------------ p == p_rgh + rho*gh; if (p_rgh.needReference()) { p += dimensionedScalar ( "p", p.dimensions(), pRefValue - getRefCellValue(p, pRefCell) ); p_rgh = p - rho*gh; } -------------------- Does p == p_rgh + rho*gh do anything or just return Bool ? Sorry for stupid question ps: openfoam v 2.1

 March 6, 2012, 03:17 #2 Senior Member   Nima Sam Join Date: Sep 2009 Location: Tehran, Iran Posts: 1,123 Blog Entries: 1 Rep Power: 14 as you may know! p contains gravity term, so p == p_rgh + rho*gh add the term rho*gh (gravity term ) into p_rgh ( pressure with out gravity term) if your question is about "==" vs "=", it returns to definition of "==" which update both internalField and boundary condition of p vs "=" just update the internalField

March 6, 2012, 03:41
#3
New Member

Serge Shlump
Join Date: Oct 2011
Posts: 24
Rep Power: 5
Quote:
 Originally Posted by nimasam as you may know! p contains gravity term, so p == p_rgh + rho*gh add the term rho*gh (gravity term ) into p_rgh ( pressure with out gravity term) if your question is about "==" vs "=", it returns to definition of "==" which update both internalField and boundary condition of p vs "=" just update the internalField

Yes, the question was about "==". In C++ basicly "==" is a comparison operator, returns true or false. Do you mean that it was overloaded somewhere?
Sorry again for stupid question i'm very beginner in openfoam & c++ .

Last edited by som; March 6, 2012 at 04:27.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Aleksey_R OpenFOAM Bugs 19 September 18, 2012 07:50 som OpenFOAM 1 March 5, 2012 15:35 fs82 OpenFOAM Bugs 21 November 16, 2009 09:15 Mattijs Janssens (Mattijs) OpenFOAM 0 January 10, 2005 11:05 Jonas Larsson Main CFD Forum 1 January 5, 2000 11:22

All times are GMT -4. The time now is 17:13.