CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   get uniform field (

pablodecastillo June 7, 2011 10:01

get uniform field

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


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 04:28.