loganoz / horses3d

HORSES3D: A high-order discontinuous Galerkin solver for flow simulations and multi-physics applications
https://loganoz.github.io/horses3d/
MIT License
112 stars 24 forks source link

Fix calculation of h/n for 2D cases #158

Open Andres-MG opened 1 year ago

Andres-MG commented 1 year ago

We are computing h/n assuming that the cases are always 3D. With this PR, the value of h/n in 2D cases is correct as long as the extruded dimension is 1.

We use this when computing artificial viscosity and LES.

Andres-MG commented 1 year ago

The test NSCylinderSmagorinsky is failing because we were using the 3D definition of delta in a 2D case. How should we handle this?

Andres-MG commented 1 year ago

It turns out that the issue might be in the way we check if a mesh is 2D. I will look into the implementation of CheckIfMeshIs2D:

https://github.com/loganoz/horses3d/blob/def829a952ac82cdfde29b124c1be0d964528ff1/Solver/src/libs/mesh/HexMesh.f90#L1619

We are apparently considering some meshes as 2D even if not specifically stated in the control file.