|
[Sponsors] |
November 7, 2019, 13:19 |
Basic question in coding
|
#1 |
Member
Stanley John
Join Date: Sep 2018
Posts: 79
Rep Power: 8 |
What does the & operator do in this line of code:
volScalarField gh("gh", (g & mesh.C()) - ghRef); g is the gravity fied, mesh.C() is the volVectorField and ghRef is a scalar. Also while learning the coding part of OpenFoam, which part of the C++ programming should I focus on? |
|
November 7, 2019, 14:36 |
|
#2 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 15 |
||
November 7, 2019, 14:42 |
|
#3 |
Member
Stanley John
Join Date: Sep 2018
Posts: 79
Rep Power: 8 |
Thanks,
Basically you are taking a dot product of a vector with a volVectorfield, so does openFoam automatically multiplies the one vector with the vector in each of the control volume? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Basic question on motorBike tutorial | newToOpenFoam | OpenFOAM Running, Solving & CFD | 2 | July 14, 2011 10:50 |
Basic question | forsumit | OpenFOAM | 0 | April 7, 2010 11:46 |
Basic Question | Abhi | FLUENT | 1 | August 4, 2007 09:07 |
Basic question: UDF for wall heat flux | Carl | FLUENT | 1 | August 5, 2006 20:01 |
A Basic Question on ducted Flows! | CFD User | Main CFD Forum | 4 | January 8, 2005 07:17 |