CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   get uniform field (http://www.cfd-online.com/Forums/openfoam-programming-development/89192-get-uniform-field.html)

pablodecastillo June 7, 2011 10:01

get uniform field
 
Hello,

How can i get the uniform field for the velocity and save like a global variable??

Thanks

pablodecastillo June 7, 2011 10:31

I got with brute force adding scalar freeStream = average(mag(U.boundaryField())); after reading "U" in createFields.

I hope that there is a easy way to get it.

marupio June 7, 2011 11:28

You want to represent a full field of vectors as a single vector? The line you wrote will give you the magnitude of the velocity - you'd lose direction information.

pablodecastillo June 7, 2011 13:34

That is true, the idea is get the module of the internal field velocity.


All times are GMT -4. The time now is 03:42.