function mesh_collection(num)
% MESH_COLLECTION: Collection of meshing examples from MESH2D users.
%
% mesh_collection(n) will run the nth example.
%
% 1. Simple square domain. Used for "driven cavity" CFD studies.
%
% 2. Rectangular domain with circular hole. Used in thermally coupled CFD
% studies to examine the flow around a heated pipe.
%
% 3. Rectangular domain with circular hole and user defined size
% functions. Used in a CFD study to examine vortex shedding about
% cylinders.
%
% 4. Rectangular domain with 2 circular holes and user defined size
% functions. Used in a CFD study to examine the unsteady flow between
% cylinders.
%
% 5. Rectangular domain with square hole and user defined size functions.
% Used in a CFD study to examine vortex shedding about square prisms.
%
% 6. 3 element airfoil with user defined size functions and boundary layer
% size functions. Used in a CFD study to examin the lift/drag
% characteristics.
%
% 7. U shaped domain.
%
% 8. Rectangular domain with step. Used for "backward facing step" CFD
% studies.
%
% 9. NACA airfoil with boundary layer size functions. Used in a CFD study
% to examine the lift/drag vs. alpha characteristics.
%
% 10. Wavy channel from Kong Zour. Used in a CFD study to examine unsteady
% behaviour.
%
% 11. Tray of glass beads from Falk Hebe. Used in a CFD study to examine the flow
% through past a collection of beads.
%
% 12. "Kidney" shape from Andrew Hanna
%
% 13. Crack geometry from Christoph Ortner.
%
% 14. Africa + Europe + Asia coastline extracted via CONTOUR.m
%
% 15. Simple geometric face.
%
% 16. River system geometry.
%
% 17. Coastline data from Francisco Garcia. PLEASE NOTE! This is a very
% complex example and takes a bit of processing time (50 sec on my
% machine).
%
% I am always looking for new meshes to add to the collection, if you would
% like to contribute please send me an email with an m-file description of
% the NODE, EDGE, HDATA and OPTIONS used to setup the mesh.
%
% Darren Engwirda : 2006-2009
% Email : [email protected]
switch(num)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case 1
node = [0,0; 10,0; 10,1; 0,1];
node = rotate(node,45);
hdata.hmax = 0.02;
[p,t] = mesh2d(node,[],[]);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case 2
theta = 0:pi/50:(2*pi-pi/50);
x = cos(theta)/2;
y = sin(theta)/2;
node = [ x',y'; -5,-5; 5,-5; 5,15; -5,15];
n = size(node,1)-4;
edge = [(1:n-1)' (2:n)'; n,1; n+1,n+2; n+2,n+3; n+3,n+4; n+4,n+1];
hdata.hmax = 0.175;
[p,t] = mesh2d(node,edge,hdata);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case 3
theta = 0:pi/50:(2*pi-pi/50);
x = cos(theta)/2;
y = sin(theta)/2;
node = [ x',y'; -5,-10; 25,-10; 25,10; -5,10];
n = size(node,1)-4;
edge = [(1:n-1)' (2:n)'; n,1; n+1,n+2; n+2,n+3; n+3,n+4; n+4,n+1];
hdata.fun = @const_h;
hdata.args = {-1,25,-3,3,0.1};
options.dhmax = 0.2;
%dmesh2d(node);
[p,t] = mesh2d(node,edge,hdata,options);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case 4
theta = 0:pi/36:(2*pi-pi/36);
x = cos(theta)/2;
y = sin(theta)/2;
cyL1 = [x' y'+1];
cyL2 = [x' y'-1];
box = [-5,-10; 25,-10; 25,10; -5,10];
n1 = size(cyL1,1);
n2 = size(cyL2,1);
c1 = [(1:n1-1)',(2:n1)'; n1,1];
c2 = [(1:n2-1)',(2:n2)'; n2,1];
c3 = [1,2; 2,3; 3,4; 4,1];
node = [cyL1; cyL2; box];
edge = [c1; c2+n1; c3+n1+n2];
hdata.fun = @const_h;
hdata.args = {-1,25,-4,4,0.2};
[p,t] = mesh2d(node,edge,hdata);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case 5
node = [0,-10; 20,-10; 20,10; 0,10; 5,-0.5; 6,-0.5; 6,0.5; 5,0.5];
edge = [1,2; 2,3; 3,4; 4,1; 5,6; 6,7; 7,8; 8,5];
hdata.fun = @case5;
hdata.edgeh = [5, 0.05; 6, 0.05; 7, 0.05; 8, 0.05];
hdata.fun = @const_h;
hdata.args = {5,20,-3,3,0.1};
options.dhmax = 0.15;
[p,t] = mesh2d(node,edge,hdata,options);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case 6
temp = [
0.027490 0.017991 0.899870 0.017200 0.052890 -0.021420 1.214624 -0.113530
0.021231 0.013241 0.871260 0.019430 0.048640 -0.021060 1.193291 -0.106968
0.011552 0.004325 0.835990 0.021190 0.043550 -0.019330 1.150970 -0.093895
-0.004135 -0.011795 0.802400 0.021820 0.039060 -0.015140 1.123617 -0.085397
-0.012160 -0.021418 0.766470 0.020920 0.037490 -0.009480 1.097197 -0.077260
-0.018975 -0.031128 0.753490 0.019960 0.039190 -0.001600 1.058932 -0.065674
-0.022844 -0.037478 0.735200 0.017900 0.043650 0.006190 1.034620 -0.058528
-0.027273 -0.046152 0.729540 0.017030 0.048240 0.010880 0.996129 -0.047562
-0.029451 -0.052343 0.718900 0.015170 0.055920 0.016870 0.967841 -0.039703
-0.030201 -0.061288 0.709580 0.013210 0.062110 0.020990 0.953663 -0.035852
-0.028411 -0.069148 0.701600 0.011010 0.072390 0.026910 0.940446 -0.032286
-0.024596 -0.073614 0.690290 0.007120 0.083730 0.032240 0.926244 -0.028500
-0.018756 -0.075514 0.682300 0.003430 0.104760 0.040220 0.917211 -0.026096
-0.017118 -0.075335 0.676980 -0.000170 0.117300 0.044210 0.909167 -0.023871
-0.016780 -0.076060 0.672990 -0.004160 0.134530 0.047900 0.905108 -0.022393
-0.025493 -0.079097 0.669990 -0.011380 0.153460 0.050670 0.901391 -0.019944
-0.035315 -0.082430 0.673320 -0.019060 0.168330 0.052460 0.900339 -0.012133
-0.042170 -0.084269 0.677310 -0.020330 0.172890 0.052960 0.907722 -0.004509
-0.049084 -0.085176 0.677310 -0.020960 0.182440 0.054030 0.915378 -0.001953
-0.055933 -0.084663 0.668660 -0.021720 0.200270 0.055850 0.920255 -0.001185
-0.059101 -0.083382 0.634730 -0.024850 0.203160 0.056150 0.926453 -0.000706
-0.062122 -0.081635 0.602130 -0.028010 0.234300 0.058920 0.930333 -0.000745
-0.066395 -0.076400 0.567860 -0.031570 0.266130 0.061280 0.937713 -0.000877
-0.067831 -0.070173 0.534930 -0.034700 0.301060 0.063370 0.941848 -0.001212
-0.067150 -0.063754 0.500670 -0.037820 0.335000 0.064970 0.950351 -0.002146
-0.066302 -0.060865 0.466730 -0.040350 0.366270 0.066030 0.960400 -0.003718
-0.063478 -0.055113 0.432470 -0.042250 0.401530 0.066770 0.971630 -0.005932
-0.059726 -0.049766 0.400200 -0.043450 0.434460 0.067000 0.977522 -0.007257
-0.053690 -0.043024 0.368260 -0.043910 0.468400 0.066730 0.989221 -0.010143
-0.046491 -0.036434 0.333670 -0.043750 0.499000 0.066030 0.995344 -0.011797
-0.034454 -0.026043 0.300070 -0.042880 0.533270 0.064740 1.001430 -0.013554
-0.019737 -0.014303 0.267800 -0.041420 0.567860 0.062840 1.020150 -0.019516
-0.006940 -0.004739 0.232870 -0.039160 0.599800 0.060480 1.034272 -0.024486
0.008486 0.006239 0.202590 -0.036530 0.635400 0.057520 1.063809 -0.035726
0.013998 0.010012 0.167000 -0.032930 0.668660 0.053560 1.097886 -0.050076
0.019714 0.013891 0.136730 -0.029770 0.701260 0.049500 1.125638 -0.063296
0.027025 0.018988 0.101460 -0.026280 0.734530 0.044940 1.155608 -0.079195
0 0 0.084170 -0.024550 0.765140 0.040450 1.183517 -0.094908
0 0 0.071120 -0.023250 0.799070 0.035100 1.214740 -0.113210
0 0 0.067860 -0.02282
没有合适的资源?快使用搜索试试~ 我知道了~
Mesh2d_v24.rar_Mesh_the code
共21个文件
m:21个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 192 浏览量
2022-07-15
12:02:58
上传
评论
收藏 108KB RAR 举报
温馨提示
This code to create the mesh
资源推荐
资源详情
资源评论
收起资源包目录
Mesh2d_v24.rar (21个子文件)
Mesh2d_v24
meshpoly.m 11KB
meshfaces.m 10KB
circumcircle.m 945B
meshdemo.m 20KB
triarea.m 405B
fixmesh.m 2KB
inpoly.m 6KB
mesh2d.m 4KB
facedemo.m 1007B
dist2poly.m 4KB
smoothmesh.m 3KB
findedge.m 4KB
quadtree.m 23KB
quality.m 562B
mydelaunayn.m 2KB
mytsearch.m 2KB
connectivity.m 2KB
checkgeometry.m 4KB
tinterp.m 1KB
mesh_collection.m 353KB
refine.m 5KB
共 21 条
- 1
资源评论
钱亚锋
- 粉丝: 88
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功