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

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

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

Reply
 
LinkBack Thread Tools 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: 128
Rep Power: 8
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 Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
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: 12
Bernhard is on a distinguished road
Maybe this thread is helpfull
== operator
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: 128
Rep Power: 8
wouter is on a distinguished road
Sorry I did not find this thread, but thanks.

Best
Wouter
wouter is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 01:52.