Hello,
In order to calculate a pressure coefficient Cp of a flow past an obstacle, we use the call to function FINDPT to search the points near and far from the structure. We remark that Code_Saturne does not find the good points (points selected are found very far from the chosen coordinates).
We use a .des mesh and the Code_Saturne version is 2.0.1.
Did anybody encounter such a problem ? Should it be a problem of mesh numbering in the pre-processor ? We join our usproj.f90, if someone can find a mistake...
Best regards,
Pauline Delteil & Marie Pomarède
Find a point on the mesh with FINDPT
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
Find a point on the mesh with FINDPT
- Attachments
-
- usproj_cyl_perm.f90
- (19.17 KiB) Downloaded 237 times
Re: Find a point on the mesh with FINDPT
Hello,
The value of iphas is missing in your routine. Could you post the set up and the mesh of your simulation?
Mickaël
The value of iphas is missing in your routine. Could you post the set up and the mesh of your simulation?
Mickaël
Re: Find a point on the mesh with FINDPT
Hello,
Are you running on multiple processors ? The points selected are only meaningful on the rank which handles them.
This seems handled correctly in your file, but did you account for it when checking points ? Also remember that findpt is used here to locate the closest cell centers, and not vertices (so make sure you compare with vertices).
Finally, you may check if the mesh uses the correct units by reading the preprocessor log file to see if the min/max coordinates are what you expect.
Best regards,
Yvan
Are you running on multiple processors ? The points selected are only meaningful on the rank which handles them.
This seems handled correctly in your file, but did you account for it when checking points ? Also remember that findpt is used here to locate the closest cell centers, and not vertices (so make sure you compare with vertices).
Finally, you may check if the mesh uses the correct units by reading the preprocessor log file to see if the min/max coordinates are what you expect.
Best regards,
Yvan
Re: Find a point on the mesh with FINDPT
Hello Yvan and Mickaël,
Thank you for your quick answers. Forgetting to put IPHAS = 1 was our first error.
Then, our second mistake was in checking the functionning of FINDPT : we were checking the closest vertex and not cell center, which is finally well found by the function (we work with single processor and coordinates were well defined).
Finally, as the pressure coefficient calculation was constructed from a too fast "copy-paste" of the usproj.F example, we introduced a bug while introducing bad variables in construction of the pressure points XU and XW, calling XU = RTP(IEL,IPR(IPHAS)) instead of XU = RTP(IEL1,IPR(IPHAS)) for example, as regards the cell number index.
Thank you for the time and we apologize for this useless post...
Best regards,
Pauline Delteil & Marie Pomarède
Thank you for your quick answers. Forgetting to put IPHAS = 1 was our first error.
Then, our second mistake was in checking the functionning of FINDPT : we were checking the closest vertex and not cell center, which is finally well found by the function (we work with single processor and coordinates were well defined).
Finally, as the pressure coefficient calculation was constructed from a too fast "copy-paste" of the usproj.F example, we introduced a bug while introducing bad variables in construction of the pressure points XU and XW, calling XU = RTP(IEL,IPR(IPHAS)) instead of XU = RTP(IEL1,IPR(IPHAS)) for example, as regards the cell number index.
Thank you for the time and we apologize for this useless post...
Best regards,
Pauline Delteil & Marie Pomarède