How to Solve for T in the Wagner Equation using MatLAB

  • Thread starter Thread starter CrazyDiamond
  • Start date Start date
AI Thread Summary
The discussion focuses on solving for T in the Wagner Equation for vapor pressure, specifically when p is known. Users express difficulty in finding an analytical solution and suggest that approximate methods, such as the bisection method in Excel, could be used. VBA in Excel is mentioned as a potential solution, although it comes with warnings about script safety. Alternatives like downloading software such as Pari/GP are also recommended, but they require manual data entry into Excel. Overall, the consensus is that while direct solutions are challenging, various workaround methods exist for calculating T.
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.
 
Mathematics 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 !
 
Thread 'Video on imaginary numbers and some queries'
Hi, I was watching the following video. I found some points confusing. Could you please help me to understand the gaps? Thanks, in advance! Question 1: Around 4:22, the video says the following. So for those mathematicians, negative numbers didn't exist. You could subtract, that is find the difference between two positive quantities, but you couldn't have a negative answer or negative coefficients. Mathematicians were so averse to negative numbers that there was no single quadratic...
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Thread 'Unit Circle Double Angle Derivations'
Here I made a terrible mistake of assuming this to be an equilateral triangle and set 2sinx=1 => x=pi/6. Although this did derive the double angle formulas it also led into a terrible mess trying to find all the combinations of sides. I must have been tired and just assumed 6x=180 and 2sinx=1. By that time, I was so mindset that I nearly scolded a person for even saying 90-x. I wonder if this is a case of biased observation that seeks to dis credit me like Jesus of Nazareth since in reality...
Back
Top