CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Running, Solving & CFD

Understanding sourcecode of solvers

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

LinkBack Thread Tools Display Modes
Old   August 14, 2008, 03:19
Default Hi all, because I want to w
Posts: n/a
Hi all,

because I want to write an own solver, I'm trying to understand some basics in the sourcecode of existing solvers.
In this context I have some problems. Perhaps someone can help me to understand the following:
In the the time-loop of the laplacianFoam solver
(in $WM_PROJECT_DIR/application/solver/basic/laplacianFoam/laplacianFoam.C) there is one more loop:

for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)

I don't understand how the loop can do some correction. Why I don't get the same result without the loop. For me it seems like doing nNonOrthCorr-times the same thing. In this context perhaps someone can tell me, what's wrong with the following:

1. fvm::ddt(T)-fvm::laplacian(DT,T) discretizes the differential equation with the schemes given in the fvSchemes-file -> result is a linear equation system
2. solve (...) solves the in 1. obtained equation system with the solver given in fvSolution-file. You get a solution for the "next timestep" with the correctness specified in the fvSolution-file about tolerance? And now? Is this solution used as a new initial-value for the next step in the "nonOrth-loop"? But why the solver starts then to calculate, if the tolerance - given in fvSolution-file - is reached in the step before?

I guess I don't understand something very basically. Please, can someone help me?

  Reply With Quote


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
Understanding interFoam sega OpenFOAM Running, Solving & CFD 23 November 9, 2016 12:49
Basic Understanding Abduri CFX 8 March 7, 2009 07:12
Understanding k from kepsilon markh83 OpenFOAM Post-Processing 3 December 5, 2008 04:42
Understanding parallel solvers milkovp OpenFOAM Running, Solving & CFD 3 May 20, 2008 17:07
Understanding turbFoam sourcecode lasb OpenFOAM 1 July 31, 2007 10:21

All times are GMT -4. The time now is 22:23.