|
[Sponsors] |
December 19, 2016, 07:37 |
about phi in fvm::div(phi,U)
|
#1 |
New Member
longyun wang
Join Date: Dec 2016
Posts: 6
Rep Power: 10 |
hi,
I am new in openfoam. When reading codes, I can't understand the phi in fvm::div(phi, U). It stands for △ˇ(UU), why don't we write as fvm::div(U, U) and what does phi means exactly. thanks a lot |
|
December 19, 2016, 09:23 |
|
#2 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Hi,
phi is actually the flux through the cells (so it is not a volVectorField, but a surfaceScalarField). For incompressible solver phi=U, but in case of compressible flows, phi=rho*U. This is why phi is used, you only change its definition in createFields. |
|
December 21, 2016, 03:34 |
|
#3 |
New Member
longyun wang
Join Date: Dec 2016
Posts: 6
Rep Power: 10 |
thx very much~~
|
|
December 21, 2016, 08:50 |
|
#4 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
By the way, your equation is wrong. Be careful with laplacian and nabla!
@agustinvo, you missed the face area!
__________________
Keep foaming, Tobias Holzmann |
|
June 6, 2022, 15:58 |
|
#5 |
Member
Uttam
Join Date: May 2020
Location: Southampton, United Kingdom
Posts: 35
Rep Power: 6 |
Just to add to the answers- the reason why we don’t write \Nabla.(U U) is simply because it is a non-linear equation. OpenFOAM deals with non linearity by using the value of flux from the previous iteration. If you see createFields.H, you will notice that at the end of the code is createPhi.H. This will be called first and the flux will be created. When the iteration loop begins, it will use this flux and calculate the unknown velocity. For the next iteration, the previous iterations flux will be used to calculate the velocity of the current iteration.
|
|
June 6, 2022, 16:16 |
|
#6 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Not 100 % or you did not write it carefully.
First of all, the fluxes are different compared to the velocities as its on the surface and not in the cell center. You are right, the fluxes are created (firstly) by the actual velocities, after constructing the velocity matrix (momentum predictor is not needed), we solve the pressure equation which gives us the correction of the fluxes. These correction are used to recalculate the new velocity field. The flux calculation might be repeated even though, the velocity matrix is not re-built (updated) only the velocities. See, A and H operator. We repeat until the solution is satisfied and the continuity is fine. This is mainly PISO + non-Ortho correctors. In PIMPLE we also update the velocity matrix. Cheers.
__________________
Keep foaming, Tobias Holzmann |
|
June 6, 2022, 16:27 |
|
#7 | |
Member
Uttam
Join Date: May 2020
Location: Southampton, United Kingdom
Posts: 35
Rep Power: 6 |
Quote:
Suppose we have an equation which is not non-linear. In that case, would it be incorrect to calculate the flux before the momentum predictor step? Say it is a linear PDE (coupled, similar to NSE). I would assume that we do not need the flux calculation before momentum predictor since there is no requirement to handle non-linearity. By making this flux calculation from existing velocity, the flux Correction after the pressure equation solution will be applied to the previous iteration flux, not the current one. In such a case, would it be correct to add the flux calculation AFTER momentum predictor step? |
||
Tags |
fvmatrix, phi |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM.org] OpenFOAM build on Intel Xeon Phi | asaijo | OpenFOAM Installation | 31 | July 26, 2017 11:35 |
mixerVesselAMI2D's mass is not balancing | sharonyue | OpenFOAM Running, Solving & CFD | 6 | June 10, 2013 10:34 |
Summing phi over all faces in patch | NewtoFOAM | OpenFOAM Programming & Development | 2 | May 8, 2013 06:37 |
Recreation of phi file, icoFoam | Madeleine P. Vincent | OpenFOAM Running, Solving & CFD | 0 | May 7, 2012 12:17 |
Turbulence Model phi vs phi_ | doug | OpenFOAM Running, Solving & CFD | 4 | November 10, 2009 05:33 |