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

1 Ansicht (letzte 30 Tage)
Katy Bradford
Katy Bradford am 18 Apr. 2017
Bearbeitet: Mukul Rao am 24 Apr. 2017
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!

Antworten (1)

Mukul Rao
Mukul Rao am 24 Apr. 2017
Bearbeitet: Mukul Rao am 24 Apr. 2017
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');

Kategorien

Mehr zu Oceanography and Hydrology finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by