필터 지우기
필터 지우기

How to construct matrix for variable radius?

조회 수: 1 (최근 30일)
I G
I G 2019년 1월 10일
답변: Eugenio Grabovic 2019년 1월 29일
I have divergent geometry, where my longitudinal coordinate is:
z=1:-0.001:0;
Wall of the pipe is defined with this law:
ri=0.7;
R=ri-z*(ri-1);
and ri is inlet radius of the pipe (when z=0), outlet radius is 1 (it means when z=1).
I need to define radius, which will be transverzal coordinate r, it need to go from -R(z) to R(z) for one value of z, but I need to have all values of z. It means that R is not constant, and it is possible to have different number of points at different values of z. Is it possible so solve this for the same number of points in every cross section, and to have r as matrix? Or is it possible to solve it with different number of points in every cross section?
Later I need to calculate D, will D also be matrix?
D=r.*r-R(z).*R(z)ma
I have tried this, and all does not work:
r=[0:R];
r=[0:R(:,0);
0:R(:,1)];...
r=-R:R;
  댓글 수: 1
Jan
Jan 2019년 1월 11일
I do not understand the question. "All does not work" is not a clear description of the problem. I cannot guess, what you want to achieve and if you get an error message, it would be efficient, if you post it here.
What does this mean: "It means that R is not constant, and it is possible to have different number of points at different values of z"? What is not constant - the contents or the dimensions?

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

답변 (1개)

Eugenio Grabovic
Eugenio Grabovic 2019년 1월 29일
I maybe understood what you're asking for:
k = 100; % number of transversal discretization
ri = 0:0.7/k:0.7;
i = 0;
for z=1:-0.001:0;
i = i + 1;
R(i,:) = ri-z*(ri-1); % storing the radius values in rows (each row is computed for a different z)
end
About the "D" computation i don't know what "ma" is, sorry.

카테고리

Help CenterFile Exchange에서 Coordinate Systems에 대해 자세히 알아보기

제품


릴리스

R2014a

Community Treasure Hunt

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

Start Hunting!

Translated by