CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   phi in scalarTransportFoam, why not U (https://www.cfd-online.com/Forums/openfoam-programming-development/158821-phi-scalartransportfoam-why-not-u.html)

pnovo September 4, 2015 07:10

phi in scalarTransportFoam, why not U
 
Dear Openfoamers,

sorry for the ignorant question but I would appreciate if anybody could revert me to the proper info since I have been looking around and am still quite puzzled.

In the scalarTransportFoam the equation to be solved includes the scalar "T" which is transported both by diffusion constant ("DT") and convection vector ("U"). But in the scalarTransportFoam the equation solved includes "phi" instead of "U".

Code:

       
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
// Building and solving the scalar tranport equation 
solve
      (               
          fvm::ddt(T)            // Unsteady term
        + fvm::div(phi, T)      // Convective term       
        - fvm::laplacian(DT, T) // Diffusive term            
      );   
}

Could anyone help me?

t.oliveira December 18, 2015 17:14

Quote:

Originally Posted by pnovo (Post 562458)
in the scalarTransportFoam the equation solved includes "phi" instead of "U". Could anyone help me?

"phi" is the scalar product of the of Uf and the area vector. Uf is the velocity at the face, while U is the velocity at the the center of the cell. If you used U at the discretized form of the divergence, you would have the divergence equals to zero no matter how your velocity field were.


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