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

p == p_rgh + rho*gh or p = p_rgh+rho*gh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 23, 2011, 18:55
Question p == p_rgh + rho*gh or p = p_rgh+rho*gh
  #1
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 18
wouter is on a distinguished road
Dear All,

My c++ is rusty so here the question:
in pEqn.H there is a statement:
p== p_rgh + rho*gh;
To my knowledge this gives true or false, but it is not assigned to anything.
It is an empty statement unless == is redefined somewhere (where?).
But why is a few lines down p_rgh = p - rho*gh; and not p_rgh == p-rho*gh;
OF170 and OF171
wouter is offline   Reply With Quote

Old   February 24, 2011, 04:52
Default
  #2
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
i guess!
== isnot equality here, it assigns all domains include boundary condition from left side to right side!!!!
but = just copy internalField values!
nimasam is offline   Reply With Quote

Old   February 24, 2011, 05:11
Default
  #3
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
Bernhard is on a distinguished road
Maybe this thread is helpfull
http://www.cfd-online.com/Forums/ope...-operator.html
Bernhard is offline   Reply With Quote

Old   February 24, 2011, 08:27
Default thanks
  #4
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 18
wouter is on a distinguished road
Sorry I did not find this thread, but thanks.

Best
Wouter
wouter is offline   Reply With Quote

Reply


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



All times are GMT -4. The time now is 23:55.