# Clarification about Mesh

**URL:** <https://pyfr.discourse.group/t/clarification-about-mesh/362>\
**Category:** General\
**Tags:** methods\
**Created:** [18 March 2021 12:16 UTC](https://pyfr.discourse.group/t/clarification-about-mesh/362 "2021-03-18T12:16:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AmoraMadrid](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@AmoraMadrid](https://pyfr.discourse.group/u/AmoraMadrid)\
**Post date:** [18 March 2021 12:16 UTC](https://pyfr.discourse.group/t/clarification-about-mesh/362/1 "2021-03-18T12:16:11Z")

</div>

Hello to everyone, I am new to pyfr and CFD and need some clarification.

Pyfr split the cells into 4 smaller cells and the command quad-deg( degree of quadrature rule for anti-aliasing) refers to how the solver calculates the solutions [Gaussian quadrature - Wikipedia](https://en.wikipedia.org/wiki/Gaussian_quadrature).

In some points, there are various solutions, are there ways or methods that I could do so that instead of having many solutions in one point, I can obtain solutions in different points to gain more information.

Any reply would be warmly appreciated.  
Have a good day.

---

<div class="post-metadata">

**Author:** ![WillT](https://avatars.discourse-cdn.com/v4/letter/w/bc79bd/32.png) [@WillT](https://pyfr.discourse.group/u/WillT)\
**Post date:** [18 March 2021 16:26 UTC](https://pyfr.discourse.group/t/clarification-about-mesh/362/2 "2021-03-18T16:26:14Z")

</div>

Welcome to the PyFR Discourse.

I’m not entirely sure what you mean by your question, but maybe some more background on the method might help. Sorry in advance if I tell you what you already know.

So what PyFR is implementing is broadly the FR method of Huynh (2007) and its extensions. The methods sits somewhere between finite element/discontinuous Galerkin and finite difference (sort of).

At the input we take a mesh, this defines the element boundaries. PyFR will then place within these elements a set of solution points and flux points (interface points), the exact method that is used to place these points is set in the `.ini` file. For lines, quadrilaterals, and hexahedrals, yes, Gaussian quadrature is a perfectly reasonable way to do that.

When the solution is computed it is done at these points and polynomial interpolation is used to calculate derivatives among other things. By way of example a single p=4 hexahedral element will have 125 solution points.

Coming to anti-aliasing, for non-linear equation sets if you are under-resolved then non-linearities can lead to large amplitude high frequency content that may only be resolved in its aliased representation. This behaviour is often not desirable and can even lead the simulation to diverge. Two potential remedies are: more resolution or anti-aliasing. For the later we use a similar method to Spiegel et al. (2015), which can be tersely summarized as: interpolate the solution to AA points, calculate the flux at these points, calculated the divergence for the flux, and then use an L2 projection back to the solution points.

For both the solution points and anti-aliasing points the number that are placed inside an element is determined by the order, dimension, and approximation space. This last point is only indirectly controlled in PyFR through the quadrature used to set the point locations.

When you export the solution file to VTU file for visualisation, you then have several options relating to how must resolution you’d like included. See the posts by @GonzaloS for more on that.

I hope this helps and say if I’ve missed the point of your question

---

<div class="post-metadata">

**Author:** ![AmoraMadrid](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@AmoraMadrid](https://pyfr.discourse.group/u/AmoraMadrid)\
**Post date:** [18 March 2021 17:28 UTC](https://pyfr.discourse.group/t/clarification-about-mesh/362/3 "2021-03-18T17:28:39Z")

</div>

Thank you very much @WillT for your insightful reply! That is exactly what I was searching for, specially this one [https://github.com/PyFR/PyFR/pull/195](https://github.com/PyFR/PyFR/pull/195) [High-Order VTK Output Mode](https://pyfr.discourse.group/t/high-order-vtk-output-mode/353).

If I am not a bother, can you enlighten us how to update pyfr? so we can input --order _p-order_ in the export command. Right now in my version, it is not recognizing the command order.

---

<div class="post-metadata">

**Author:** ![GonzaloS](https://avatars.discourse-cdn.com/v4/letter/g/e19b73/32.png) [@GonzaloS](https://pyfr.discourse.group/u/GonzaloS)\
**Post date:** [18 March 2021 18:42 UTC](https://pyfr.discourse.group/t/clarification-about-mesh/362/4 "2021-03-18T18:42:55Z")

</div>

Hi @AmoraMadrid,

As the functionality that you mention is still not available in `PyFR v1.11`, you can use the following command to install the develop branch (beware as this does not represent an official release of the code)

`pip install git+https://github.com/PyFR/PyFR.git@develop`

You might need to uninstall `PyFR` before launching this command (or maybe you may consider using `virtualenv`). I would recommend to run `pip install pyfr` once `PyFR v1.12` is released to ensure that you are using a stable version of the solver.

Let us know if you you need any further information!

---

<div class="post-metadata">

**Author:** ![AmoraMadrid](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@AmoraMadrid](https://pyfr.discourse.group/u/AmoraMadrid)\
**Post date:** [18 March 2021 19:22 UTC](https://pyfr.discourse.group/t/clarification-about-mesh/362/5 "2021-03-18T19:22:36Z")

</div>

Thank you @GonzaloS! I will try.
