Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在matlab中为曲面赋值?_Matlab_3d_Boundary_Fluid Dynamics - Fatal编程技术网

如何在matlab中为曲面赋值?

如何在matlab中为曲面赋值?,matlab,3d,boundary,fluid-dynamics,Matlab,3d,Boundary,Fluid Dynamics,我正在尝试使用MATLAB建立一个3D CFD管道流模型,并希望在管道壁上指定值(边界条件)。我已尝试使用圆柱体功能构建管道: [X Y Z] = cylinder 但这会在曲面上生成几个点,这还不够 另外,是否有更好的方法使用MATLAB构建三维管道流模型?我会使用struct将信息嵌入CFD对象中 % radius = 10 r = 10; % number of radial points = 30 n = 30; CFD_cyl = struct; [CFD_cyl.X, CFD_cy

我正在尝试使用MATLAB建立一个3D CFD管道流模型,并希望在管道壁上指定值(边界条件)。我已尝试使用
圆柱体
功能构建管道:

[X Y Z] = cylinder
但这会在曲面上生成几个点,这还不够


另外,是否有更好的方法使用MATLAB构建三维管道流模型?

我会使用struct将信息嵌入CFD对象中

% radius = 10
r = 10;
% number of radial points = 30
n = 30;
CFD_cyl = struct;
[CFD_cyl.X, CFD_cyl.Y, CFD_cyl.Z] = cylinder(r, n);
% Creates a value vector in the CFD_cyl struct that can relate to the cylinder X, Y, Z
CFD_cyl.value = CFD_cyl.X(:,:) + CFD_cyl.Y(:,:) + CFD_cyl.Z(:,:);

相应地更改要表达的有用关系的值字段。

对于更多点,可以在
圆柱体
函数中指定另外两个参数:
圆柱体(r,n)
,其中
r
是轮廓曲线,
n
是其周长周围等间距点的数量。例如,
cylidner(1100)
创建具有单位半径和100个点的圆柱体。这就是你要找的吗?