@@ -289,3 +289,37 @@ Two new facets $f^{*}$ are generated from every face $f$:
There are three types of faces: `patch`, `wall` and `empty`. All types are loaded by default, the `patch` and `empty` types can be discarded using the `patchasWall` and `emptyasWall` arguments of :yref:`yade.ymport.blockMeshDict`.
Using polyMesh
===================
The `polyMesh` directory (`constant/polyMesh`) can be loaded as facets (:yref:`yade.utils.facet`) using the :ysrc:`py/ymport.py` module's :yref:`yade.ymport.polyMesh` function::
from yade import ymport
facets = ymport.polyMesh("constant/polyMesh")
O.bodies.append(facets)
The function scans the directory and loads the `points`, `faces` and `boundary` files. The files must be `FoamFiles`` with the correct header (version is `2.0`, type is `ascii`, see: :ysrc:`py/tests/ymport-files/polyMesh/points`).
It parses the files and builds the boundary mesh:
The boundary mesh consists of faces $f$ consists of vertices $v$ in a way that one face is defined by four vertices:
where vertex $v$ is a point in a three dimensional space:
.. math:: v_{ij} = (x_{ij}, y_{ij}, z_{ij}).
:label: eq:vertex
Two new facets $f^{*}$ are generated from every face $f$:
.. math:: f_{0i}^{*} = (v_{i0}, v_{i1}, v_{i2}),
:label: eq:facets:a
.. math:: f_{1i}^{*} = (v_{i2}, v_{i3}, v_{i0}).
:label: eq:facets:b
There are three types of faces: `patch`, `wall` and `empty`. All types are loaded by default, the `patch` and `empty` types can be discarded using the `patchAsWall` and `emptyAsWall` arguments of :yref:`yade.ymport.polyMesh`.
Note: The `polyMesh` is typically more refined than `blockMeshDict`.
MESSAGE(STATUS "${Esc}[93mENABLE_LOGGER needs a workaround with CMAKE_UNITY_BUILD, adding .cpp files containing CREATE_CPP_LOCAL_LOGGER to SKIP_UNITY_BUILD_INCLUSION.${Esc}[0m")
#, 'testColliderByGiulia' # to investigate later maybe, my impression is that due to issue #7 the results are randomly different in that ill-posed periodic problem