Git Product home page Git Product logo

thevenin's Introduction

Thévenin

Build Status Coverage Status

An elegant circuitry simulation website.

Overall Status: Under Development

Details

Using TypeScript and working on several parts:

  • Main Circuit Library:

    • Circuit: Main wrapper for the circuit simulation
    • Circuit.Unit: Circuit grid system represented by circuit-unit to place different components or wire
    • Circuit.Electronic: Electronic component class
    • Circuit.Electronic.Unit: Electronic component unit mapping with respect to the grid circuit unit
    • Circuit.Graph: The graph data structure to represent the circuit (converted from grid of Circuit.Unit)
    • Circuit.GaussianElimination: Implementation of Gaussian Elimination method for determine the result of multi-variable equations by representing and solving the matrix
    • Circuit.Equation: Construct node-voltage equation
    • Circuit.SimultaneousEquations: Collection of node-voltage equations and solve by Gaussian Elimination
    • Circuit.Simulation: The circuit simulation algorithm part using Nodal Voltage Analysis which consists of several phases including:
      • Supernode Propagation - Propagates through the circuit graph generated from Circuit.Graph and convert voltage source related Circuit.Graph.Node into a single super node with different biased voltage
      • Node-Voltage Matrix Derivation - Deriving the node voltage matrix to solve for each components' (represented by Circuit.Graph.Edge) current values (based on KCL from Kirchhoff's Circuit Law)
      • [TBD] Ending Phase - After deriving the current of the loads such resistors, scanning through the circuit and derive rest of the node-voltage and other underived component's current according to KVL and KCL
  • Using Jest test framework to write Unit/Integration tests

  • [Will Implement After Completing the Circuit Library] Frontend UI: Using Next.JS framework, Redux (with TypeScript)

    • Details will be planned on the future...

Maintainer

Maxwell Alexius

thevenin's People

Contributors

alexius-huang avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

thevenin's Issues

Implement Electronics Interface

Electronics interface may include:

  • the count of terminals
  • occupied space such as (1 x 2), (3 x 2) or (1 x 1)
  • terminals' location in electronic component
  • orientation (default is face left?)

Handling Undetermined Analyze Results

When running the circuit simulation, if the circuit is not determined for some reason, it should instead terminate the execution and show the message that the circuit for some reason cannot be simulated.

[Exception] Virtually Short-Circuited When Doing Gaussian Elimination

For instance, a Wheatstone Bridge with all resistors with value 1k Ohms resulted in the middle resistor has no current flow through it. It won't solve the Gaussian Elimination case and the result won't converge.

There has to be a mechanism to rearrange the circuit and short the node and reanalyze the whole circuit again.

[UI] Electronic Component Tool Selection

After selecting a particular electronic component on the side-tool, it should:

  • Show which kind of electronic is selected
  • Highlight the selected electronic component
  • Able to directly select another electronic component without deselecting the original one

Implement Complex Number Lib

Implement Complex number lib. Should write tests and satisfy the following spec:

Should include member variables:

  • <Complex>.re: number: Real part
  • <Complex>.im: number: Imaginary part
  • <Complex>.degree: number: Degree of the complex number in complex-plane
  • <Complex>.radian: number: Radian of the complex number in complex-plane
  • <Complex>.length: number: Length of the complex number
  • <Complex>.coordinate: string: Coordinate representation of the complex number
  • <Complex>.polar: string: Polar representation of the complex number

Should include member methods:

  • <Complex>.inverse(): Complex: Returns new Complex object with the inversed complex number
  • <Complex>.conjugate(): Complex: Returns new Complex object with conjugated version
  • <Complex>.transpose(): Complex
  • <Complex>.add(c: Complex): Complex
  • <Complex>.subtract(c: Complex): Complex
  • <Complex>.multiply(c: Complex): Complex
  • <Complex>.divide(c: Complex): Complex
  • <Complex>.scale(rate: number): Complex
  • <Complex>.rotate(radian: number): Complex
  • <Complex>.rotateDeg(degree: number): Complex

Should include static methods:

  • <Complex>#fromPolar(length: number, radian: number): Complex
  • <Complex>#fromPolarDeg(length: number, degree: number): Complex
  • <Complex>#fromCoord(re: number, im: number): Complex

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.