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/)
-   -   How to get the value of one cell in a patch (https://www.cfd-online.com/Forums/openfoam-solving/60068-how-get-value-one-cell-patch.html)

tangd August 17, 2006 01:55

If I declared a variable Tp:
 
If I declared a variable Tp:

const fvPatchField<scalar>& Tp =
lookupPatchField<volscalarfield,>("T");

This Tp would represent the values of temperature at inlet. So Tp.size() gives me the number of cells at inlet, Tp.patch().faceCells() gives me the cells list. But if I want just a single temperature value of one cell, how to do that? Thanks!

tangd August 17, 2006 02:00

Sorry I got it. Simply Tp can
 
Sorry I got it. Simply Tp[i] can access to the ith value of the patch!


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