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

Understanding sourcecode of solvers

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 14, 2008, 04:19
Default Hi all, because I want to w
  #1
karen
Guest
 
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++)
{
solve
(
fvm::ddt(T)-fvm::laplacian(DT,T)
);
}

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?

Karen
  Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Understanding interFoam sega OpenFOAM Running, Solving & CFD 26 February 10, 2022 04:21
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 18:07
Understanding turbFoam sourcecode lasb OpenFOAM 1 July 31, 2007 11:21


All times are GMT -4. The time now is 08:30.