Postprocessing - 2D profile
Posted: Wed Aug 29, 2018 4:41 pm
Dear Code_Saturne community,
I am a new user of Code_Saturne and I am trying to adapt the cs_user_extra_operation_extract_1d_profile.f90 subroutine on Code_Saturne 5.0.8 in order to make it extract 2D profiles.
The idea is to do a slice, and then compute the average pressure for this slice.
In the attached subroutine, I am extracting a 2D profile at x=0.23 for instance, with 50*50 points for a 0.3*0.3 square-channel.
However, I don't know how to have access to the surface intersection of a given 3D cells and my 2D plan, I order to weight the pressure for each cell with its surface. I have tried, by curiosity, to weight it with the volume of the cells, but of course the average pressure computed was then different as the one computed with ParaView using the "slice+integrate variable" filters. I was also wondering if there were a way to extract this 2D profile without indicating the number of points wanted, as it is done with the slice filter of ParaView for instance ?
What's more, is there a way to adapt this subroutine to use it for the inlet and outlet ? since they are boundary conditions, I think that I have to interpolate first the pressure, is that right ?
Thank you in advance for your help and don't hesitate if you need any clarifications,
Regards,
Robin D.
I am a new user of Code_Saturne and I am trying to adapt the cs_user_extra_operation_extract_1d_profile.f90 subroutine on Code_Saturne 5.0.8 in order to make it extract 2D profiles.
The idea is to do a slice, and then compute the average pressure for this slice.
In the attached subroutine, I am extracting a 2D profile at x=0.23 for instance, with 50*50 points for a 0.3*0.3 square-channel.
However, I don't know how to have access to the surface intersection of a given 3D cells and my 2D plan, I order to weight the pressure for each cell with its surface. I have tried, by curiosity, to weight it with the volume of the cells, but of course the average pressure computed was then different as the one computed with ParaView using the "slice+integrate variable" filters. I was also wondering if there were a way to extract this 2D profile without indicating the number of points wanted, as it is done with the slice filter of ParaView for instance ?
What's more, is there a way to adapt this subroutine to use it for the inlet and outlet ? since they are boundary conditions, I think that I have to interpolate first the pressure, is that right ?
Thank you in advance for your help and don't hesitate if you need any clarifications,
Regards,
Robin D.