|
[Sponsors] |
June 9, 2012, 20:49 |
How do I get density
|
#1 |
New Member
Maxim
Join Date: May 2012
Posts: 5
Rep Power: 13 |
Could some one please help me out.
I need to get a density in a cell. I am using rhoPimpleFoam and the code is forAll(mesh.C(), celli) { scalar rro=rho[celli]; ..... } I am getting an error. "error: invalid types ‘float[Foam::label {aka int}]’ for array subscript" I spend two day tryng to understand why I can not get density. Please help me out. |
|
June 11, 2012, 09:48 |
|
#2 |
Senior Member
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 17 |
Hi,
have a look at hPsiThermo.C Kind Regards, Christian |
|
June 11, 2012, 22:53 |
|
#3 |
New Member
Maxim
Join Date: May 2012
Posts: 5
Rep Power: 13 |
||
June 12, 2012, 02:54 |
|
#4 |
Senior Member
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 17 |
Hi,
get the pressure and psi of the cell (as seen in class function calculate) and multiply them (have a look at hPsiThermo.H) Best Regards, Christian |
|
June 12, 2012, 18:55 |
|
#5 |
New Member
Maxim
Join Date: May 2012
Posts: 5
Rep Power: 13 |
One more question.
My rho[celli]=psi[celli]*p[celli] I can get p[celli] but when I try to get psi[celli] I am getting error. How can I get a p[celli] ??? Thank you one more time. QUOTE=Chris Lucas;365934]Hi, get the pressure and psi of the cell (as seen in class function calculate) and multiply them (have a look at hPsiThermo.H) Best Regards, Christian[/QUOTE] Last edited by bme79; June 12, 2012 at 19:49. |
|
June 12, 2012, 19:49 |
|
#6 |
New Member
Maxim
Join Date: May 2012
Posts: 5
Rep Power: 13 |
One more question.
My rho[celli]=psi[celli]*p[celli] I can get p[celli] but when I try to get psi[celli] I am getting error. How can I get a p[celli] ??? Thank you one more time. QUOTE=Chris Lucas;365934]Hi, get the pressure and psi of the cell (as seen in class function calculate) and multiply them (have a look at hPsiThermo.H) Best Regards, Christian[/QUOTE] |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
A problem about density in liquid air definition | alloveyou | CFX | 2 | June 14, 2012 14:20 |
Variable Density Function | ryzd | FLUENT | 1 | August 25, 2011 14:16 |
REAL GAS UDF | brian | FLUENT | 6 | September 11, 2006 08:23 |
Warning 097- | AB | Siemens | 6 | November 15, 2004 04:41 |
variable density water | Atit Koonsrisuk | CFX | 2 | July 24, 2003 03:07 |