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

FvVectorMatrixresidual before solving

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

Reply
 
LinkBack Thread Tools Display Modes
Old   January 28, 2007, 12:02
Default Hi all, I need to check conv
  #1
Member
 
cosimo bianchini
Join Date: Mar 2009
Location: Florence, Tuscany, Italy
Posts: 88
Rep Power: 8
cosimobianchini is on a distinguished road
Send a message via Skype™ to cosimobianchini
Hi all,
I need to check convergence behavior of my calculations using root-mean-square residuals.

What I need is to calculate residuals before (and after) solving the fvMatrix.

fvVectorMatrix UEqn
(
fvm::div(phi, U)
// - fvm::Sp(fvc::div(phi), U)
+ turbulence->divRhoR(U)
== -fvc::grad(p)
);

UEqn.relax();

vectorField U_residual = UEqn.residual();

scalarField u_residual = U_residual.component(0);

Info << " Normalized Initial U L2 Residuals : " <<
Foam::sqrt(sum(sqr(u_residual*massIn/uin))) << endl;

UEqn.solve();

U_residual = UEqn.residual();

Info << " Normalized Initial U L2 Residuals : " <<
Foam::sqrt(sum(sqr(u_residual*massIn/uin))) << endl;

-------

This structure works fine for fvScalarMatrix such as hentalpy,omega,k but fails in case of fvVectorMatrix: solution varies in case I calculate residuals before solving or not.
Is there anyone that ever notice such a behavior?

To my knowledge residual calculation does not change the matrix and so the solution.

I looked up in the fvMatrixsolve.H at the implementation of the member residual and it doesn't seem (I have to tell that I'm not a master in reading FOAM yet) to modify the fvVectorMatrix.

Is fvVectorMatrix.residual() influencing somehow the coefficients, is it just a bug or am I getting mad?

I hope I have been clear enough to be understood.
Thanks a lot for your answers
Cosimo
__________________
Cosimo Bianchini

Energy Engineering Department "S. Stecco"
University of Florence
Via di S.Marta, 3
50139 Florence - ITALY
Tel: +39 055 4796575
Fax: +39 055 4796342
Mob: +39 320 9460153
e-mail: cosimo.bianchini@htc.de.unifi.it
URL: www.htc.de.unifi.it
cosimobianchini is offline   Reply With Quote

Reply

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
Cannot see residuals while solving Dre CFX 3 January 29, 2009 12:00
Why solving kar OpenFOAM Running, Solving & CFD 2 April 30, 2008 15:15
solving a Matrix Behafarid Main CFD Forum 3 September 9, 2006 23:14
Solving the Psystem kupiainen OpenFOAM Running, Solving & CFD 3 May 2, 2005 12:34
MHD solving? Rajil Saraswat Main CFD Forum 1 March 21, 2003 12:26


All times are GMT -4. The time now is 04:11.