GithubHelp home page GithubHelp logo

civilengec / basiccivileng Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 133 KB

Module that will contain basic Civil Enginnering Classes and Functions for developing free open source Software in python

License: MIT License

Python 100.00%
civil civilengineering engineering opensource python ingenieriacivil civil-engineering units-of-measure budget budgeting project-management costeo-obras obras-civiles physcal-quantities conversion finance money

basiccivileng's Introduction

EngUnits.py

Content

-Introduction
-Installation
-Documentation
-CivilEngUnits

Introduction

A module that will contain basic Engineering Classes and Functions for developing free, open-source Software in python

Documentation

Installation and usage


Requirements

"re",
"numpy",
"pandas",
"sympy",
"matplotlib",
"datetime"

Note

List of all Classes and argument

Class Required Arguments Optional Arguments
Units `` ``
Quantity value:number, symbol:string, system_units:Units decimal:interger
Money value:number, symbol:string, system_units:Units decimal:interger, date:string, year_rate:float

Class Units

This class will be the master for handle unit, it will contain all the physical quantanties and units of messurement that the software can interpret and read

Atributes

-dic_units(dic): It is a dictionary of dataframe. Its keys are the physical quantities names and its values are the Dataframe. Each DataFrame contains the symbol unit of messurement as its index and the columns Name, Factor, Description. The column Name hold the name of the unit of messurement, the column factor the number for convert into the main unit of messurement, and description an string
-all_units: A list that contain all the symbols support by the class
-unit_system(dic): dic that contain all main units. Its key are the physical quantities, its values are the symbol

Methods

Method Required Arguments Optional Arguments Operation Return
find_unit unit:str Checks if the unit is supported by the object. Name of the physical quantity where the unit is allocated and False if not.
append name:str, record:list Append a new unit to the units DataFrame of the physical quantity name. Name must be a string and the name of a physical quantity. The reord must be a list with the following structure: [name, symbol, factor, Description]
remove symbol:str Removes a unit with the symbol pass from the Units class
empty name:str Empty units DataFrame from the name physical quantity.
set_units units:DataFrame,name:str Sets the units Dataframe of a given physical quantities. unit must be a DataFrame with the columns Name, Symbol, Factor and Description. The factor columnn must contain number values and at least one row must have the factor column = 1.The symbol column must contain string values.
set_unit_system system_dic:dict Set unit sytem for symplify all unit.The keys of the dictionary are the physical quantity name and the values are the symbol of the main unit of the physical quantity
simplify unit:str Perform an algebraic simplification of the unit using the unit system.

Class Quantity

This class will handle the quatities that must have a value, unit and a unit system

Atributes

-value(number): It is the messure value with a given unit of messurement
-symbol(string): Itis the symbol of the given unit use for messure the value
-system_units(Units): It the class that help to handle, operate and interpret the unit of messurement
-decimal (interger): Number of decimal that will be use for represent the object as string.
-name (string): name of the physical quantity that messure the given unit
-unit (dictionary): it have the symbol of the units as keys and the values of factors as value
-main_unit (string): the main unit of the quantity

Methods

-It allows all the basic arithmetic +,-,*,/ while checking the unit consistency. It can only add or subtract similar units. It can multiply and divide by any given unit or numerical value..
-It can compare measurement of the same physical quantity with the operators ==,>=,<=,>,>,<,!=.

Method Required Arguments Optional Arguments Operation Return
is_related other:object Checks if the object are related one another True if the object is a subclass of Quantity
update_units units:Units Update the Units interpreter object A copy of the Quantity object with the new units interpreter
set_factors units:Units Sets the factors of the units Dictionary Update the units dictionary and the main_unit
simplify Perform an algebraic simplification of the unit using the unit system.
convert new_unit:str factor:number Convert the quantity to the given new unit using the factor if provided or using the conversion factor that the system_unit holds. new Quantity

basiccivileng's People

Contributors

civilengec avatar

Watchers

 avatar  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.