CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   The coefficient value for neighbouring cells (https://www.cfd-online.com/Forums/openfoam-solving/60376-coefficient-value-neighbouring-cells.html)

olivier December 18, 2005 15:17

Hi, The resulting algebraic
 
Hi,
The resulting algebraic equation for a general variable (phi) linking its value at the center of a control volume P with the values of neighbouring cells (n) are:

A_p *Phi_p=Sum_n(A_n * Phi_n ) + S_(phi)
with :
A_p=Sum_n(A_n)+ S_p

My question is:
How can I get the coefficient A_n ?
thanks for your help.
best regards
olivier

hjasak December 18, 2005 15:26

Have a look at lduMatrix.H - t
 
Have a look at lduMatrix.H - the member function you want is called diag()

Enjoy,

Hrv

olivier December 18, 2005 18:52

HI Jasak, I have some confu
 
HI Jasak,
I have some confusion:
I think that Ap is calculated in O.FOAM as:
Ap=diag()/mesh.V();
and you said that A_n=diag()
but in the theory Ap=Sum_n(A_n)+ S_p;
how come ?
thanks for your help.

olivier


All times are GMT -4. The time now is 18:59.