Connecting mesh to merge two surfaces

39 次查看(过去 30 天)
Fabricio Pena
Fabricio Pena 2017-6-23
回答: Marcus 2024-9-13,5:48
Hello,
Is there a way to connect the mesh of these two surfaces, transforming into just one(surface)?
Thanks in advance.
clear all;
% Welding parameters
%----------------------------
U = 33; %Voltage (V)
I = 325; %Current (A)
n = 0.75; %Efficiency
Q = U*I*n;
% Goldak Double-ellipsoid
%------------------------
a = 4.645; %Metade da largura (mm)
b = 6.5; %Penetração (mm)
C1 = 4.645;
C2 = 16;
FF = 0.6;
FR = 1.4;
x = [-10:.2:10];
y= 0;
z1 = [-10:.2:0];
z2 = [0:.2:10];
[xx,zz] = meshgrid(x,z1);
A1 = ((6*sqrt(3)*FF*Q)/(a*b*C1*pi*sqrt(pi)));
B1 = exp(-1.7*(xx.^2/a.^2)).*exp(-5.0*(zz.^2/C1.^2));
[xa,za] = meshgrid (x,z2);
A2 = ((6*sqrt(3)*FR*Q)/(a*b*C2*pi*sqrt(pi)));
B2 = exp(-1.7*(xa.^2/a.^2)).*exp(-5.0*(za.^2/C2.^2));
q1 = A1.*B1;
q2 = A2.*B2;
[X,Z] = meshgrid (x,-15:.05:15);
mesh(xx,zz,q1);
hold on
mesh(xx,za,q2);
shading interp
colormap jet
xlabel(' x (mm)')
ylabel(' Welding direction (mm)')
zlabel(' Power Density (W/mm³)')
  1 个评论
Fernando Freire Ribeiro
Boa tarde Fabrício,
Você conseguiu alguma solução para o problema? Estou enfrentando a mesma dificuldade.
Abraço,
Fernando

请先登录,再进行评论。

回答(2 个)

Marcus
Marcus 2024-9-13,5:45
clear variables;
% Welding parameters
%----------------------------
U = 32.9; %Voltage (V)
I = 1170; %Current (A)
n = 0.95; %Efficiency
Q = U*I*n;
v = 5/1000; % m/s
t = 37;
% Goldak Double-ellipsoid
%------------------------
a = 2; % metade da largura (mm)
b = 2; % Penetração (mm)
c1 = 1.5;
c2 = 3;
ff = (2*c1)/(c1+c2);
fr = (2*c2)/(c1+c2);
% Code
%------------------------
x = -a:.1:a; % Eixo X
y = 0; % Eixo Y (fixo)
z = -3:.1:3; % Eixo Z
% Meshgrid para os eixos X e Z
[xx, zz] = meshgrid(x, z);
% Parte frontal (para z > 0)
A1 = ((6 * sqrt(3) * ff * Q) / (a * b * c1 * pi * sqrt(pi)));
B1 = exp(-3 * (xx.^2 / a^2)) .* exp(-3 * ((zz - v*t ).^2 / c1.^2));
q1 = A1 .* B1 .* (zz >= 0.0001); % Aplica apenas para z > 0
% Parte traseira (para z < 0)
A2 = ((6 * sqrt(3) * fr * Q) / (a * b * c2 * pi * sqrt(pi)));
B2 = exp(-3 * (xx.^2 / a^2)) .* exp(-3 * ((zz - v*t ).^2 / c2.^2));
q2 = A2 .* B2 .* (zz < 0.0001); % Aplica apenas para z < 0
% Soma das distribuições de calor frontal e traseira
q_total = q1 + q2;
% Visualização da superfície combinada
surf(xx, zz, q_total);
shading interp
colormap jet
xlabel(' x (mm)')
ylabel(' Welding direction (mm)')
zlabel(' Power Density (W/mm³)')

Marcus
Marcus 2024-9-13,5:48
Goldak Double Ellipsoid is solved for two axes, if you want to do it in 3D, just place and solve the same shape and change the image output format.

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by