CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   edit output? (https://www.cfd-online.com/Forums/openfoam-solving/68174-edit-output.html)

sven82 September 9, 2009 05:43

edit output?
 
hi,

I need some help, with (hope so) a little problem

how its possible to write out the coordinate und a field value in the same output deck, like this

//U>>Field
//------------------------------------


x y z ( Ux Uy Uz )


//where x are the X-coordinate of the cell ( point.pos; pos.x() )
//and Ux the X-komponent of the velocity


Thanks for any help!

sven82 September 9, 2009 08:09

almost the solution!

the coordinate for the Cell centre is "mesh.C()" and for a single component "mesh.C().component(vector::X)"

at the moment I got the two vector fields:

coordinate mesh.C() ________________U
-------------------------------------------------
x _____ y _______ z _______________Ux _____Uy _______ Uz

or

mesh.C().component(vector::X) ; mesh.C().component(vector::Y); mesh.C().component(vector::Z) ; U.component(vector::X) ; U.component(vector::Y) ; U.component(vector::z) ;

but how can I merge the fields and generate one output? :o

chbenz September 15, 2009 06:46

Hi,

porbes function will be the right thing for you. Look at $FOAM_UTILITIES/postProcessing/sampling/probeLocations/

Christof


All times are GMT -4. The time now is 12:34.