Is there the function of "DEBYE" in MATLAB ?

Hi
I need the "DEBYE model". how can I plot that in matlab ? any suggestion ?
thanks in advance

7 Kommentare

thanks for reply, but when i run it, it did not work, it says "not enough input". I am new at this study area. I just want to see the general "DEBYE" graph first.
the code is copied from that file. Thanks in advance...
function D1 = debye1(x)
%DEBYE1 First order Debye function.
% Y = DEBYE1(X) returns the first order Debye function, evaluated at X.
% X is a scalar. For positive X, this is defined as
%
% (1/x) * integral from 0 to x of (t/(exp(t)-1)) dt
% A proper FORTRAN implementation of this function is available in the
% MISCFUN Package written by Alan MacLead, available as TOMS Algorithm 757
% in ACM Transactions of Mathematical Software (1996), 22(3):288-301.
% Written by Peter Perkins, The MathWorks, Inc.
% Revision: 1.0 Date: 2003/09/05
% This function is not supported by The MathWorks, Inc.
%
% Requires MATLAB R13.
if abs(x) >= realmin
D1 = quad(@debye1_integrand,0,abs(x))./abs(x) - (x < 0).*x./2;
else
D1 = 1;
end
function y = debye1_integrand(t)
y = ones(size(t));
nz = (abs(t) >= realmin);
y(nz) = t(nz)./(exp(t(nz))-1);
ADNAN KIRAL
ADNAN KIRAL am 22 Jan. 2021
i want to plot this simple "DEBYE" graph which is discussed in this study.
can you please help me to plot ONLY this BLUE graph in matlab ? it is claimed to be "DEBYE". thanks again...
Is that possible to get it in MATLAB ?
X = linspace(-10, 10);
Y = arrayfun(@debye1, X);
plot(X, Y)
ADNAN KIRAL
ADNAN KIRAL am 22 Jan. 2021
thanks again, just a question, why is it opposite of the given image ? can i get the blue line ? my appoligies for that. I am just trying to see it before going into details. can you please help me to get ONLY BLUE line ? It says that It is "DEBYE".
THANKS...
X = logspace(-3,2);
Y = arrayfun(@debye1, X);
semilogx(X, Y)
However, this function has no parameters such as or W so it is not clear that it is the same model that you need.
ADNAN KIRAL
ADNAN KIRAL am 23 Jan. 2021
many thanks. Appriciate that.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Jens
Jens am 5 Feb. 2022

1 Stimme

Hello,
you mean the Debye-function, specific heat in 3D?
you can easily program it yourself. Either by numerical integration of the definition equatin, or a rational approximant:
R=8.314462618; % molar gas constant in J/mol/K CODATA 2018, exact.
xn=Theta./T;
I=@(x) x.^4.*exp(-x)./(exp(-x)-1).^2;
DEBYE=R*9*(1./xn).^3.*integral(I,0,xn,'reltol',1e-9,'abstol',1e-11);
or
N=[0.0279254827 -0.0358437761 1.05224663 17.2857105 64.7520511 226.68446];
D=[0.000119451046 -0.000210411972 0.00744002583 0.0346090463 0.337538084 ...
1.4272431 9.53997783 21.5840170 75.5614867]; % R. J. Goetsch+ (2011)
res1=R*polyval(N,Tn)./polyval(D,Tn);
res=reshape(res1,size(T));

Kategorien

Produkte

Version

R2020a

Gefragt:

am 22 Jan. 2021

Beantwortet:

am 5 Feb. 2022

Community Treasure Hunt

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

Start Hunting!

Translated by