CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Nonlinear Inner Iterations Not Using Updated Values

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 24, 2012, 10:32
Default Nonlinear Inner Iterations Not Using Updated Values
  #1
New Member
 
Tyler V
Join Date: Jul 2012
Posts: 24
Rep Power: 5
tgvosk is on a distinguished road
I am trying to solve a problem which has a nonlinear source term. For simplicity in this example I am not linearizing it. I have defined a function to calculate the explicit source term as

Code:
tmp<volScalarField> fSu(volScalarField& y)
{
    return y + y*y + y*y*y;
}
and I perform inner iterations (within the time loop) as

Code:
while( yRes > resmin )
{
    volScalarField Su = fSu(y);

    fvScalarMatrix yEqn
    (
        fvm::ddt(y) == fvm::laplacian(y) + Su
    );

    Info<<"Before solve: " << average(y) << endl;

    yEqn.relax();
    lduMatrix::solverPerformance sp = yEqn.solve();

    Info<<"After solve: " << average(y) << endl;

    yRes = sp.initialResidual();
}
The problem I am having is that the value of y does not seem to update as this iterates. The output of this solve (shown below) seems to use the same value of y to calculate Su each time, rather than using an updated value

Code:
Before solve: average(y) [0 0 0 0 0 0 0] 0.0445286
GAMG:  Solving for y, Initial residual = 0.433038, Final residual = 0.0109313, No Iterations 3
After solve: average(y) [0 0 0 0 0 0 0] 0.0444641

Before solve: average(y) [0 0 0 0 0 0 0] 0.0445286
GAMG:  Solving for y, Initial residual = 0.433038, Final residual = 0.0109313, No Iterations 3
After solve: average(y) [0 0 0 0 0 0 0] 0.0444641

(... dozens more times ...)

Before solve: average(y) [0 0 0 0 0 0 0] 0.0445286
GAMG:  Solving for y, Initial residual = 0.433038, Final residual = 0.0109313, No Iterations 3
After solve: average(y) [0 0 0 0 0 0 0] 0.0444641
How can I make the value of the source term be recalculated with the updated values of y? Is there a problem with the way I have defined the source term function?
tgvosk is offline   Reply With Quote

Reply

Tags
nonlinear iterations, openfoam

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
transsonic nozzle with rhoSimpleFoam Unseen OpenFOAM Running, Solving & CFD 7 April 16, 2014 03:38
SLTS+rhoPisoFoam: what is rDeltaT??? nileshjrane OpenFOAM Running, Solving & CFD 4 February 25, 2013 05:13
Full pipe 3D using icoFoam cyberbrain OpenFOAM 4 March 16, 2011 10:20
Velocity blows up suddenly after 30,000+ iterations lordvon OpenFOAM 14 October 27, 2010 11:13
MRFSimpleFOAM goes divergenced! renyun0511 OpenFOAM Running, Solving & CFD 0 November 19, 2009 03:11


All times are GMT -4. The time now is 06:35.