CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > 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 Search this Thread 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: 13
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: 13
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 Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


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 04:48
Parameters for multigrid solver HaZe OpenFOAM Running, Solving & CFD 3 January 28, 2012 02:05
units of geometrical parameters lost SoobY ANSYS Meshing & Geometry 2 January 10, 2011 03: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 20:22.