How can I know the DoFs with .pyfrs file

When I test some unstructured case, when applying high-order scheme, the Dofs are increasing rapidly, how to get the number of degrees of freedom in a simple way?

The h5ls tool will let you know. For example:

h5ls inc_cylinder_2d-65.00.pyfrs
config                   Dataset {SCALAR}
config-0                 Dataset {SCALAR}
mesh_uuid                Dataset {SCALAR}
soln_quad_p0             Dataset {16, 3, 175}
soln_quad_p1             Dataset {16, 3, 21}
soln_tri_p0              Dataset {10, 3, 555}
soln_tri_p1              Dataset {10, 3, 864}
soln_tri_p2              Dataset {10, 3, 906}
soln_tri_p3              Dataset {10, 3, 906}
stats                    Dataset {SCALAR}

where the total number of DOF’s comes from summing the products of the dimensions of the various soln arrays.

Regards, Freddie.

1 Like

Hello, let’s dig a bit deeper. I would like to confirm the meanings of the three numbers in the dataset. For example:

soln_quad_p0             Dataset {16, 3, 175}

The first number, 16, should indicate the number of high-order points for a third-order quadrilateral element. The second number, 3, represents the order of the elements. The third number, 175, should indicate the number of elements. I understand that multiplying the high-order points by the number of elements makes sense. However, why multiply by the order of the elements as well?
Additionally, aside from the special case of corner points on the boundary, high-order points are often shared by multiple elements. Wouldn’t the method you described lead to double counting?

What I’m particularly interested in is, if I input a first-order quadrilateral element and set the order to 3 in the .ini file, it can output third-order pyfrs files. This is truly amazing. Does such powerful technology make some high-order mesh generation tools obsolete? How should we understand this technology?

Regards.

The 3 here refers to the number of equations. In particular it looks like you are solving an incompressible problem (variables u, v, p) in 2D. It has nothing to do with the order.

As has been noted on several occasions there is no hard relationship between the order of the mesh and the order of the solution. The order is the mesh is chosen to facilitate an accurate representation of the geometry. If the geometry is simple (such as a channel) then a first order mesh is fine. The solution order is selected to enable the relevant physics to be resolved on the chosen grid. Simple domains can still have complicated physics (turbulent channels for instance).

Regards, Freddie.

Alright, having five variables for the three-dimensional Navier-Stokes equations makes sense, and I appreciate your correction.

Regarding what you mentioned about the order of the mesh and the order of the solution, I’ll definitely put in effort to understand it better

Thank you for your timely response.