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

A doubt on solve

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By su_junwei
  • 1 Post By eugene

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   June 2, 2008, 13:50
Default Hello I am trying to write
  #1
Member
 
srinath
Join Date: Mar 2009
Location: Champaign, USA
Posts: 91
Rep Power: 17
srinath is on a distinguished road
Hello

I am trying to write a few simple codes to understand OpenFoam. I can't seem to find details about solve(), in all it's overloaded forms in the documentation.

So i looked at scalarTransportFoam and icoFoam.
Here are 2 snippets of code taken from
OpenFoam-1.4.1/applications/solvers/incompressible
OpenFoam-1.4.1/applications/solvers/basic.

1)solve
(
fvm::ddt(T)
+ fvm::div(phi, T)
- fvm::laplacian(DT, T)
);
Does this mean solve takes an input of type
fvscalarMatrix, and somehow modifies value of T.
So does that mean T has solve as it's friend?

2)Also in icoFoam i come across the line

fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
- fvm::laplacian(nu, U)
);

solve(UEqn == -fvc::grad(p));
The == really confuses me, since i can't find the relevant overloaded form for this operator.
Also what is the return type of the expression
Ueqn ==-fvc::grad(p) ?
I am assuming solve magically changes values of U etc when it is invoked.

I would appreciate it if someone would clarify this or at least point me to the right place to look/ documentation, as the programmersguide doesn't seem to touch this, and i have been staring at these lines for a couple of hours.

Regards
Srinath
srinath is offline   Reply With Quote

 


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
Doubt New User FLUENT 2 July 11, 2008 23:50
doubt chandu FLUENT 2 August 23, 2005 05:17
Doubt Mukund FLUENT 4 August 4, 2004 11:28
another VOF doubt some1 Main CFD Forum 6 April 16, 2002 06:52
Doubt on VOF some1 Main CFD Forum 12 April 6, 2002 14:18


All times are GMT -4. The time now is 14:29.