exasim-project / NeoFOAM

WIP Prototype of a modern CFD core
27 stars 4 forks source link

Create helper function to create 1d mesh #159

Open greole opened 2 weeks ago

greole commented 2 weeks ago

for better testing we should also provide a function to create a 1d mesh which allows to insert number of cells along the 1d axis. With the following interface UnstructuredMesh create1DMesh(const Executor exec, size_t nCells); similiarly to https://github.com/exasim-project/NeoFOAM/blob/main/include/NeoFOAM/mesh/unstructured/unstructuredMesh.hpp and https://github.com/exasim-project/NeoFOAM/blob/main/src/mesh/unstructured/unstructuredMesh.cpp

chihta-wang commented 6 days ago

What does nBoundaries in theunstructuredMeshactually mean? Is it the number of different boundary patches?

greole commented 6 days ago

What does nBoundaries in theunstructuredMeshactually mean? Is it the number of different boundary patches?

yes

chihta-wang commented 6 days ago

In the BoundaryMesh class, what is the difference between the variables cn and sf?

greole commented 5 days ago

sf is what mesh.Sf() returns, ie the cell surface area vector (area and normal of faces) see https://www.openfoam.com/documentation/guides/v2006/api/classFoam_1_1fvMesh.html#a9dd61db5922c82527289434350fa0f17 and cn should be afaik the neighbour cell centres https://www.openfoam.com/documentation/guides/latest/api/classFoam_1_1fvPatch.html#a6644397238b36a49d0caf58d1d88e18d