corrected mesh generation

This commit is contained in:
jakob.schratter 2026-01-21 15:26:54 +01:00
commit 90a0e83c35

View file

@ -2,22 +2,35 @@
clear all
clc
g=[2 -53 53 0.00 0.00 1 0; % #vertices,v_1x, v_2x, v_1y, v_2y, subdomain_left, subdomain_right
2 53 83 0 105 1 0;
2 83 80 105 105 1 0;
2 80 67.1429 105 66 1 3;
2 67.1429 50 66 6 1 2;
2 50 -50 6 6 1 2;
2 -50 -67.1429 6 66 1 2;
2 -67.1429 -80 66 105 1 3;
2 -80 -83 105 105 1 0;
2 -83 -53 105 0 1 0;
diam_bottom = 50.0;
diam_top = 83.0;
wall_thickness = 3.0;
bottom_thickness = 6.0;
top_level = 105.0;
fluid_level = 66.0;
floor_level = 0.0;
inner_diam = @(height) diam_bottom - 2*wall_thickness + (diam_top - diam_bottom)/(top_level - bottom_thickness)*(height - bottom_thickness);
diam_fluid = inner_diam(fluid_level);
g=[2 -diam_bottom/2 diam_bottom/2 floor_level floor_level 1 0; % #vertices,v_1x, v_2x, v_1y, v_2y, subdomain_left, subdomain_right
2 diam_bottom/2 diam_top/2 floor_level top_level 1 0;
2 diam_top/2 diam_top/2-wall_thickness top_level top_level 1 0;
2 diam_top/2-wall_thickness diam_fluid/2 top_level fluid_level 1 3;
2 diam_fluid/2 diam_bottom/2-wall_thickness fluid_level bottom_thickness 1 2;
2 diam_bottom/2-wall_thickness -(diam_bottom/2-wall_thickness) bottom_thickness bottom_thickness 1 2;
2 -(diam_bottom/2-wall_thickness) -diam_fluid/2 bottom_thickness fluid_level 1 2;
2 -diam_fluid/2 -(diam_top/2-wall_thickness) fluid_level top_level 1 3;
2 -(diam_top/2-wall_thickness) -diam_top/2 top_level top_level 1 0;
2 -diam_top/2 -diam_bottom/2 top_level floor_level 1 0;
% surface between fluid and air
2 -67.1429 67.1429 66 66 3 2;
2 -diam_fluid/2 diam_fluid/2 fluid_level fluid_level 3 2;
% top surface
2 -80 80 105 105 0 3
% top (air) surface
2 -(diam_top/2-wall_thickness) diam_top/2-wall_thickness top_level top_level 0 3
]';