Solve a large composite set of equations numerically

조회 수: 2 (최근 30일)
Andrey Mironenko
Andrey Mironenko 2020년 1월 14일
댓글: Andrey Mironenko 2020년 1월 17일
I have the following set of equations:
1:
where are known scalar constants, and
2:
3:
where Vis known scalar constant and k is a scalar which I want to find.
4:
5:
I've been informed to find the value of k from the last following two inequalities:
with
and are known constants.
Just to make things little more easier, let
The ultimate problem here is that do not have explicit symbolic equations because I have to compute them numerically since their direct symbolic equations are too complicated and Matlab symbolic engine produces too big output.
So the question is: how to numerically solve inequalities (5:) for the variable k ?

채택된 답변

Andrey Mironenko
Andrey Mironenko 2020년 1월 17일
I have finally solved this set symbolically, but this is offtopic, so close it now.
  댓글 수: 6
darova
darova 2020년 1월 17일
Can't believe it's happening
Andrey Mironenko
Andrey Mironenko 2020년 1월 17일
It is if you consider assumption i have pointed above.

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

추가 답변 (1개)

darova
darova 2020년 1월 14일
I think there is no exact solution for k. Try something like this:
% 1
[X,Y,Z] = ndgrid( linspace(-1e5,1e5,20) );
f = fx*X + fy*Y + fz*Z + d1;
% 2
r = sqrt(f.^2+g.^2);
% 3
k = 2; % assume
vzd = -V*(f*fz+g*gz).*tanh(k*r)./Nc + ...
% 4
gammad = atand2(vzd,vxd);
delta = 2e5/20;
[Bx,By,Bz] = gradient(gammad,delta);
% 5
F1 = sqrt(Bx.^2+Bz.^2) - 7*(1-alpha)*gamma_max/10/V;
F2 = By - alpha*gamma_max/V;
isosurface(X,Y,Z,F1,0)
hold on
isosurface(X,Y,Z,F2,0)
hold off
  댓글 수: 3
darova
darova 2020년 1월 14일
Everything that depend on X,Y,Z are 3D matrices
Andrey Mironenko
Andrey Mironenko 2020년 1월 14일
The code so far:
V = 50;
fx = 0;
fy = 1;
fz = 0;
d1 = -4499;
gx = -1;
gy = 0;
gz = 0;
d2 = -306154;
k = 1e-5;
a = 0.5;
chi_rate_max = 0.4;
% 1
[X,Y,Z] = ndgrid(linspace(-5e6,5e6,20));
f = fx*X + fy*Y + fz*Z + d1;
g = gx*X + gy*Y + gz*Z + d2;
% 2
r = sqrt(f.^2 + g.^2);
Nc = power(((f.*fx + g.*gx).^2 + (f.*fy + g.*gy).^2 + (f.*fz + g.*gz).^2), 0.5);
Ns = power(((fy*gz - fz*gy).^2 + (fz*gx - fx*gz).^2 + (fx*gy - fy*gx).^2), 0.5);
% 3
vzd = -V*(f*fz + g*gz).*tanh(k*r)./Nc + V*(fx*gy - fy*gx).*sech(k*r)./Ns;
vxd = -V*(f*fx + g*gx).*tanh(k*r)./Nc + V*(fy*gz - fz*gy).*sech(k*r)./Ns;
% 4
chid = atan2(vzd,vxd);
delta = 2e5/20;
[Bx,By,Bz] = gradient(chid,delta);
% 5
F1 = sqrt(Bx.^2 + Bz.^2) - 7*(1 - a)*chi_rate_max/10/V;
F2 = By - a*chi_rate_max/V;
isosurface(X,Y,Z,F1,0)
hold on;
isosurface(X,Y,Z,F2,0)
hold off;
gives error:
warning: isosurface: triangulation is empty
warning: called from
isosurface at line 164 column 5
VF at line 31 column 1
error: invalid value for array property "cdata"
error: __go_patch__: unable to create graphics handle
error: called from
__patch__ at line 171 column 7
patch at line 86 column 18
isosurface at line 191 column 10
VF at line 31 column 1

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

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by