Finite element model from surfaces with constant mesh sizeΒΆ

As previously, we will generate the finite element model from a group of surfaces. But here we specify the characteristic length of the mesh for the whole mesh.

The process is the exact same.

[ ]:
from shamo import FEM

model = FEM("fem_from_surfaces_lc-constant", "../../derivatives")
[ ]:
from pathlib import Path

data_path = Path("../../rawdata/surfaces")
tissues = {
    f"tissue_{i}": data_path / f"surfaces_tissue{i}.stl" for i in range(1, 8)
}
[ ]:
structure = [
    "tissue_1", [
        ["tissue_2",
            ["tissue_3"]
        ],
        ["tissue_4", [
            ["tissue_5"],
            ["tissue_6",
                ["tissue_7"]
            ]
        ]]
    ]
]

The only difference is how we use the mesh_from_surfaces() method. Here, we provide a value for the lc parameter.

[ ]:
model.mesh_from_surfaces(tissues, structure, 0.005)