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

== operator

Register Blogs Community New Posts Updated Threads Search

Like Tree45Likes
  • 3 Post By linch
  • 2 Post By l_r_mcglashan
  • 3 Post By santiagomarquezd
  • 2 Post By akidess
  • 3 Post By santiagomarquezd
  • 24 Post By hjasak
  • 1 Post By santiagomarquezd
  • 5 Post By tomislav_maric
  • 1 Post By l_r_mcglashan
  • 1 Post By tomislav_maric

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   February 15, 2011, 06:57
Default == operator
  #1
Senior Member
 
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 176
Rep Power: 16
linch is on a distinguished road
Hi foamers,

I know the "==" operator as an equality operator in C, i.e. (a==b) suppose to return true or false.

But then I can't understand following lines of interFoam:
Code:
rho == alpha1*rho1 + (scalar(1) - alpha1)*rho2;
and
Code:
solve
        (
            UEqn
         ==
            fvc::reconstruct
            (
                (
                    fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)
                  - ghf*fvc::snGrad(rho)
                  - fvc::snGrad(p_rgh)
                ) * mesh.magSf()
            )
        );
Can you please explain me the meaning of the == operator is these cases? What would be the difference if I would use
Code:
rho = alpha1*rho1 + (scalar(1) - alpha1)*rho2;
instead of == for the first one?

Best regards,
Ilya
Kummi, nepomnyi and reverseila like this.
linch is offline   Reply With Quote

 

Tags
equality operator, openfoam operators


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
Modifying the laplacian operator mlawson OpenFOAM Running, Solving & CFD 22 July 16, 2018 04:56
Create a biharmonic operator Pascal_doran OpenFOAM Programming & Development 12 May 22, 2016 06:02
Installation of OpenFOAM15dev antonio_ing OpenFOAM Installation 34 December 18, 2009 10:06
Laplacian operator and nuSgs for heat equation Bedotto OpenFOAM Programming & Development 4 September 7, 2009 15:08
Operator declaration in Thermophysical library lena OpenFOAM Running, Solving & CFD 0 March 12, 2009 09:47


All times are GMT -4. The time now is 03:54.