CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Accessing Values of U_general questions

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 4, 2008, 19:13
Default Hi, I am trying to access t
  #1
Member
 
Daniel Harlacher
Join Date: Mar 2009
Location: Davis, CA, United States
Posts: 60
Rep Power: 17
harly is on a distinguished road
Hi,

I am trying to access the components of U_ for all Cells from the PG I expected it to work like U_.x() - but it didn't.

My second problem is, I have a formula with the formulation e.g. 1+U_ but of course I can't write that in the code because I need a vector of ones or something that matches the dimensions of U_.

thanks

harly
harly is offline   Reply With Quote

Old   December 8, 2008, 06:31
Default With scalars: U.component(v
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
With scalars:

U.component(vector::X)

or with vectors:

dimensionedVector hrv("one", dimVelocity, vector::one);

U + hrv;



Got it? Enjoy,

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   December 8, 2008, 14:24
Default thank you very much exactly wh
  #3
Member
 
Daniel Harlacher
Join Date: Mar 2009
Location: Davis, CA, United States
Posts: 60
Rep Power: 17
harly is on a distinguished road
thank you very much exactly what I needed.

-harly

P.S. is there a place where I can look stuff like that up? - because the programmers guide was not very helpful for me.
harly is offline   Reply With Quote

Old   December 8, 2008, 15:14
Default Sorry, just little old me... a
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Sorry, just little old me... and of course other people on the Forum.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Reply


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
Ensight - node values -cell values leo FLUENT 1 May 12, 2010 09:47
Accessing node values using a UDF Nico FLUENT 2 December 20, 2007 03:50
Accessing Shear Rate Values in Subroutines Daniel Lattin Siemens 0 January 10, 2007 18:59
Accessing values from other cells/thread leonard FLUENT 1 January 17, 2006 11:33
UDF help on accessing values shashikant FLUENT 0 December 22, 2005 10:41


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