CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

accessing to parameters of a volVectorField

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By sasookey

Reply
 
LinkBack Thread Tools Display Modes
Old   May 13, 2012, 09:58
Question accessing to parameters of a volVectorField
  #1
New Member
 
reza
Join Date: Apr 2012
Posts: 7
Rep Power: 5
sasookey is on a distinguished road
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.
sasookey is offline   Reply With Quote

Old   May 13, 2012, 14:33
Talking
  #2
New Member
 
reza
Join Date: Apr 2012
Posts: 7
Rep Power: 5
sasookey is on a distinguished road
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!
rudolf.hellmuth likes this.
sasookey is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Parameters for multigrid solver HaZe OpenFOAM Running, Solving & CFD 3 January 28, 2012 03:05
Accessing a vector in a volVectorField by cell label andrewryan OpenFOAM 3 January 15, 2012 06:48
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 13:27
accessing to some parameters in faces?? Asghari FLUENT 0 July 18, 2006 22:50


All times are GMT -4. The time now is 16:30.