Why does this function always gets solved at the initial point even though I keep on trying for different initial guess ? What is wrong with my fsolve ? Any kind of help will be appreciated
信息
此问题已关闭。 请重新打开它进行编辑或回答。
显示 更早的评论
if true
% Bubble formation in highly viscous liquids
% Model: Ramakrishnan, Kumar, Kuloor 1970
% taking place under constant flow condition.
%first Stage v_fb % final bubble is v_fin % two separate functions are used for each:
function [v_finRam,v_rate,v_fbRam,v_secRam] = mainRamakrishnafb ()
v_fbRam = zeros(100,1);
v_secRam = zeros(100,1);
v_rate = zeros(100,1);
v_finRam = zeros(100,1);
A = zeros(100,1);
B = zeros(100,1);
C = zeros(100,1);
E = zeros(100,1);
g= 9.81;
sig= 0.072;
D_or= 2e-03; % Orifice Diameter
denliq= 1000;
vis= 8.9e-4; %Dynamic Viscosity of the liquid (Pa.s)r
dengas= 1.225;
theta= 70*(pi/180);
options = optimoptions('fsolve','TolX',1e-15);
options = optimoptions(options,'TolFun',1e-15);
%for i=1:15
%v_rate(i) = 1e-6+(i-1)*5e-6; % Volumetric Flow Rate
for i=1:100;
v_rate(i) = 1e-6+(i-1)*1e-6;
v_fbRam(i) = fsolve(@(x)Ramakrishna(x,v_rate(i)),1e-6); % force balance bzbble volume = v_fb
end
Qcrit = (pi*((16/(3*(g^2)))^(1/6))*((sig*(D_or/2)/denliq)^(5/6)))*10^6;
plot (v_rate,v_fbRam,'Marker','o')
function F1 = Ramakrishna(x,v_rate)
g= 9.81;
sig= 0.072;
D_or= 2e-03; % Orifice Diameter
denliq= 1000;
vis= 8.9e-4; %Dynamic Viscosity of the liquid (Pa.s)r
dengas= 1.225;
theta= 70*(pi/180); % The contact angle
F1 = ((11*v_rate^2)/((192*pi)*(((3)/(4*pi))^(2/3))*g))+(((3*vis*v_rate)*(x^(1/3)))/(2*((3)/4*pi)^(2/3)*g*denliq))+((((pi*D_or*sig*cos(theta))/(denliq*g)))*(x^(2/3)))- x^(5/3);
end
end
end
0 个评论
回答(0 个)
此问题已关闭。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!