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/)
-   -   Code for calculation of entropy and Gibbs free energy (https://www.cfd-online.com/Forums/openfoam-programming-development/236394-code-calculation-entropy-gibbs-free-energy.html)

sjohn2 May 27, 2021 16:00

Code for calculation of entropy and Gibbs free energy
 
OpenFoam thermophysical libraries do not have entropy and Gibbs free energy computed at a volscalarField level. I have added these functionality at heThermo.C to return volScalarFields at the application level

Please check my 2 commits at my github


https://github.com/stanabng2501/dev-...8ae0afa7aceb28

https://github.com/stanabng2501/dev-...1d4836ca4b903f

After the changes, go to src/thermophysicalModels and run ./Allwmake to compile it.


entropy can be accessed by thermo.Se(p,T) and gibbs energy by thermo.G(p,T) at your solver level.


WARNING: This change effects your core source code and can effect multiple solvers. This functionality has not been tested for all solvers, might work for your application, changes made at your own risk.


Stanley


All times are GMT -4. The time now is 23:26.