필터 지우기
필터 지우기

I have a set of given values and then three formulas and I need to find a value for "a" when K2 = K1. How would I go about finding this value. I think loops might need to be used but I don't know how to use it. Please help.

조회 수: 1 (최근 30일)
K1 = 43.4
b = 80; %mm
t = 20; %mm
P = 150000; %N
alpha = a/b
F = (.265*((1-alpha)^4))+((.857+(.265*alpha))/((1-alpha)^(3/2)))
K2 = F*(P/(b*t))*((pi*a)^.5)

답변 (1개)

Walter Roberson
Walter Roberson 2018년 3월 27일
If a is restricted to real values, then it is the first and 13th roots of the below
-(1/5) * root(25281*Pi*Z^24 - 10112400*Pi*Z^22 - 25887744000000000*Pi*Z^15 + 54198190080000000000*Pi*Z^13 - 17537236992000000000000*Pi*Z^11 + (134217728000000000000000*K1^2+6627262464000000000000000000*Pi)*Z^6 - 25098568335360000000000000000000*Pi*_Z^4 + 27987577248153600000000000000000000*Pi*_Z^2 - 7603404763299840000000000000000000000*Pi, Z)^2 + 80
Here, root(f(Z),Z) represents the set of values, Z, such that f(Z) = 0 -- the roots of the polynomial.
  댓글 수: 2
Rustem
Rustem 2018년 3월 27일
I am not sure what to do with those numbers? How are you getting these values? Maybe I need to explain more. I have 4 given values; K1,b,t,P and I have three formulas; alpha, F, K2 that use those 4 values. the variable "a" is a real value, it can be anywhere from zero to infinity, or just a large number if there has to be a limit. after a value for a is chosen (anywhere from zero to infinity), alpha can be found, in turn F is found, in turn K2 is found. But, K2 has to equal K1. What "a" value is needed to go through those three formulas? That is what I am trying to find and I think matlab can solve this, but I don't know how to do it. The only limit is that "a" is not negative, it's real, and in the end K1 has to equal K2 with that "a" value. Please, if you can leave a code that can do this.
Walter Roberson
Walter Roberson 2018년 3월 27일
syms K1 b t P a b
Pi = sym('pi');
alpha = a/b;
Q = @(V) sym(V, 'r');   %convert a floating point to symbolic rational
F = (Q(.265)*((1-alpha)^4))+((Q(.857)+(Q(.265)*alpha))/((1-alpha)^(Q(3/2))));
K2 = F*(P/(b*t))*((Pi*a)^Q(.5));
sol_a = solve(K1 == K2, a);

The above gives empty symbol quickly, but

sol_a = solve(K1 == expand(K2), a)

has been calculating for a while.

Maple says the result is

sol_a = -RootOf(70225*P^2*Pi*_Z^24 - 70225*P^2*Pi*_Z^22 - 140450*P^2*Pi*_Z^15 + 735110*P^2*Pi*_Z^13 - 594660*P^2*Pi*_Z^11 + (1000000*K1^2*b*t^2+70225*P^2*Pi)*_Z^6 - 664885*P^2*Pi*_Z^4 + 1853544*P^2*Pi*_Z^2 - 1258884*P^2*Pi)^2*b + b

The RootOf can be expressed as

root([70225*P^2*Pi, 0, -70225*P^2*Pi, 0, 0, 0, 0, 0, 0, -140450*P^2*Pi, 0, 735110*P^2*Pi, 0, -594660*P^2*Pi, 0, 0, 0, 0, 1000000*K1^2*b*t^2+70225*P^2*Pi, 0, -664885*P^2*Pi, 0, 1853544*P^2*Pi, 0, -1258884*P^2*Pi])

for numeric coefficients.

You will need to filter down to the positive real-valued solutions:

sol_a(real(sol_a) >= 0 & imag(sol_a) == 0)

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

카테고리

Help CenterFile Exchange에서 Get Started with Specialized Power Systems에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by