GithubHelp home page GithubHelp logo

hesslaw's Introduction

OXD Equation Solver (OES)

The HessLawSolver class is a Python implementation of Hess's Law, a fundamental principle in chemistry. Hess's Law states that the sum of the enthalpies of the reactants equals the sum of the enthalpies of the products. It is used to predict the enthalpy change of a reaction without experimental data.

This class takes the enthalpies of formation of the reactants and products as input and calculates the enthalpy change of the reaction.

OES Class

The OES class is designed to handle the core functionality of the online examination system. It takes in inputs and targets as parameters and provides methods to parse and solve the inputs.

Methods

  • __init__(self, inputs, target): This is the constructor method for the OES class. It initializes the class with the provided inputs and target.

  • parse(self, input): This method is used to parse the input into reactants and productions. It returns a dictionary containing the parsed input.

  • solve(self): This method is used to solve the system of equations derived from the inputs. It returns the heat, solution, and a boolean indicating whether the solution is valid or not.

Usage

import OES

Define the inputs and target

this is a simple example to how enter the equations.

2 H2O2 = 2 H2O + O2 -> -196

and in this way enter the target equation.

H2 + O2 = H2O2

Note : put a space between the elements and coefficients

Create an instance of the OES class

solver = OES.OES(inputs, target)

Solve the system of equations

heat, solution, flag = solver.solve()

Print the results

if flag == False: 
    print('The equations don\'t have a solution') 
else: 
    print('The equation coeffient:', solution)
    print(f'The target equation heat: {heat}')

Please note that this is a basic overview of the OES class. For more detailed information, please refer to the source code.

hesslaw's People

Contributors

seyed0123 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.