|
[Sponsors] |
April 12, 2022, 20:51 |
How to create Uave =(Uavex,Uavey,Uavez)
|
#1 |
Senior Member
Farzad Faraji
Join Date: Nov 2019
Posts: 204
Rep Power: 7 |
Hello all
I want to average my velocity field, and save it in another field called Uave. To do this, first I create Uave; Code:
volVectorField Uave(U); Uave = 0.0*Uave; Code:
Uavex = gAverage(U.component(0)) Uavey = gAverage(U.component(1)) Uavez = gAverage(U.component(2)) Thanks, Farzad |
|
April 12, 2022, 23:11 |
|
#2 |
Member
Join Date: Jun 2019
Posts: 41
Rep Power: 6 |
Hello. I don't fully understand. The result of the average of U_X is a scalar as you said. Thus you get 3 scalars finally. You can store them in a vector if you like
vector Uave = vector(Uavex, Uavey, Uavez); but I don't see how to transform this in a "field".
__________________
« Debugging is what CFD is about. 5 minutes to modify your code, 5 months to find why it does not work anymore. » |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
create the file *.foam | phongstar | OpenFOAM | 12 | October 14, 2018 18:06 |
[GAMBIT] How to plot S pipe | mariam.sara | ANSYS Meshing & Geometry | 36 | November 7, 2013 15:22 |
[ANSYS Meshing] is it possible to create virtual edges on the blades | er_ijaz | ANSYS Meshing & Geometry | 0 | November 3, 2013 05:15 |
[DesignModeler] Design Modeller create surface | papis | ANSYS Meshing & Geometry | 0 | October 31, 2013 13:52 |
About create interface! | xinzhiyu2008 | STAR-CCM+ | 2 | August 6, 2010 20:47 |