フィルターのクリア

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 Center および File ExchangeGeometry and Mesh についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by