Problems with Paraview

  • Alicia
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
14 years 4 days ago #4029 by Alicia
Problems with Paraview was created by Alicia
Hi all,

I'm using Paraview for the post processing of some cfd calculations. I find it quite efficient, but I still have some problems doing what I want :

1) I want to integrate the pressure on a surface of my domain. My surface is curved, and is containing something like 4000 cells, so I don't really feel like selecting each cell one by one... How can I select the cells on the surface ? I already had a look at the selection options of paraview, and basically what I would like to do is to select a block which would be my surface. I'm using GMSH to mesh my geometry, and in GMSH I defined physical groups (I have one group for my curved surface), so in code_saturne I use these groups to define my boundary conditions. How come I can't find my groups in the post pro files (EnSight Gold format for paraview) when I read them in Paraview ?? Do I have something to do to keep them from Saturne to Paraview ?

2) I will need to compute flow calculations on big meshes (at least a few millions cells). I already tried to run a calculation with c_s : I ran the same case twice, once with a large mesh (just a few thousands cells), and then I refined my mesh (so now it contains around 2 Million cells) and ran exactly the same calculation. I had no problem during the calculation, but when loading the results in Paraview, I can only see the data I obtained with the small mesh. I am able to load the data with the big mesh, PV can read it (in the INFO tab, I have the number of cells, the range values for the variables, ...), but I can not display any of the data. I attach here two screenshots, one with the small mesh and the other for he big mesh, so I hope someone can help me on this...
small mesh [file]
big mesh [file]<br /><br />Post edited by: Alicia, at: 2010/03/24 17:07
Attachments:

Please Log in or Create an account to join the conversation.

  • Alicia
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
14 years 4 days ago #4030 by Alicia
Replied by Alicia on topic Re:Problems with Paraview
seems I can't attach the files... hope it won't be a problem for you to help me !<br /><br />Post edited by: Alicia, at: 2010/03/24 17:18
Attachments:

Please Log in or Create an account to join the conversation.

More
14 years 3 days ago #4033 by David Monfort
Replied by David Monfort on topic Re:Problems with Paraview
Hello Alicia,

I cannot answer to your second question, as I have no idea why it would fail to load 2 millions of cells. I already did so with ParaView.

Concerning your first question, Code_Saturne &quot;forgets&quot; the boundary zones (groups) definition when post-processing. This is something we intend to change in a next version...
What you can do is add a new post-processing part (writer in Code_Saturne jargon) which will contain only the relevant boundary faces you need. Have a look to the usdpst(part definition) and usvpst(variable definition) user routine for some examples.

You can also compute yourself the pressure average by using the usproj routine (proj == project, called at the end of each time-step) with something like that (from memory, and provided I understood your question):
[code:1]
fx = 0.d0
fy = 0.d0
fz = 0.d0
surf = 0.d0

call getfbr('outlet', nelt, lstelt)

do ielt = 1, nelt

ifac = lstelt(ielt)
iel = ifabor(ifac)

! Compute the pressure efforts (pfac = pcell because dp/dn = 0 at the walls)
fx = fx + rtp(iel,ipr(1))*surfbo(1,ifac)
fy = fy + rtp(iel,ipr(1))*surfbo(2,ifac)
fz = fz + rtp(iel,ipr(1))*surfbo(3,ifac)

surf = surf + ra(isrfbn + ifac - 1)

enddo

! Parallel code to sum over the processors
call parsom(fx)
call parsom(fy)
call parsom(fz)
call parsom(surf)
...
[/code:1]

The idea is to sum, not the pressure (you cannot as your surface is curved), but the efforts.

Hope this helps.
David<br /><br />Post edited by: David Monfort, at: 2010/03/25 23:48

Please Log in or Create an account to join the conversation.

  • Alicia
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
13 years 11 months ago #4055 by Alicia
Replied by Alicia on topic Re:Problems with Paraview
Hi David,

Thank you very much for your answer, it seems to work perfectly. I just have a question about what you wrote :
how works the line surf = surf + ra(isrfbn + ifac - 1). I assumed it gives the total surface of the object, but don't really understand how.

For my second question about visualization of big amounts of data with Paraview, it was just a problem of mode of representation (by default it was outline shown, and with the other cases I treated the default mode was surface)... Once the mode of representation was changed, I had no more problems.

By the way, I had a look at the routines usdpst and usvpst, and was able to add new post processing parts. Do I have to specify each variable I want to post process on these parts in usvpst ? (I'd like to obtain the same variables as I have when I don't add parts : velocity, pressure, ...)

Thanks again for the help !

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #4056 by David Monfort
Replied by David Monfort on topic Re:Problems with Paraview
To clearly understand the reasoning behind the use of the face area, you might want to have a look at the user guide (especially the chapter Main variables, the pointer isrfbnis described at page 44 in the 2.0-rc1 documentation). Quickly, think the ra array as a macro-array in which every piece of Fortran memory is defined. You can split this macro-array in several slices and one of this slice corresponds to the &quot;boundary face area&quot; array (and you access this array by a pointer to the first box). This is like dynamic memory allocation in Fortran 77, a bit complex somehow :evil:

Concerning your other question about the variable definition on a user-define mesh, the answer is yes if you are using the 2.0-rc1 (and perhaps also the 2.0-beta2, I cannot remember correctly here...). If you look at the end of the usdpst routine, you'll find a call to a subroutine named pstcat. This subroutine enables the user to associate a mesh (or part in Code_Saturne jargon) with, for example, the standard one.
[code:1]
ipart = 1
icat = -1
call pstcat(ipart, icat)[/code:1]
In this example, the user is assigning all the variables defined on mesh &quot;-1&quot; (the whole volume) to the user part number &quot;1&quot;.

Let me know if I'm not clear enough :whistle:
David<br /><br />Post edited by: David Monfort, at: 2010/03/30 00:28

Please Log in or Create an account to join the conversation.

  • Alicia
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
13 years 11 months ago #4058 by Alicia
Replied by Alicia on topic Re:Problems with Paraview
Thanks again for the quick reply.

I am using Code Saturne 1.3.3. in which I don't have such a subroutine allowing me to associate the variables of different meshes.
The only thing I found was to set IVARPR to 1 (meaning that the variable already exists in the parent mesh)...but I'm quite stuck again ! The results I got were really wierd (they didn't match at all the ones I got with only the fluid volume, without using usdpst and usvpst).
Do you have an idea on how I can simply get the velocity and the pressure on the parts created in usdpst ?

I have another question, which is bothering me for a while : in CS we have Pressure and Total Pressure. From the documentation I read on that subject, Pressure is a reduced pressure used to obtain hydrostatic pressure, but I don't really understand what it means physically. And total pressure, given the range of values and the repartition I have in Paraview, I assume it has something to do with atmospheric pressure...
I am running a test case (to find the right procedure to use) in which I have to compare my results to the ones found previously on the same case with another software (Nastran). I'd like to have a repartition of total pressure in terms of sum of dynamic pressure and static pressure on one of the face of my domain. When I use usproj to sum the pressures (here I used the variable IPR) (and then divide the sum by the surface to obtain a mean value), I got the value I want, but then looking at the pressure field on my face it isn't what I'd like it to be...

Thanks again for all your explanation, it helps me a lot !

Please Log in or Create an account to join the conversation.

Moderators: catux
Time to create page: 0.159 seconds
Powered by Kunena Forum