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/)
-   -   volVectorField -> surfaceVectorField (https://www.cfd-online.com/Forums/openfoam-solving/98844-volvectorfield-surfacevectorfield.html)

latvietis March 20, 2012 11:09

volVectorField -> surfaceVectorField
 
Greetings!

I'm not completely familiar with what exactly is the difference between volVectorField and surfaceVectorField (if someone could explain in short words and in other way than in Programmers Guide.. though its not the main question), but what I'm sure of is that in

Code:

fvc::div(m*M)
m*M needs to be surfaceVectorField (surface because when I tried to change this to vol then I couldn't compile the solver). The problem is that I want to define m and M values in a volume using setFields, but it needs volField. So my question - is it possible to somehow modify the given code that I could take into account all volume? Is that possible?

Sincerely,
Martin

Phicau March 20, 2012 11:19

Hi

volVectorField is a vector field defined in each of the cells, while surfaceVectorField is defined on the faces.

Easy way to convert from volVectorField Q to surfaceVectorField is: linearInterpolate(Q)

Regards

Pablo


All times are GMT -4. The time now is 05:27.