How to generate a proper mesh

1 view (last 30 days)
Benjamin Graef
Benjamin Graef on 28 Nov 2020
Hello, I have problems when generating a good mesh for my geometry. Following code is just the generating of the mesh to the given geometry
% load the geometry data %
load('geometryDesc.mat');
load('nameSpace.mat');
load('unionOfShapes.mat');
% decompose the geometry %
decomposedGeometry = decsg(geometryDescription, unionOfShapes, nameSpace);
% create the model, number of equations %
model = createpde(3);
% set the geometry %
geometryFromEdges(model, decomposedGeometry);
generateMesh(model, 'Hmax', 0.5, 'Hmin', 1e-200);
pdemesh(model)
After ploting the mesh I get follwing picture. I do not understand why there is a that redline (which I suppose should be alligned with the edges of my geometry) bend upwards like a triangle. This makes the output of my FEM useless because the electric potential (which is part of what I want to calcualate) is also shaped like that (which makes no sense). The shape of that redline depends on the 'Hmin' parameter of the function generateMesh, but I do not understand how and why.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!