|
[Sponsors] |
June 30, 2011, 18:47 |
Accessing Velocity Components
|
#1 |
Member
Join Date: Sep 2010
Posts: 36
Rep Power: 16 |
Dear All,
How can I access the components of volVecorField U ? Meaning: u, v, w component. Thanks for the help. Andreas |
|
June 30, 2011, 20:21 |
|
#2 |
Member
Join Date: Sep 2010
Posts: 36
Rep Power: 16 |
I've been doing trial and error for a while, but at the end it wasn't as complicated as I thought, if I do:
Code:
double lesCllCtrDomSze = U.size(); double ules[lesCllCtrDomSze]; double vles[lesCllCtrDomSze]; double wles[lesCllCtrDomSze]; OFstream uvw_velocities ( "uvw_velocities" ); for(int i=0; i<lesCllCtrDomSze; i++) { Vector<double> Uvector = U[i]; ules[i] = Uvector.x(); vles[i] = Uvector.y(); wles[i] = Uvector.z(); uvw_velocities <<ules[i]<<", " <<vles[i]<<", " <<wles[i] <<endl; } This link was helpful: http://www.cfd-online.com/Forums/ope...ell-label.html |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Results of CFX Simulations | Sof_70_Usthb | CFX | 3 | July 9, 2011 07:15 |
Emergency:UDF for a time dependent parabolic velocity | zumaqiong | Fluent UDF and Scheme Programming | 12 | March 25, 2010 13:00 |
Velocity Components in foamDataToFluent | flavio_pergolesi | OpenFOAM Post-Processing | 1 | November 9, 2009 10:27 |
Neumann pressure BC and velocity field | Antech | Main CFD Forum | 0 | April 25, 2006 03:15 |
How to specify velocity components in UDF | Ynot | FLUENT | 1 | March 11, 2006 14:53 |