srnogueira / laine Goto Github PK
View Code? Open in Web Editor NEWLaine solves nonlinear equations and thermodynamic problems
Home Page: https://laine.com.br
License: MIT License
Laine solves nonlinear equations and thermodynamic problems
Home Page: https://laine.com.br
License: MIT License
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. :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.