|
[Sponsors] |
November 22, 2006, 05:16 |
There are two lines that need
|
#1 |
Senior Member
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18 |
There are two lines that need to be commented in any channel solver that was written for OpenFOAM V 1.2 to work under V 1.3:
// fvScalarMatrix::reference pRef = // pEqn.unsetReference(pRef); otherwise we get errors like: --------------------- channelOoddns.3.C: In function 'int main(int, char**)': channelOoddns.3.C:126: error: 'reference' is not a member of 'Foam::fvScalarMatrix' channelOoddns.3.C:126: error: expected `;' before 'pRef' channelOoddns.3.C:129: error: 'struct Foam::fvScalarMatrix' has no member named 'unsetReference' channelOoddns.3.C:129: error: 'pRef' was not declared in this scope ----------------------------- My question, were unsetting the referenceCell unnecessary or it was included somewhere else in the code? I noticed that the same change was applied to icoFoam. Thanks. Best regards, Maka |
|
November 22, 2006, 05:42 |
I am not sure I know what you
|
#2 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
I am not sure I know what you mean: if you have a pressure equations with boundaries that do not fix pressure level, you have to fix a reference pressure.
In OpenFOAM-1.3 the syntax has changed: pEqn.setReference(pRefCell, pRefValue); and you can see it in all the solvers. Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
November 22, 2006, 06:17 |
I understand that but there we
|
#3 |
Senior Member
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18 |
I understand that but there were a statement on V1.2 that used to unset the reference pressure after solving pEq.
pEqn.unsetReference(pRef); where pRef used to be defined as : fvScalarMatrix::reference pRef = pEqn.setReference(pRefCell, pRefValue); In V 1.3: a) one can not define a variable of type fvScalarMatrix::reference; not a big problem. b) one can not unset the reference pressure after solve pEq with a code like: pEqn.unsetReference(pRef) since the member function unsetReference does not exit any more. my question, why we can not unset the reference cell pressure after solving in V1.3 (see b))? is such unsetReference process included by default in pEq.solve() implementation? Thanks for your prompt reply. Best regards, Maka |
|
November 22, 2006, 06:22 |
It is because the way the pres
|
#4 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
It is because the way the pressure reference is set has changed: OF-1.2 uses a constraint, which needs to be removed and OF-1.3 uses a lighter touch method, slightly boosting the diagonal (does not need to be removed).
Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
November 22, 2006, 11:46 |
Thanks Hrv.
|
#5 |
Senior Member
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18 |
Thanks Hrv.
|
|
January 28, 2009, 06:47 |
Hi all,
sorry for the stupid
|
#6 |
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23 |
Hi all,
sorry for the stupid question but... how can I get the pRefCell value? I am wondering if I can reference it using its coordinates (as I would do with Fluent) or if I have to extract the ref cell number from my grid... And in this case, how can I do that? Thanks a lot. Mad |
|
January 28, 2009, 10:40 |
As the user guide says: "Chang
|
#7 |
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23 |
As the user guide says: "Changing either of these values will change the absolute
pressure field, but not, of course, the relative pressure field or velocity field.... Thus no need to know that value... ;-) Cheers, mad |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Convergence control using reference Cell | titio | OpenFOAM Running, Solving & CFD | 1 | March 6, 2008 05:45 |
reference cell | novice | Siemens | 1 | April 30, 2004 10:00 |
reference pressure cell-where? | Micha | Siemens | 6 | June 20, 2003 06:27 |
Reference Pressure | Danard | CFX | 2 | November 12, 2002 15:11 |
Pressure Reference Cell | mimě | Siemens | 1 | June 17, 2002 09:29 |