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

How does "solve" method works ?

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 9, 2012, 11:33
Post How does "solve" method works ?
  #1
Senior Member
 
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 249
Rep Power: 16
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 :
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         );
00043 
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
Default
  #2
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 23
santiagomarquezd will become famous soon enough
Hi, respect to question 1, yes, in fvm operators the second argument is the variable to solve for.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
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.
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Reply

Tags
equations, relax, solve

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
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 16:52.