|
[Sponsors] |
August 11, 2014, 04:43 |
difference between div(U) and div(phi)
|
#1 |
Senior Member
Join Date: Dec 2011
Posts: 121
Rep Power: 14 |
Hi
Does anybody know why using each of div(U) or div(phi) provides same results? I'm confused because the first one is volVectorField, and the latter is surfaceScalarField. (Both of them are computed at the same time step and I'm using this in the Poisson eq.(Laplacian(p')=div(U)) ) Tnx |
|
August 11, 2014, 05:02 |
|
#2 |
Member
Timm Severin
Join Date: Mar 2014
Location: Munich
Posts: 63
Rep Power: 12 |
I don't know about the numerics, but as far as I understand a volField is stored in the center of the cell, while a surfaceField is stored on the faces. Thus both methods are just different ways of accessing the "same" data, and should ideally return the same results.
To convert them you can work with fvc::reconstruct (surface -> vol) or fvc::interpolate (vol -> surface). A little attention should of course be paid where phi includes density (though I've seen it called rhoPhi for those cases), usually in compressible or multiphase problems.
__________________
PhD Student at the Institute of Biochemical Engineering at TU München Modelling of fluid dynamics in open photobioreactors. System: OpenFOAM 2.3.x, 64bit, 8 Core Xeon Workstation |
|
August 15, 2014, 08:53 |
|
#3 | |
Senior Member
Join Date: Dec 2011
Posts: 121
Rep Power: 14 |
Quote:
I've noticed that small differences can be seen in the result of those approaches. Still I would like to know which one is completely correct if Poisson eq. should be solved? and why? fvm::Laplacian(p') = fvc::div (U) or fvm::Laplacian(p') = fvc::div (phi) Tnx in advance for any idea. |
||
|
|