can it be possible to merge bvp4C code and Response Surface Method (central-composite designs OR Box-Behnken designs)

1 Ansicht (letzte 30 Tage)
%% i want to calculate Nu with different parameters (phi, Pr, Nr etc.) by studying RSM approach with the following bvp4C code
A = 0.5;
Pr = 2;
D = 0.5;
M = 1;
Ec = 0.1;
Nr = 0.1;
L = 0.1;
phi = 0.1;
rhof = 997.1;
Cpf = 4179;
kf = 0.613;
betaTf = 21*10^5;
sigmaf = 5.5*10^(-6);
rhos = 8933;
Cps = 385;
ks = 401;
betaTs = 1.67*10^5;
sigmas = 59.6*10^(6);
a1 = 1 - phi + phi*rhos/rhof;
sigma = sigmas/sigmaf;
a2 = 1 + 3*phi*(sigma-1)/(sigma+2-(sigma-1)*phi);
a3 = 1 - phi + phi*rhos*betaTs/(rhof*betaTf);
a4 = 1 - phi + phi*rhos*Cps/(rhof*Cpf);
K = (ks+2*kf - 2*phi*(kf-ks))/(ks+2*kf + phi*(kf-ks));
BC = @(ya,yb)[ya([1;4]); ya([2;7])-1; ya(5)- D; yb([2;5;7])];
ODE = @(x,y)[y(2);
y(3); ...
(1-phi)^2.5*( a1*(2*y(2)*(y(2)+y(5))-y(3)*(y(1)+y(4))) + a2*M*y(2) - a3*L*y(7) );
y(5);
y(6);
(1-phi)^2.5*( a1*(2*y(5)*(y(2)+y(5))-y(6)*(y(1)+y(4))) + a2*M*y(5) );
y(8);
Pr* ( a4*(A*(y(2)+y(5))*y(7)-(y(1)+y(4))*y(8)) - (1-phi)^(-2.5)*Ec*y(3)^2 -a2*M*Ec*y(2)^2 )/(K+(4/3)*Nr)];
xa = 0;
xb = 6;
x = linspace(xa,xb,100);
solinit = bvpinit(x,[0 1 0 D 1 0 0 0]);
sol = bvp5c(ODE,BC,solinit);
S = deval(sol,x);
Nu = - (K + (4/3)*Nr)*S(8,1);
figure(2),
plot(x,S(2,:),'Linewidth',1.5);
hold on

Antworten (1)

Torsten
Torsten am 16 Jul. 2023
Verschoben: Torsten am 16 Jul. 2023
i want to calculate Nu with different parameters (phi, Pr, Nr etc.)
Then make phi, Pr and Nr parameter vectors, create a threefold loop and call the solver for each combination.
  1 Kommentar
MINATI PATRA
MINATI PATRA am 22 Jul. 2023
Bearbeitet: MINATI PATRA am 22 Jul. 2023
Sorry for the late reply
Can RESPONSE SURFACE METHODOLOGY (RSM) be merged with the above code to draw plots directly given in the following link.
https://in.mathworks.com/help/stats/response-surface-designs.html

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by