Nonlinear equations with two variables and a changing parameter
이전 댓글 표시
Hi,
I thank you for your kind help in advance!
I am solving a system of nonlinear equations with two variable x and t, and a changing parameter V. it may be sovled using a fsolve in matlab.
Then, I want to plot a figure in which the variable x or t as a function of log(V), that is,
The nonlinear equation is desribed as below code:
%The below is a system of nonlinear equations with two variables x, t, and
%a changing parameter V. 0<x<0.2, t is around 6.3e6, 0.001<V<1.
V=logspace(-3,0,10000); % A changing parameter 0.001<V<1
T=@(x,t,V) 294+8.8e-4.*t.*V.^(0.5); %Temperature
D=@(x,t,V) 1.9e-6+4.5e-7.*erf((log10(V)-log10(0.1))/0.25); %Grain size
fn=@(x) ((0.2-x)./(x-0.02))^(-2); %porosity function in normal direction
gsg=@(x,t,V) 2.4e-10.*exp(-213e3./8.31./T(x,t,V)).*fn(x).^1.7./D(x,t,V).^3; %shear strain due to granular flow
ft=@(x) (1-x./0.2).^2; %porosity funciton in shear direcdtion
gps=@(x,t,V) 1.33e-21.*exp(-213e3./8.31./T(x,t,V)).*(ft(x).*t).^1.7./D(x,t,V).^3; %shear strain due to pressure solution
F1=@(x,t,V) 2e-5.*(gsg(x,t,V)+gps(x,t,V))-V; %velocity
F2=@(x,t,V) 1e8.*(0.867+0.01.*log(gsg(x,t,V))-1.14.*x)./(1-(0.64+0.01.*log(gsg(x,t,V)).*1.14.*(0.2-x)))-t; %shear stress
for k=1:length(V)
fun=@(x,t)[F1(x,t,V(k))
F2(x,t,V(k))];
y(k)=fzero(fun,.19999,6.3e6);%plotted to get initial guess close, function blows up belond about .2 and goes imaginary
end
figure (1)
plot(log10(V),t,'k',LineWidth=2) % I want to plot t as a function of V
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Systems of Nonlinear Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!