Message Boards Message Boards

0
|
4456 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

Solving an equation system with Units

Posted 3 years ago

Hi there! I want to solve an equation system consisting of 4 equations which, at least in part, contain units.

I tried everything, my last attempt was

Solve[{Q==(100*grams*4.2kJ/(kg*K)+121.6*`grams*x)*304.15K, Q == Q1 + Q2, Q2 == x * 
121.6grams * (41+273.15)* K, Q1==100grams* 4.2 kJ/(kg* K)*(23+273.15)*K},x]

I tried it with Solve System, without {}, with & without ` etc. What am I doing wrong?

Thanks in advance.

POSTED BY: Valentin -
Posted 3 years ago

Valentin:

It would help if you posted code using the code snippet button (to the right of the "add notebook" button.

From looking at your code, it looks like you are typing your units they way you would on a whiteboard. But, in Mathematica, you need to use the Quantity[] function. Otherwise, Mathematica will look at your "units" and just assume they are regular symbols.

For example:

Quantity[5, "kg"] 

instead of

5 kg

Have a great rest of your weekend.

POSTED BY: Mike Besso
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract