CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Changing DILUPBiCG output when solving equation (http://www.cfd-online.com/Forums/openfoam-solving/59277-changing-dilupbicg-output-when-solving-equation.html)

nico765 December 17, 2007 11:39

Hello, When running turbFoa
 
Hello,

When running turbFoam, I get output from the DILUPBiCG solver:
"DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 7.53093e-07, No Iterations 4".

But when running interFoam, i dont get any output from the momentum equations; the code looks similar.

What governs the type of output?

Thanks

Nico

caw December 17, 2007 12:15

Hi Nico, i suppose you are
 
Hi Nico,

i suppose you are running the dambreak testcase, where the momentum predictor in the fvSolution file is switched off. So only the pressure equation is solved. The correct velocity results from the pressure-velocity correction.

You can change that in the PISO section:
PISO
{
momentumPredictor yes;
...
}

regards
Christian

nico765 December 18, 2007 08:50

perfect, thank you very much
 
perfect, thank you very much

santiagomarquezd September 2, 2009 00:01

Thanks to Caw for the answer, i was about to post the same question. I have some related questions:

1. What is the purpose of the momentum predictor?
2. Where I can find some theory about it?
3. With your clue we are able to see what are the residuals for the momentum equation, but, What parameters we have to change to set up the residuals limits in order to force the solver to go with the residuals below a given value (as is usual in commercial CFD codes)?

Thanks in advance.

sandy September 2, 2009 00:26

Quote:

Originally Posted by caw (Post 197267)
Hi Nico,

i suppose you are running the dambreak testcase, where the momentum predictor in the fvSolution file is switched off. So only the pressure equation is solved. The correct velocity results from the pressure-velocity correction.

You can change that in the PISO section:
PISO
{
momentumPredictor yes;
...
}

regards
Christian

Hi Christian, you think, when the momentum predictor is switched off or on, what is the differences to the solution of the velocity field in PISO? Thanks.

sandy September 2, 2009 21:48

If the momentum predictor is switched off, the velocity fields will be gotten explicitly from the pressure equation, I guess, it is easier to implement parallel computation because only a pressure equation is solved. However, I think, if the momentum predictor is switched on, maybe we can get more efficiently during an un-parellel simulation??

lakeat September 2, 2009 23:16

Quote:

Originally Posted by santiagomarquezd (Post 228198)
1. What is the purpose of the momentum predictor?

It's all about SIMPLE/PISO algorithm.

Quote:

2. Where I can find some theory about it?
Try to read a thesis from Hrv's wensite.

Quote:

3. With your clue we are able to see what are the residuals for the momentum equation, but, What parameters we have to change to set up the residuals limits in order to force the solver to go with the residuals below a given value (as is usual in commercial CFD codes)?
This is exactly what file fvSolution does.

santiagomarquezd September 7, 2009 12:31

Thanks Daniel for your answers, it's a pleasure for me to interact with somebody in China (actually mi first time I guess). About answers 1 & 2 I'll read these thesis, I promise. And respect answer 3, you're right, I found the info in the pdf manuals. Regards.

santiagomarquezd September 23, 2009 09:01

Daniel, I've been reading some thesis, specially the one from Jasak, it's awesone, none more clear about FVM and errors. Now I'm dealing with the interpretation of some lines of icoFoam solver, particularly with A and H operators. If we recall the annotated version from OpenFOAM Wiki:


Code:

//set up the linear algebra for the momentum equation.  The flux
// of U, phi, is treated explicity using the last known value of U. 
 
        fvVectorMatrix UEqn
        (
            fvm::ddt(U)
          + fvm::div(phi, U)
          - fvm::laplacian(nu, U)
        );

In the last portion of code UEqn matrix is assembled from geometrical data and phi field, this field is obtained from a previous U field. I agree with this.

Code:

// solve using the last known value of p on the RHS.  This gives us
// a velocity field that is not divergence free, but approximately satisfies
// momentum.  See Eqn. 7.31 of Ferziger & Peric

        solve(UEqn == -fvc::grad(p));

Solving UEqn gives us a new U field.


Code:

        // --- PISO loop---- take nCorr corrector steps
 
        for (int corr=0; corr<nCorr; corr++)
        {
 
// from the last solution of velocity, extract the diag. term from the
// matrix and store the reciprocal note that the matrix coefficients are
// functions of U due to the non-linearity of convection.
 
          volScalarField rUA = 1.0/UEqn.A();

Here I have my first question, nevertheless matrix coefficients are really functions of U, when we use the method A, we are simply extracting the diagonal coefficients UEqn associated matrix, this coefficients are function of U BUT via field phi which is not actualized yet, then the the text "note that the matrix coefficients are functions of U due to the non-linearity of convection" is a bit confusing here. Am I right?

Code:

// take a Jacobi pass and update U.  See Hrv Jasak's thesis eqn. 3.137 and
// Henrik Rusche's thesis, eqn. 2.43 UEqn.H is the right-hand side of the
// UEqn minus the product of (the off-diagonal terms and U).  Note that
// since the pressure gradient is not included in the UEqn. above, this
// gives us U without the pressure gradient.  Also note that UEqn.H() is
// a function of U.
 
            U = rUA*UEqn.H();

Here we use the H operator, it calculates the product between off-diagonal UEqn matrix coefficients and corresponding U values, in this case I completely agree about that it is a explicit function of U because we use U to calculate it (in the product). Am I right?

Regards.


All times are GMT -4. The time now is 13:57.