필터 지우기
필터 지우기

How do I create a complex geometry for heat transfer analysis?

조회 수: 2 (최근 30일)
Katy Bradford
Katy Bradford 2017년 4월 18일
편집: Mukul Rao 2017년 4월 24일
I'm trying to model heat and mass transfer during transpiration and I'm having trouble creating the geometry of a leaf. I have the following geometry model:
if 0 <= epsilon < 0.015 n = 0.5*(nmax-0.0004)*(1-cos(2*pi*epsilon/0.03))+0.0004 elseif 0.015 <= epsilon <= 0.03 n = nmax*sqrt(1-(4/0.0009)*(epsilon-0.015)^2)
where epsilon is the x axis and n is the y axis. The value of n needs to be plotted + and - to create the leaf shape.
How do I plot this shape? I get an empty figure when I run this code. Thanks in advance for your assistance!

답변 (1개)

Mukul Rao
Mukul Rao 2017년 4월 24일
편집: Mukul Rao 2017년 4월 24일
Hi,
Here is a code snippet that shows you how to plot the leaf, essentially you are also plotting the reflection of "n" along the X axis. If you have a parametric equation for the leaf that covers both quadrants, then you need not have any special treatment for the "reflection"
epsilons = linspace(0,0.03,50);
nmax = 1;
n = zeros(length(epsilons),1);
for i = 1:length(epsilons)
epsilon = epsilons(i);
if (0 <= epsilon && epsilon < 0.015)
n(i) = 0.5*(nmax-0.0004)*(1-cos(2*pi*epsilon/0.03))+0.0004;
elseif (0.015 <= epsilon && epsilon <= 0.03)
n(i) = nmax*sqrt(1-(4/0.0009)*(epsilon-0.015)^2);
end
end
plot(epsilons,n,epsilons,-n);
xlabel('epsilon');
ylabel('n');

카테고리

Help CenterFile Exchange에서 Geometry and Mesh에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by