|
[Sponsors] |
May 13, 2012, 10:58 |
accessing to parameters of a volVectorField
|
#1 |
New Member
reza
Join Date: Apr 2012
Posts: 7
Rep Power: 14 |
hi I want to access the parameters of a volVectorField I try this:
forAll( p,celli){ if ( p[celli] < 1.e-5 ) { ... } } it works for a volScalarField but I want to do something on u a volVectorField that has ux , uy , uz ,when (ux < 1.e-5 ) and I don't know how to do this? thanks to help me. |
|
May 13, 2012, 15:33 |
|
#2 |
New Member
reza
Join Date: Apr 2012
Posts: 7
Rep Power: 14 |
luckily I can solve my problem first I try this:
forAll(U , celli){ if (U[celli] < vector(1.e-5 , 1.e-5 , 1.e-5) ) { ....... } } and it works, later I use this trick: volScalarField UU = U.component(0); // gives me Ux foaAll(UU , celli){ if (UU [celli] < 1.e-5 ) // check if Ux smaller than 1.e-5 { .......... } } and it works! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Accessing a vector in a volVectorField by cell label | andrewryan | OpenFOAM Programming & Development | 7 | June 8, 2018 05:48 |
Parameters for multigrid solver | HaZe | OpenFOAM Running, Solving & CFD | 3 | January 28, 2012 03:05 |
units of geometrical parameters lost | SoobY | ANSYS Meshing & Geometry | 2 | January 10, 2011 04:58 |
Why does accessing a zeroGradient patch return (0 0 0) for a volVectorField | l_r_mcglashan | OpenFOAM | 0 | August 20, 2010 14:27 |
accessing to some parameters in faces?? | Asghari | FLUENT | 0 | July 18, 2006 23:50 |