CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Polynomial Density Expression With a Square Root (https://www.cfd-online.com/Forums/openfoam-programming-development/231307-polynomial-density-expression-square-root.html)

Dicanic October 30, 2020 11:15

Polynomial Density Expression With a Square Root
 
Hi all,



This is my first post and I am rather new to OpenFoam. I am trying to implement a polynomial expression for the density of a fluid. The expression looks like:



rho = A + BT + CT^2 + DT^-2


I looked at the hPolynomialThermo source code but am perhaps am missing something. A simple polynomial with positive exponents is easily implemented, but I can't seem to figure out how to do a negative exponent. Any suggestions?

Marpole November 13, 2020 01:41

Hi George,


You might need to make a new equation of state as yours is not polynomial. To make, you can refer to this link by Armin https://www.cfd-online.com/Forums/op...tml#post451937

Quote:

Originally Posted by Dicanic (Post 786388)
Hi all,



This is my first post and I am rather new to OpenFoam. I am trying to implement a polynomial expression for the density of a fluid. The expression looks like:



rho = A + BT + CT^2 + DT^-2


I looked at the hPolynomialThermo source code but am perhaps am missing something. A simple polynomial with positive exponents is easily implemented, but I can't seem to figure out how to do a negative exponent. Any suggestions?



All times are GMT -4. The time now is 09:18.