|
[Sponsors] |
January 16, 2008, 12:44 |
Hi,
a pretty simple one... I
|
#1 |
Senior Member
Fabian Braennstroem
Join Date: Mar 2009
Posts: 407
Rep Power: 19 |
Hi,
a pretty simple one... I hope... I would like to create a new postprocessing variable using: volScalarField test ( IOobject ( "test", runTime.timeName(), mesh, IOobject::NO_READ ), (fvc::grad(U))/mag(fvc::laplacian(U.component(i))) ); test.write(); This works fine as long as U.component(i) has some kind of value, but if the denominator is zero I get obviously an error. Can anyone give me an advice, how an 'if' question could look like? I tried somehting like: if (U.component(i)==0.0){...} but I get: test.C: In function 'int main(int, char**)': test.C:128: error: expected primary-expression before 'if' Fabian |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
RP_Set_Real("variable-name", variable name) | bohis | FLUENT | 1 | March 9, 2009 07:44 |
Post, Calculate Variable in plane | Kordou | CFX | 1 | October 14, 2008 16:39 |
hi how to calculate the HTC | kathir | Siemens | 0 | March 26, 2006 09:31 |
how to calculate y+ in cfx? | micaheal | CFX | 3 | November 21, 2005 14:45 |
how to calculate CL and CD | zhaoyu | FLUENT | 1 | April 24, 2001 09:56 |