{"id":16917978,"url":"https://github.com/dvd101x/engineering-solver","last_synced_at":"2025-07-27T12:34:49.848Z","repository":{"id":38083065,"uuid":"431273902","full_name":"dvd101x/Engineering-Solver","owner":"dvd101x","description":"Engineering Solver helps to do calculations with units and thermodynamic properties in a very fast way.","archived":false,"fork":false,"pushed_at":"2025-03-04T21:55:03.000Z","size":10104,"stargazers_count":14,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-18T10:46:16.512Z","etag":null,"topics":["calculator","chemistry","codemirror-editor","codemirror-mode","coolprop","dew-point","engineering","enthalpy","humidity","javascipt","javascript","math","mathjs","periodic-table-of-elements","plot","plotly","psychrometrics","thermodynamics","units-measures-converter","units-of-measurement"],"latest_commit_sha":null,"homepage":"https://dvd101x.github.io/Engineering-Solver/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dvd101x.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-23T22:34:35.000Z","updated_at":"2025-03-04T21:54:32.000Z","dependencies_parsed_at":"2023-02-14T11:45:32.359Z","dependency_job_id":"c279c82a-4182-4627-82c8-e1487c447064","html_url":"https://github.com/dvd101x/Engineering-Solver","commit_stats":{"total_commits":184,"total_committers":3,"mean_commits":"61.333333333333336","dds":"0.11413043478260865","last_synced_commit":"812502171c5519807e112da31bdf6b3a337e8683"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvd101x%2FEngineering-Solver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvd101x%2FEngineering-Solver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvd101x%2FEngineering-Solver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvd101x%2FEngineering-Solver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dvd101x","download_url":"https://codeload.github.com/dvd101x/Engineering-Solver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244951082,"owners_count":20537314,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["calculator","chemistry","codemirror-editor","codemirror-mode","coolprop","dew-point","engineering","enthalpy","humidity","javascipt","javascript","math","mathjs","periodic-table-of-elements","plot","plotly","psychrometrics","thermodynamics","units-measures-converter","units-of-measurement"],"created_at":"2024-10-13T19:38:26.785Z","updated_at":"2025-07-27T12:34:49.828Z","avatar_url":"https://github.com/dvd101x.png","language":"JavaScript","readme":"# Engineering-Solver\n\nIs a tool for doing numerical calculations fast and easy. It includes units, thermodynamic properties and many more.\n\n[![MainFigure](img/gui.png)](https://dvd101x.github.io/Engineering-Solver/)\n\n## Quick start\n\nOpen this site [Engineering-Solver](https://dvd101x.github.io/Engineering-Solver/).\n\nWrite a few statements like:\n\n``` jl\n2+2\n3 m to mm\n3 m + 2 in to mm\nforce = 10 N\nmass = 10 lb\nacceleration = force / mass\nacceleration to yard/s^2\n```\n\nYou will notice you get instant results as you are typing your expressions.\n\n# Install and develop locally\n\nClone this repository and run the following command to install dependencies.\n```\nnpm install\n```\nTo test\n```\nnpm run dev\n````\nTo build \n````\nnpm run build\n````\n\n## Interface\n\nThere are two main areas, the input on the left and output on the right. A top navigation bar with 20 tabs and an example selector.\n\nIn the example selector you can find:\n\n* Numbers\n* Matrices\n* Objects\n* Variables\n* Units\n* Thermodynamic properties\n* Psychrometric properties\n\nYou can work on any of the 20 tabs and your progress will be saved automatically after a few seconds of inactivity.\n\n## [MathJS](https://mathjs.org/)\n\nDoes all the calculations and unit conversions. Here are some useful topics from the [docs](https://mathjs.org/docs/index.html).\n* [Expressions](https://mathjs.org/docs/expressions/index.html)\n  * [Syntax](https://mathjs.org/docs/expressions/syntax.html)\n  * [Algebra](https://mathjs.org/docs/expressions/algebra.html)\n* [Data Types](https://mathjs.org/docs/datatypes/index.html)\n  * [Numbers](https://mathjs.org/docs/datatypes/numbers.html)\n  * [BigNumbers](https://mathjs.org/docs/datatypes/bignumbers.html)\n  * [Fractions](https://mathjs.org/docs/datatypes/fractions.html)\n  * [Complex Numbers](https://mathjs.org/docs/datatypes/complex_numbers.html)\n  * [Matrices](https://mathjs.org/docs/datatypes/matrices.html)\n  * [Units](https://mathjs.org/docs/datatypes/units.html)\n* [Reference](https://mathjs.org/docs/reference/index.html)\n  * [Classes](https://mathjs.org/docs/reference/classes.html)\n  * [Functions](https://mathjs.org/docs/reference/functions.html)\n  * [Constants](https://mathjs.org/docs/reference/constants.html)\n\n## Chemistry molar mass: MM()\n\nTo call this function use `MM('H2O')` and this will get an object with the data of the compound, including totalMass, number of atoms of each element, mass fraction for each element, etc. The formula can include a notation with parenthesis and dot notation for hydrates.\n\nIn:\n``` jl\nborax = MM('Na2(B4O5(OH)4).8H2O');\nborax.elements\nborax.totalMass\nborax.fraction\nborax.fraction.Na\n```\nOut:\n``` javascript\n{\"Na\": 2, \"B\": 4, \"O\": 17, \"H\": 20}\n381.37214 g / mol\n{\"Na\": 0.12056344755545, \"B\": 0.11339055862864, \"O\": 0.71318738699686, \"H\": 0.052858606819051}\n0.12056344755545\n```\n\n## [CoolProp](http://www.coolprop.org/coolprop/HighLevelAPI.html#propssi-function)\n\nUsed for calling PropsSI and HAPropsSI but the unit handling is done with MathJS, thus the functions are not exactly the same as in CoolProp.\n\n### Fluid Properties: props()\n\nIn: \n``` jl\n# Saturated vapor enthalpy [J/kg] of R134a at 25C\nprops('H', 'R134a', {T:25 celsius, Q:1})\n```\nOut: ` 4.1233395323186804e+5 J / kg`\n\n#### References\n\n* [Sample Props Code](http://coolprop.sourceforge.net/coolprop/examples.html#sample-props-code)\n* [List of Parameters (Properties)](http://www.coolprop.org/coolprop/HighLevelAPI.html#table-of-string-inputs-to-propssi-function)\n* [List of Fluids](http://coolprop.sourceforge.net/fluid_properties/PurePseudoPure.html#list-of-fluids)\n\n### [Fluid Phase: phase()](http://coolprop.sourceforge.net/coolprop/HighLevelAPI.html#phasesi-function)\n\nIt can be useful to know what the phase of a given state point is.\n\nIn:\n``` jl\n# Phase of Water at 1 atmosphere and 0% Quality\nphase('Water', {P:1 atm, Q:0 %})\n```\nOut: `twophase`\n\n### [Humid Air Properties: HAprops()](http://coolprop.sourceforge.net/fluid_properties/HumidAir.html)\n\nIn:\n\n``` jl\n#Enthalpy (J per kg dry air) as a function of temperature, pressure,\n#    and relative humidity at dry bulb temperature T of 25C, pressure\n#    P of one atmosphere, relative humidity R of 50%\nHAprops('H', {T:25 degC, P:1 atm, R:50%})\n```\nOut: `50423.45039102888 J / kg`\n\n* [Humid Air: Sample Code](http://coolprop.sourceforge.net/fluid_properties/HumidAir.html#sample-hapropssi-code)\n* [Humid Air: List of Parameters (Properties)](http://coolprop.sourceforge.net/fluid_properties/HumidAir.html#table-of-inputs-outputs-to-hapropssi)\n\n## [CodeMirror](https://codemirror.net)\n\nCodeMirror is used for editing the mathjs code in the browser and includes:\n- Syntax Highlighting\n- Autocompletion\n  - Functions\n  - Physical Constants\n  - Prefixed Units\n  - Variables in Scope\n- Drag and Drop text documents\n- Other key bindings\n  - Find and replace \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eF\u003c/kbd\u003e\n  - The rest can be found in [CodeMirror: Reference Manual](https://codemirror.net/docs/ref/)\n\n## [Plotly](https://plotly.com/javascript/)\n\nIs used to do plots. Uses the main interface of plotly without many changes, but running first through mathjs simplifications.\n\n### Plot hello world [example](https://plotly.com/javascript/getting-started/)\n```jl\nplot([{x:1:5, y:2.^(1:5)}])\n```\n![HelloWorldPlot](img/helloWorldPlot.png)\n\n### Plot functions\n\n```jl\nx = 0: pi/8: 2 pi;\n\nplot([\n  {x:x, y:sin(x), name:\"sin\"},\n  {x:x, y:atan(x), name:\"atan\"}\n])\n```\n![Two traces plot](img/twoTracesPlot.png)\n\n### Plot advanced functions\n\n```jl\nsigma = 10;\nbeta = 2.7;\nrho = 28;\n\nlorenz(t, u) = \n  [ \n    sigma * (u[2] - u[1]),\n    u[1] * (rho - u[3]) - u[2],\n    u[1] * u[2] - beta * u[3]\n  ];\n\nsol = solveODE(lorenz, [0, 100], [1, 1, 1]);\n\nplot(\n [{\n    x: flatten(sol.y[:,1]),\n    y: flatten(sol.y[:,2]),\n    z: flatten(sol.y[:,3]),\n    type: \"scatter3d\",\n    mode: \"lines\"\n}])\n```\n![Lorenz Plot](img/lorenz.png)\n\nPlot iso surfaces for TPMS\n\n```jl\n# Diamond\n\ndx = pi/8;\nXlims = [0, 4pi];\nX = Xlims[1]:dx:Xlims[2];\nY = reshape(X, [-1, 1]);\nZ = reshape(X, [-1, 1, 1]);\n\ndiamond(x,y,z) = cos(x)cos(y)cos(z)-sin(x)sin(y)sin(z);\n\niso = map(X, Y, Z, _(x,y,z) = {x:x, y:y, z:z, v:diamond(x,y,z)});\niso = flatten(iso);\n\ndata = [\n  {\n    type: \"isosurface\",\n    x: map(iso, _(point) = point.x),\n    y: map(iso, _(point) = point.y),\n    z: map(iso, _(point) = point.z),\n    value: map(iso, _(point) = point.v),\n    isomin: -1/16,\n    isomax: 1/18,\n  }\n];\n\nlayout = ({\n  margin: { t: 0, l: 0, b: 0 },\n  scene: {\n    camera: {\n      eye: {\n        x: 1.88,\n        y: -2.12,\n        z: 0.96\n      }\n    }\n  }\n});\n\nplot(data, layout)\n```\n![TPMS](img/TPMS.png)\n\n# Warnings\n\n- All calculations are done locally\n- There is no server saving your calculations\n- Don't run code that you don't trust ","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvd101x%2Fengineering-solver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdvd101x%2Fengineering-solver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvd101x%2Fengineering-solver/lists"}