help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Transcendental equation


From: Fausto Arinos Barbuto
Subject: Re: Transcendental equation
Date: Fri, 09 May 2014 23:04:56 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 05/08/2014 04:36 PM, guido.bonalumi wrote:
Hi everyone.
I am writing again because my code is not working properly. I need your help
because I can not find the error.
I have to solve the set of equations presented in the pic for a certain time
interval:

<http://octave.1599824.n4.nabble.com/file/n4663954/cylinder.png>

This is the part of my code that should solve these equations:

/f=@(x)(x*(besselj(1, x))/(besselj(0, x))-Bi);
zeta=[1:N]';
C=zeta;
for n=1:N
        zeta(n)=fsolve(f, ((n-1)*pi+pi/4));
        C(n)=(2/zeta(n))*(besselj(1, zeta(n)))/((besselj(0, 
zeta(n)))^2+(besselj(1,
zeta(n)))^2);
end

i=0;
theta=zeta;
theta_star=Fo*0;
T=Fo*0;
for t=0:t_step:tmax
        i=i+1;
        for n=1:N
                theta(n)=C(n)*exp(-(zeta(n))^2*Fo(i));
                theta_star(i)=theta_star(i)+theta(n);
        end
        T(i)=theta_star(i)*(Ti-Tf)+Tf;
end/

Where /t/ is the time variable and /Fo(i)=/:

/t=[0:t_step:tmax];
Fo=(Alpha.*t/Lc^2)';/

with /Alpha/ known.

The resulting curve /T=f(t)/ apparently is wrong. Does anybody find anything
wrong?



--
View this message in context: 
http://octave.1599824.n4.nabble.com/Transcendental-equation-tp4663840p4663954.html
Sent from the Octave - General mailing list archive at Nabble.com.


You have a pretty interesting heat transfer problem.  What is a typical /Alpha/ 
array?
I would like to give your code a shot.

Fausto






reply via email to

[Prev in Thread] Current Thread [Next in Thread]