CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Usage of fvm and fvc (http://www.cfd-online.com/Forums/openfoam-programming-development/105305-usage-fvm-fvc.html)

dl6tud July 27, 2012 07:54

Usage of fvm and fvc
 
Can anyone help me to understand how to use fvm and fvc?
Here in the forum I found one helpfull thread:
The programmers guide explaines the subject in chapter 2.4. Is says, fvc means a list of values defined at locations in the geometry. It says, fvm are coefficients. Ok.

Let's take an example, the U-equation in piso-Foam:

Quote:

fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
+ turbulence->divDevReff(U)
);
I already fail with dU/dt. I thought, U is defined for every mesh cell -> at every location -> it must be fvc. But it is not!!! Can someone help me to understand that example?


An other approach
I think, I understand the difference between explicit (fvc) and implicit derivative (fvm). If I have an equation like u=x*x, u can be calculated easily, it is fvc. An implicit equation is the example (2.12) [A][x] = [b]. Back to dU/dt.
I may write dU/dt = u(t)-u(t-1). Explicit. fvc. Wrong. --> How do I know when to use which namespace?

Thanks a lot for your help!
Norbert

dl6tud July 27, 2012 18:28

More infos:
Taking an other example, the UEqn from mhdFoam:

Quote:

fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
- fvc::div(phiB, 2.0*DBU*B)
- fvm::laplacian(nu, U)
+ fvc::grad(DBU*magSqr(B))
);
The velocity U can not be calculated analytically, only by iteration. That means it is implicitely given = fvm.

When calculating U, the field B is kept constant. If it is constant, it may be calculated/readed easily (explicitly) = fvc.

=> So whenever there is a U in the UEqn, I have to write fvm, if it is not fvc. Can someone confirm that or say it better?


All times are GMT -4. The time now is 22:01.