CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Programming & Development

How does "solve" method works ?

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

LinkBack Thread Tools Display Modes
Old   August 9, 2012, 11:33
Post How does "solve" method works ?
Senior Member
Join Date: Jul 2010
Posts: 236
Rep Power: 8
fredo490 is on a distinguished road
Hello everybody, I have a question about the solve and relax methods.

1) It might be stupid but how does the solve method choose the "variable" to solve ?
For example in the compressibleTwoPhaseEulerFoam solver, if we take a look at the UEqns.h file, we can see the following code :
00029         U1Eqn =
00030         (
00031             (scalar(1) + Cvm*rho2*alpha2/rho1)*
00032             (
00033                 fvm::ddt(alpha1, U1)
00034               + fvm::div(alphaPhi1, U1)
00035               - fvm::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), U1)
00036             )
00037           - fvm::laplacian(alpha1*nuEff1, U1)
00038           + fvc::div(alpha1*Rc1)
00039          ==
00040           - fvm::Sp(dragCoeff/rho1, U1)
00041           - alpha1*alpha2/rho1*(liftForce - Cvm*rho2*DDtU2)
00042         );
00044         U1Eqn.relax();
How does it know that it has to solve U1 ? And how does it know that other variable must be "constant" ? Why not solving alpha1 ? Is it because U1 is the last argument ?

2) what is the difference between the "relax" method and the "solve" method ?

thank you in advance for your answer
fredo490 is offline   Reply With Quote

Old   August 9, 2012, 16:19
Senior Member
santiagomarquezd's Avatar
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 420
Rep Power: 15
santiagomarquezd will become famous soon enough
Hi, respect to question 1, yes, in fvm operators the second argument is the variable to solve for.
Post-doctoral Fellow
Research Center for Computational Mechanics (CIMEC) - CONICET/FICH-UNL
T.E.: 54-342-4511594 Ext. 1005
Güemes 3450 - (3000) Santa Fe
Santa Fe - Argentina
santiagomarquezd is offline   Reply With Quote


equations, relax, solve

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
Info on method of lines approach charlie ryan Main CFD Forum 2 August 9, 2007 11:06
smoothed interface capturing method: compressible. jinwon Main CFD Forum 0 May 14, 2007 00:20
Front Tracking Method? Danny Main CFD Forum 4 September 25, 2006 08:19
Fractional Step Method and SIMPLE Ha Lim Choi Main CFD Forum 12 December 20, 2000 13:33
equidistribution method Nina Shokina Main CFD Forum 1 June 16, 1999 06:18

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