CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Accessing Values of U_general questions (https://www.cfd-online.com/Forums/openfoam/60728-accessing-values-u_general-questions.html)

harly December 4, 2008 18:13

Hi, I am trying to access t
 
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

hjasak December 8, 2008 05:31

With scalars: U.component(v
 
With scalars:

U.component(vector::X)

or with vectors:

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

U + hrv;



Got it? http://www.cfd-online.com/OpenFOAM_D...part/happy.gif Enjoy,

Hrv

harly December 8, 2008 13:24

thank you very much exactly wh
 
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.

hjasak December 8, 2008 14:14

Sorry, just little old me... a
 
Sorry, just little old me... and of course other people on the Forum.

Hrv


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