|
[Sponsors] |
Why to say OF uses %e2%80%98Pseudostaggered%e2%80%99 finite volume numerics |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 30, 2005, 20:30 |
Hi all FOAMers,
On OpenCFD we
|
#1 |
Member
Leosding
Join Date: Mar 2009
Posts: 51
Rep Power: 17 |
Hi all FOAMers,
On OpenCFD web: To maintain generality and solve complex on real 3D cases, OpenFOAM uses 'Pseudo-staggered' finite volume numerics but I can not find out from source. Would somebody give me some help for understanding it? Thanks in advance! Leo |
|
August 30, 2005, 21:09 |
It means that the velocity fie
|
#2 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33 |
It means that the velocity field in the algorithm is treated as passive and instead of solving transport equations for it you recover it from the flux field (which caries the same information). That would be the:
U += rUA*fvc::reconstruct((phi - phiU)/rUAf); bit in the pressure equation of interFoam; Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
August 30, 2005, 21:44 |
But in application simpleFoam
|
#3 |
Member
Leosding
Join Date: Mar 2009
Posts: 51
Rep Power: 17 |
But in application simpleFoam you solve the UEqn with
"solve(UEqu()++-fvc::grad(p));" but I find the solution of UEqn --velocity field-- isn't used in following steps(if my understanding is right.), only use the UEqu.A() and UEqn.H() from UEqn assembling fvVectormatrix, then why solve the UEqu? Leo |
|
August 30, 2005, 21:46 |
sorry, type erro. Should be
"
|
#4 |
Member
Leosding
Join Date: Mar 2009
Posts: 51
Rep Power: 17 |
sorry, type erro. Should be
"solve(UEqu()==-fvc::grad(p));" Leo |
|
August 30, 2005, 22:11 |
Hehe, how about:
U = rUA*U
|
#5 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33 |
Hehe, how about:
U = rUA*UEqn.H(); We said before in this forum that the H() operator uses the current solution to do a Jacobi sweep: In Hoperations.C // H operator template<class> tmp<field<type> > lduMatrix::H(const Field<type>& sf) const { tmp<field<type> > tHphi ( new Field<type>(lduAddr_.size(), pTraits<type>::zero) ); if (lowerPtr_ || upperPtr_) { Field<type> & Hphi = tHphi(); const scalarField& Lower = lower(); const scalarField& Upper = upper(); // Take refereces to addressing const unallocLabelList& l = lduAddr_.lowerAddr(); const unallocLabelList& u = lduAddr_.upperAddr(); for (register label face=0; face<l.size(); face++) \ { Hphi[u[face]] -= Lower[face]*sf[l[face]]; <--- right there! Hphi[l[face]] -= Upper[face]*sf[u[face]]; \ } } return tHphi; } and then called in fvMatrix.C tHphi().internalField() += lduMatrix::H(psi_.internalField()) + source_; Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
August 30, 2005, 22:18 |
I get it.
Thanks a lot!
|
#6 |
Member
Leosding
Join Date: Mar 2009
Posts: 51
Rep Power: 17 |
I get it.
Thanks a lot! |
|
August 31, 2005, 03:13 |
In addition to the reconstruct
|
#7 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
In addition to the reconstruct method to convert the staggered pressure gradient and "drag" terms into cell centered versions for the momentum corrector I have also introduced the ddtPhiCorr method to replace the cell-centered rate-of-change with the face-based flux version in the flux predictor making the solution for the fluxes not only staggered with respect to the pressure gradient and "drag" terms but also staggered with respect to the rate-of-change. Test solutions of the simplified shallow-water equations have shown that this formulation is equivalent to the Arakawa and Lamb C-grid staggering.
|
|
June 14, 2007, 13:51 |
Sorry if I came late to this d
|
#8 |
Member
diablo80@web.de
Join Date: Mar 2009
Posts: 93
Rep Power: 17 |
Sorry if I came late to this discussion, but I still dont get it...
If I set U = rUA*UEqn.H(); isnt the U previously calculated in if (momentumPredictor) { solve(UEqn == -fvc::grad(p)); } lost anyway? What is the point of checking "momentumPredictor" if the value of U will be lost anyway inside PISO loop (U = rUA*UEqn.H())? I feel my understanding of OF is still very poor, so I am sorry for this stupid question... Best regards, luiz |
|
June 14, 2007, 16:15 |
Sorry, of course U = rUA*UEqn.
|
#9 |
Member
diablo80@web.de
Join Date: Mar 2009
Posts: 93
Rep Power: 17 |
Sorry, of course U = rUA*UEqn.H() scope was limited to PISO loop by the brackets and would not affect the solved momentum equation.
Sorry for that... |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sliding mesh with Finite elements or finite volume | tool | Main CFD Forum | 0 | October 9, 2008 10:07 |
formulation of finite element&finite volume method | ravindra | FLUENT | 0 | June 27, 2007 12:04 |
finite elemte VS finite volume | ztdep | Main CFD Forum | 4 | April 13, 2006 07:43 |
Finite Element vs. Finite Volume Codes | Salman | Main CFD Forum | 9 | January 6, 2006 22:59 |
Finite volume or finite differene for free surface | G N Xie | Main CFD Forum | 8 | January 10, 2005 07:42 |