CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Solve and fvScalarMartrixsolve (http://www.cfd-online.com/Forums/openfoam-solving/58026-solve-fvscalarmartrixsolve.html)

dmoroian January 30, 2009 03:21

Hello everybody, It came to m
 
Hello everybody,
It came to my attention that a simple transport equation may be written in two ways:
solve
(
<blockquote>
fvm::ddt(T)
+ fvm::div(phi, T)
- fvm::laplacian(DT, T)
);
</blockquote>

and

fvScalarMatrix TEqn
(
<blockquote> fvm::ddt(T)
+ fvm::div(phi, T)
- fvm::laplacian(DT, T)
);
TEqn.relax();
solve(TEqn == 0);
</blockquote>


What is the difference? Is there a difference?

Dragos

grtabor January 30, 2009 05:39

I think the only difference is
 
I think the only difference is the second case includes underrelaxation on the matrix solution. Take that out and they are formally identical (I think). There might be some subtle difference in efficiency related to declaring a fvScalarMatrix explicitly vs implicitly I suppose.

Gavin


All times are GMT -4. The time now is 09:42.