How to Solve for T in the Wagner Equation using MatLAB

  • Context: MATLAB 
  • Thread starter Thread starter CrazyDiamond
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around solving for the variable T in the Wagner Equation related to vapor pressure, specifically when p is known. Participants explore methods to derive T using various computational tools, including MATLAB and Excel, while addressing the challenges of finding an analytical solution.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant presents the Wagner Equation and expresses difficulty in isolating T when p is known, seeking assistance with MATLAB.
  • Some participants propose that there may not be an analytical solution for the equation.
  • Another participant suggests that an approximate solution could be achieved in Excel using the bisection method, noting the need for multiple rows for precision.
  • There is mention of using VBA in Excel for solving the equation, although concerns about security warnings are raised.
  • A participant shares their experience using linear regression in Excel as an alternative method due to lack of access to VBA.

Areas of Agreement / Disagreement

Participants generally agree that an analytical solution may not exist, but there are multiple proposed methods for approximating a solution, indicating a lack of consensus on the best approach.

Contextual Notes

Limitations include the potential absence of an analytical solution and the varying degrees of precision achievable with different methods. The discussion does not resolve the specific challenges of implementing these methods in MATLAB or Excel.

Who May Find This Useful

Individuals interested in computational methods for solving equations in chemical engineering or related fields may find this discussion relevant.

CrazyDiamond
Messages
5
Reaction score
0
I'm using the Wagner Equation for Vapour pressure at work.This equation is :

lnp=((-7.7069(1-T)) + (2.4932(1-T)^1.5158) -(2.9212(1-T)^1.9907) -(3.8684(1-T)^4.3798) + (0.46898(1-T)^1.7461) - (0.00008336))/x

[I haven't been able to find an online version of this equation]

Here, T and p are variables. Its obviously easy to find p if I know T, but now I need to find T given that p is known. This is getting very complicated, and I don't have access to MatLAB either.Could someone who has MatLAB please help me out - I simply need an equation for T in terms of p.

Online Equation solvers give me an answer for T if I feed in the equation, but they do not give me an equation for T, which is what I need so I can put it into an Excel Spreadsheet.

Thanks.
 
Physics news on Phys.org
Don't think there is an analytical solution for this equation.
 
I also don't think there is an analytical solution.

If you must, you can probably solve it approximately in Excel (without scripting!) with bisection. If you want 9 decimals of precision you'll need ~30 rows for the calculation.

You could solve it with VBA in Excel, though you'll get warnings about the script being potentially unsafe whenever you open it. (Kinda makes you wish Excel could tell when no file access was being done by the script...)

You could download any number of programs, like Pari/GP, that would make solving it simple. Of course then you'd have to enter the data into Excel manually.
 
I used linear regression in Excel..my boss is too stingy to give me access to VBA.
Thanks for the help guys !
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
4K
Replies
3
Views
7K
  • · Replies 9 ·
Replies
9
Views
5K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
14
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K