Nu and Sh value should be non-zero

1 visualización (últimos 30 días)
MINATI PATRA
MINATI PATRA el 1 de Nov. de 2020
Comentada: MINATI PATRA el 1 de Nov. de 2020
function main
x = linspace(0,1,101); t = x; m = 0; sol = pdepe(m,@pde,@ic,@bc,x,t,[]);
U = sol(:,:,1); T = sol(:,:,2); C = sol(:,:,3);
xq = x; xq(1:end - 1) = xq(1:end - 1) + diff(xq)./2;
[u,dudx] = pdeval(m,x, A1*U(2,:,1),xq); Sk = dudx(1); %% Derivative of U at x = 0
[v,dvdx] = pdeval(m,x, - A7*T(2,:,1),xq); Nu = dvdx(1); %% Derivative of T at x = 0 (with negative)
[w,dwdx] = pdeval(m,x, - C(2,:,1),xq); Sh = dwdx(1); %% Derivative of C at x = 0 (with negative)
disp([Sk Nu Sh])
function [c,f,s] = pde(x,t,u,dudx)
Re = 1; p = 0.01; L0 = 1; L = 0.1; eps = 1; w = 0.2; M = 1; Kp = 0.5;
Gr = 0.5; Gc = 0.5; Pe = 1; N = 2; Sr = 0.5; Le = 1; G = 1; Pr = 01;
rhos = 19300; cps = 129; ks = 301; betaTs = 42*10 ^(-6); betaCs = 1.25*10^(-5); sigmas = 4.11*10^6;
rhof = 997.1; cpf = 4179; kf = 0.613; betaTf = 21*10^(-5); betaCf = 298*10^(-5); sigmaf = 0.05;
a = 13.5; b = 904.4; n = 3/0.62; sigma = sigmas/sigmaf; % n = 4.8387;
A1 = 1 - p + p * (rhos/rhof); A2 = 1 + a*p + b*p^2; A3 = (1 + (3*p*(sigma-1)/((sigma+2)-p*(sigma-1))))/A1;
A4 = 1 - p + p * ((rhos*betaTs)/(rhof*betaTf)); A5 = 1 - p + p * ((rhos*betaCs)/(rhof*betaCf));
A6 = 1 - p + p * ((rhos*cps)/(rhof*cpf)); A7 = (ks + (n-1)*kf + (n-1)*p*(kf-ks))/(ks + (n-1)*kf - p*(kf-ks));
c = [Re*A1; Pe*A6; Re;]; f = [A2.*dudx(1); A7.*dudx(2); (1/(Le*Pr)).*dudx(3) + Sr*dudx(2)];
s = [L0 + L*eps*abs(exp(i*w*t)) + A4*Gr*u(2) + A5*Gc*u(3) - (A3*M^2 + (A2/Kp))* u(1); N^2*u(2); - G*u(3)];
end
function u0 = ic(x)
u0 = [0; 0; 0];
end
function [pL,qL,pR,qR] = bc(xL,uL,xR,uR,t)
pL = [uL(1); uL(2); uL(3)]; qL = [0; 0; 0]; pR = [uR(1); uR(2)-1; uR(3)-1]; qR = [0; 0; 0];
end
end
%%%%%%%%
I want some non-zero value of Nu and Sh but '0' is coming (which is wrong). Please correct me where I am wrong.
  2 comentarios
Walter Roberson
Walter Roberson el 1 de Nov. de 2020
kf = 0.613;
You did not round that value correctly, it should be 0.612.
Or perhaps it was some other of your "magic numbers" that you assumed that we would immediately recognize even without telling us what kind of problem you are dealing with, and with only four comments in the entire code and without showing us the mathematical form of the equations.
As outside observers, in such a situation, we have to assume that the code is perfectly right and that it is your interpretation of the results that is the difficulty. To us, the code defines the problem to be solved. If not, if there is some problem being implemented, then we need to be given the documentation of what that problem is in order to compare the problem to the implementation.
MINATI PATRA
MINATI PATRA el 1 de Nov. de 2020
@ Dear Walter Roberson
Thanks for your concern
I corrected myself, it was in B.C.
But still my last conversation with you was unsolved. If you have time to rearrange the FULL CODE following:
https://in.mathworks.com/matlabcentral/answers/607426-generalization-needed-in-dsolve-code?s_tid=mlc_ans_email_view#comment_1082988

Iniciar sesión para comentar.

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by