Hi all FOAMers, On OpenCFD we
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!
It means that the velocity fie
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;
But in application simpleFoam
But in application simpleFoam you solve the UEqn with
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?
sorry, type erro. Should be "
sorry, type erro. Should be
Hehe, how about: U = rUA*U
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:
// H operator
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]];
and then called in fvMatrix.C
tHphi().internalField() += lduMatrix::H(psi_.internalField()) + source_;
I get it. Thanks a lot!
I get it.
Thanks a lot!
In addition to the reconstruct
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.
Sorry if I came late to this d
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
solve(UEqn == -fvc::grad(p));
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...
Sorry, of course U = rUA*UEqn.
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...
|All times are GMT -4. The time now is 07:08.|