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: 237
Rep Power: 10
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: 438
Rep Power: 17
santiagomarquezd will become famous soon enough
Hi, respect to question 1, yes, in fvm operators the second argument is the variable to solve for.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) 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
Fractional Step Method and SIMPLE Ha Lim Choi Main CFD Forum 14 June 14, 2017 11:17
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
equidistribution method Nina Shokina Main CFD Forum 1 June 16, 1999 06:18

All times are GMT -4. The time now is 12:17.