How to get one variable from one equation?

  • Thread starter Thread starter johny2012
  • Start date Start date
  • Tags Tags
    Variable
Click For Summary

Homework Help Overview

The discussion revolves around a problem related to the manufacture of nitric acid, specifically focusing on the thermal dynamics of a gas blending unit where ammonia and preheated air are mixed. The original poster is attempting to determine the temperature to which the air must be preheated, given certain parameters and equations related to heat transfer and specific heat capacities.

Discussion Character

  • Exploratory, Mathematical reasoning, Problem interpretation

Approaches and Questions Raised

  • The original poster attempts to solve a complex equation involving specific heat capacities and heat transfer, expressing difficulty in isolating the variable T. They share their MATLAB code and seek clarification on the use of the "solve" function.
  • Some participants question the validity of the expressions used, noting that an equation must include an '=' sign, and they discuss the implications of complex roots obtained from their calculations.
  • Others suggest revising the equations for clarity and correctness, and they explore the possibility of using numerical methods like "fzero" to find real solutions.
  • There are inquiries about the nature of the roots obtained and how to interpret them in the context of the problem.

Discussion Status

The discussion is ongoing, with participants actively sharing insights and troubleshooting issues related to the mathematical expressions and computational methods. Some guidance has been offered regarding the formatting of equations and the interpretation of results, but a clear consensus on the solution has not been reached.

Contextual Notes

Participants note constraints such as the need for specific formatting in MATLAB and the challenges posed by complex roots in the equations. The original poster expresses confusion regarding the interpretation of results and the appropriateness of the methods used to find the temperature T.

johny2012
Messages
6
Reaction score
0

Homework Statement



In manufacture of nitric acid, ammonia and prehated air are mixed to form a gas containing 10 mole %NH3 at 650 C. If ammonia enters the gas blending unit at 25C at a rate o 520kg/? and heat is lost from the mixer to its surroundings at a rate of 7 kW, determine the temperature to which the air must be preheated.

Cpair(kg/molC) = 0.02854 + 0.4147x10^-5T + 0.3191x10^-8T^2 - 1.9665x10^-12T^3

Cpammonia(kg/molc) = 0.03515 + 2.954x10^-5T + 0.4421x10^8T^2 - 6.686x10^12T^3

Homework Equations



'0.02894 * (650 - T) + (0.4147 * 10.^-5 .*(650-T).^2) / 2 + (0.3191 * 10.^-8 *(650-T).^3)/3 -(1.965 *10.^-12 * (650-T).^4)/4'

I need to get the T from this equatio but I could not succeed.
I tried solve fnc and etc but no work.

Here is my full code in matlab
===========================

F = '0.03515 + 2.954 .*10.^-5 * t + 0.4421 .*10.^-*8 .t^2 - 6.686 .*10.^-12.*t.^3'
cp = '(0.03515 + 2.954 .*10.^-5 )* t + (0.4421 .*10.^-8) .*-t.^2 - (6.686 .*10.^-12).*t.^3'
integral = quad(cp,25,650)
% -7 -Q = nDH(for air)

Q = 520/17.*integral
nDH = -7 - Q %hava için Delta H değeri
nair = (27/17 * 100/10)*90/100;
knownIntegral= '0.02894 * (650 - T) + (0.4147 * 10.^-5 .*(650-T).^2) / 2 + (0.3191 * 10.^-8 *(650-T).^3)/3 -(1.965 *10.^-12 * (650-T).^4)/4'

I need to get T from here ??
at final step , I need one of the limits of an integral. I know the integral
Pleae I need help on this..
 
Last edited:
Physics news on Phys.org
The formula you wrote under heading 2 is not an equation. An equation must have an '=' sign in it somewhere, and your expression does not.

RGV
 
Last edited:
Hey Rey, thanks man

Yeah you are right that expression does not have, I have omitted it

but that one is equal to a sacalar valur, (nDH /nair) and I also tried it but as fas as I understand, MATLAB "solve" function works with at least two equations, but in my case I have one.

nDH /nair = -1.587 , and when I put it at right side of the equation

solve('0.02894 * (650 - T) + (0.4147 * 10.^-5 .*(650-T).^2) / 2 + (0.3191 * 10.^-8 *(650-T).^3)/3 -(1.965 *10.^-12 * (650-T).^4)/4 = -1.587')

Matlab gives this error

... is not a valid expression or equation.

I also tried [X] = solve(...) but no work.

I really need a hand on this man, please help to me.
 
johny2012 said:
Hey Rey, thanks man

Yeah you are right that expression does not have, I have omitted it

but that one is equal to a sacalar valur, (nDH /nair) and I also tried it but as fas as I understand, MATLAB "solve" function works with at least two equations, but in my case I have one.

nDH /nair = -1.587 , and when I put it at right side of the equation

solve('0.02894 * (650 - T) + (0.4147 * 10.^-5 .*(650-T).^2) / 2 + (0.3191 * 10.^-8 *(650-T).^3)/3 -(1.965 *10.^-12 * (650-T).^4)/4 = -1.587')

Matlab gives this error

... is not a valid expression or equation.

I also tried [X] = solve(...) but no work.

I really need a hand on this man, please help to me.

I don't have access to Matlab, but I tried it in Maple. When I entered your expression exactly as written (but removing the quotation marks), it failed:
eq1:=0.02894 * (650 - T) + (0.4147 * 10.^-5 .*(650-T).^2) / 2 + (0.3191 * 10.^-8 *(650-T).^3)/3 -(1.965 *10.^-12 * (650-T).^4)/4 = -1.587; <---- input
Error, `-` unexpected <----output
Maybe something similar is happening in Matlab.

However, when I removed the unnecessary decimal points and inserted the appropriate brackets, everything was fine:
eq2:=0.02894 * (650 - T) + (0.4147 * 10^(-5)*(650-T)^2) / 2 + (0.3191 * 10^(-8) *(650-T)^3)/3 -(1.965 *10^(-12) * (650-T)^4)/4 = -1.587; <--- input
eq:=0.02894 * (650 - T) + (0.4147 * 10^(-5)*(650-T)^2) / 2 + (0.3191 * 10^(-8) *(650-T)^3)/3 -(1.965 *10^(-12) * (650-T)^4)/4 = -1.587; <--- output
solve(eq2,T);
705.0484257, 2134.531785 + 3017.448181 I, -4539.336764, 2134.531785 - 3017.448181 I

Here, I = sqrt(-1) in Maple notation.

RGV
 
Ralyy thanks man, that one helped me but I have still problems..

I tried it with solve(eq2)
It does not accept T, just wrote eq2 as you wrote
and got nearly same result as you

-4539.3367635382526862930496142306
705.04842574482273638074048051504
3017.4481808788852152249093825028*i + 2134.5317855209728205880460002759
2134.5317855209728205880460002759 - 3017.4481808788852152249093825028*i

So, at his point I get confused..

what is the real value of T ? How many different values out there in those numbers ? Can you show me each one ? If in your case, each "," means a different value, that means 4 different value for the T ?? or these are just

Another question: What you say about first equation which works with quad.
can you also correct that one ?

The last and most important question ? If you look at the real question ,
what you say to solution ? I mean, is that normal to find one of the limit value of integral in this way ? Is there another solution for this ?

Thanks again man.
 
This is my final view of code for m-file

function[] = eq()
cpammonia = '(0.03515 + 2.954.*10.^(-5)).* t + (0.4421.*10.^(-8)) .* t.^2 - (6.686.* 10.^(-12)).* t.^3';
integral = quad(cpammonia,25,650);
Qa = (520/(17*10^-3))*integral
Qair = -25200-Qa;
nair=48842
%nDH = -7 - Qa %hava için Delta H değeri
%nair = (27/17 * 100/10)*90/100;
%'sonuc * nair = nDH
eqResult= Qair/nair
%Qair = nair*eq;
%eq= Qair/nair

integralequation ='0.02894 * (650 - T) + (0.4147 * 10^(-5)*(650-T)^2) / 2 + (0.3191 * 10^(-8) *(650-T)^3)/3 -(1.965 *10^(-12) * (650-T)^4)/4 = eqResult;
solve(integralequation)

integralequation2 ='0.02894 * (650 - x) + (0.4147 * 10^(-5)*(650-x)^2) / 2 + (0.3191 * 10^(-8) *(650-x)^3)/3 -(1.965 *10^(-12) * (650-x)^4)/4 -4.6479';
x0 = [ 1 500];
fzero(integralequation2,x0)
end

When I call file ew from MATLAB promt I get
ans =

- 0.00000000000049125*T^4 + 0.00000000021358333333333333333333333333333*T^3 + 0.00000290233125*T^2 - 0.032444109375*T + 19.891472013020833333333333333333

Then I insert those values to an array
a = [- 0.00000000000049125 0.00000000021358333333333333333333333333333 0.00000290233125 - 0.032444109375 19.891472013020833333333333333333]

a =
-0.0000 0.0000 0.0000 0.0324 19.8915
and call roots function with thi array
roots(a)

and get this values

ans =

1.0e+003 *

4.8369
-1.8781 + 3.0710i
-1.8781 - 3.0710i
-0.6460

I seen, there are real and complex roots. So, How can I find real value of T ??

Then I tried this way

I took the value from Qair/nair = 4.6479, to equation from right side to left side

integralequation2 ='0.02894 * (650 - x) + (0.4147 * 10^(-5)*(650-x)^2) / 2 + (0.3191 * 10^(-8) *(650-x)^3)/3 -(1.965 *10^(-12) * (650-x)^4)/4 -4.6479';

then I defined an value
x0 = [ 1 500];
fzero(integralequation2,x0)

ant that returned --> 491.3351
should I acceptthis value as an answer ? ı am really really get confused at tis point..
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
Replies
15
Views
3K
Replies
6
Views
2K
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 4 ·
Replies
4
Views
1K
Replies
9
Views
2K
Replies
1
Views
2K