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/)
-   -   difference between U().boundaryField()[patchI] and U().boundaryField()[patchI].patchI (https://www.cfd-online.com/Forums/openfoam-programming-development/123224-difference-between-u-boundaryfield-patchi-u-boundaryfield-patchi-patchi.html)

cctv September 7, 2013 07:02

difference between U().boundaryField()[patchI] and U().boundaryField()[patchI].patchI
 
Hi:
I am wondering if any one know the difference between U().boundaryField()[patchI] and U().boundaryField()[patchI].patchInternalField()? and the difference between aMesh().faceAreaNormals() and aMesh().faceAreaNormals().internalField() in openfoam-1.6-ext.Thanks

jherb September 9, 2013 07:27

your first version gives you the values on the patch surface whereas the second version returns the values in the cells next to the surface.

cctv September 10, 2013 06:43

Quote:

Originally Posted by jherb (Post 450659)
your first version gives you the values on the patch surface whereas the second version returns the values in the cells next to the surface.

Thank you for your reply. I have made a comparison with the internalfield and cell centre field. and I found though these two value are very close, they are not the same. So I think there must be something differences between them. In addition, for famesh, do they have cells next to them?

jherb September 10, 2013 15:06

What values/fields have you compared? What happens if you compare the cell center coordinates (.C(), http://www.cfd-online.com/Forums/ope...l-centers.html )?

Quote:

Originally Posted by cctv (Post 450894)
Thank you for your reply. I have made a comparison with the internalfield and cell centre field. and I found though these two value are very close, they are not the same. So I think there must be something differences between them. In addition, for famesh, do they have cells next to them?


cctv September 10, 2013 15:16

Quote:

Originally Posted by jherb (Post 450990)
What values/fields have you compared? What happens if you compare the cell center coordinates (.C(), http://www.cfd-online.com/Forums/ope...l-centers.html )?

I compared the U().boundaryField()[patchI].patchInternalField and U file in corresponding time output folder, and find they are not exactly the same.

jherb September 10, 2013 16:44

When do you print out the values of the patchInternalField. Are you sure there is no call to the solver or some boundary.correct()? Otherwise the internal values would be modified before stored in the output files.

cctv September 10, 2013 18:22

Quote:

Originally Posted by jherb (Post 451008)
When do you print out the values of the patchInternalField. Are you sure there is no call to the solver or some boundary.correct()? Otherwise the internal values would be modified before stored in the output files.

Yes, I think you are right. Thank you very much.


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