Giter Site home page Giter Site logo

srnogueira / laine Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 0.0 3.3 MB

Laine solves nonlinear equations and thermodynamic problems

Home Page: https://laine.com.br

License: MIT License

HTML 15.45% JavaScript 80.71% CSS 3.84%
equations-solver root-finding thermodynamics webapp

laine's People

Contributors

srnogueira avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

laine's Issues

Solver fails to converge for simple case

Caro,
descobri um caso relativamente simples que o solver nao consegue resolver ("Error: Difficult (or unsolvable) problem").

Trata-se do item (a) do excercício complementar 1 de reacoes químicas (VanWylen 8ed 13.143):

"Consider the steady-state combustion of propane at 25°C with air at 400 K. The products exit the combustion chamber at 1200 K. Assume that the efficiency is 90% and that 95% of the carbon in the propane burns to form CO2 ; the remaining 5% forms CO. Determine (a) the ideal fuel–air ratio and (b) the heat transfer from the combustion chamber."

T1 = 298
T2 = 400
T3 = 1200

hc3h8_R=NasaSI('H0molar',T1,'C3H8')

ho2_R=NasaSI('H0molar',T2,'O2')
hn2_R=NasaSI('H0molar',T2,'N2')

hco2_P=NasaSI('H0molar',T3,'CO2')
hh2o_P=NasaSI('H0molar',T3,'H2O')
ho2_P=NasaSI('H0molar',T3,'O2')
hn2_P=NasaSI('H0molar',T3,'N2')

a = 5

hp = 3 * hco2_P + 4 * hh2o_P + 3.76 * a * s * hn2_P + a * (s-1) * ho2_P
hr = hc3h8_R + a * s * ( ho2_R + 3.76 * hn2_R )
hp = hr

# s = 3.169

Por ora, só vejo 2 workarounds, de curto e médio prazo respectivamente: (1) resolver iterativamente via trial-and-error e monitorando um resíduo (e.g. res = hp - hr); (2) git clone seu repo e tentar ajustar solver settings, e.g. initial guesses do Newton-Raphson (alguma sugestao por onde comecar?).

Novamente obrigado pela iniciativa e pelo empenho em ter botado o Laine pra funcionar. :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.