Hi Freddie, 

Thanks for your fast response!  This is very useful.

Regards,

Eduardo

On Sunday, November 18, 2018 at 9:26:44 PM UTC, Freddie Witherden wrote:
>
> Hi Eduardo, 
>
> On 18/11/2018 21:06, Eduardo Ramos Fernandez wrote: 
> > BTW, I am having trouble getting from the .VTU files the boundary 
> > elements to do post-processing. I have checked with Paraview and it 
> > seems there is no information about them inside. I would have expected 
> > to be able to get them from the "Physical tags" provided in the GMSH 
> > file. Any advice on this? 
>
> In the PyFR mesh format boundaries are defined as a sequence of faces. 
> For example, consider the couette flow test case which comes as part of 
> PyFR.  After importing the .msh and running h5ls we see: 
>
> $ h5ls couette_flow_2d.pyfrm 
> bcon_bcwalllower_p0      Dataset {8} 
> bcon_bcwallupper_p0      Dataset {8} 
> con_p0                   Dataset {2, 81} 
> mesh_uuid                Dataset {SCALAR} 
> spt_quad_p0              Dataset {4, 37, 2} 
> spt_tri_p0               Dataset {3, 10, 2} 
>
> where the relevant boundary regions are given by the bcon_ prefixed 
> datasets.  Inspecting one of these we find: 
>
> In []: import h5py 
>
> In []: import numpy as np 
>
> In []: f = h5py.File('couette_flow_2d.pyfrm') 
>
> In []: print(np.array(f['bcon_bcwallupper_p0'])) 
> [(b'quad', 31, 3, 0) (b'quad',  7, 1, 0) (b'quad', 27, 1, 0) 
>  (b'quad', 19, 3, 0) (b'tri',  0, 0, 0) (b'tri',  1, 0, 0) 
>  (b'quad', 17, 0, 0) (b'quad', 32, 2, 0)] 
>
> where the tuples are of the form (element type, element number, face 
> number, unused).  So the first member of the 'bcwallupper' boundary is 
> face 3 of quad 31.  From this you can trivially obtain the elements 
> which border the boundary.  Such information, however, is not carried 
> over to the .VTU file (which only has the concept of sub-divided 
> elements as opposed to faces). 
>
> The best solution depends on exactly what information you want from the 
> boundary.  If it is just the solution (and gradients thereof) then this 
> is something which is not too difficult (for example the fluidforce 
> plugin --- which is designed to integrate up forces on boundaries --- 
> does exactly this with minimum fuss and no subdivision). 
>
> Regards, Freddie. 
>

-- 
You received this message because you are subscribed to the Google Groups "PyFR 
Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyfrmailinglist+unsubscr...@googlegroups.com.
To post to this group, send an email to pyfrmailinglist@googlegroups.com.
Visit this group at https://groups.google.com/group/pyfrmailinglist.
For more options, visit https://groups.google.com/d/optout.

Reply via email to