Not enough input arguments.

조회 수: 3 (최근 30일)
Johannes Pommerening
Johannes Pommerening 2018년 7월 2일
댓글: Johannes Pommerening 2018년 7월 11일
I want to solve an equation with second derivatives of t and r and got These Problems.
"Not enough input arguments.
Error in PDE_lin_z>pde1DParams (line 70) c = DwDt*B/A;
Error in pdepe (line 246) [c,f,s] = feval(pde,xi(1),t(1),U,Ux,varargin{:});
Error in PDE_lin_z (line 20) sol = pdepe(m,@pde1DParams,@pde1DInitialCondition,@pde1DBoundaryCondition,r,t);"
% <a href="https://de.mathworks.com/help/matlab/ref/pdepe.html">PDEPE 1D Example on Mathworks</a>
m = 1;
r = linspace(0,1,50);
t = linspace(0,5,100);
sol = pdepe(m,@pde1DParams,@pde1DInitialCondition,@pde1DBoundaryCondition,r,t);
w = sol(:,:,1);
surf(r,t,w)
colorbar
title(['Numerical solution computed with ' num2str(length(r)) ' mesh points.'])
xlabel('Radius r')
ylabel('Time t')
function [c,f,s] = pde1DParams(r,t,w,DwDr,DwDt)
E = 70;
rho = 2.6989;
ny = 0.34;
A = (0.5-ny);
B = rho*(1-2*ny)*(1+ny)/E;
c = DwDt*B/A;
f = DwDr+1;
s = 0;
end
function [w0r,w0t] = pde1DInitialCondition(r,t)
w0r = sin(pi*r);
w0t = 0; % ?
end
function [pl, ql, pr, qr] = pde1DBoundaryCondition(rl, wl, rr, wr, t)
pl = wl;
ql = 0;
pr = pi * exp(-t); % z.B
qr = 1;
end

답변 (1개)

Tony Mohan Varghese
Tony Mohan Varghese 2018년 7월 11일
Please refer to the example for Partial Differential Equations. The pdefun and icFun in the PDEPE function signatures are in the form of:
[c,f,s] = pdefun(x,t,u,dudx)
u = icfun(x)
  댓글 수: 1
Johannes Pommerening
Johannes Pommerening 2018년 7월 11일
Thanks. I know this. But I need the second derivative of time. That's the reason why I implemented the extra DwDt. So is this not possible? Other Ideas?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 General PDEs에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by