Skip to content

Commit

Permalink
Merge branch 'main' into add-symbolic-class
Browse files Browse the repository at this point in the history
  • Loading branch information
youandvern authored May 27, 2024
2 parents 7d5c2a4 + 9eea4d8 commit 00ca3f4
Show file tree
Hide file tree
Showing 21 changed files with 1,735 additions and 97 deletions.
99 changes: 52 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@

<!-- TABLE OF CONTENTS -->
<details>
<summary>Table of Contents</summary>
<ol>
<li><a href="#introduction">Introduction</a></li>
<li><a href="#links">Links</a></li>
<summary style="font-size:1.5rem;"><b>Contents</b></summary>
<ul>
<li><a href="#introduction">Introduction</a><ul>
<li><a href="#examples">Examples</a></li>
<li><a href="#documentation-and-distribution">Documentation</a></li></ul></li>
<li><a href="#quickstart">Quickstart</a><ul>
<li><a href="#installation">Installation</a></li>
<li><a href="#first-calculation-function">First Calculation</a></li>
<li><a href="#view-the-report">View Report</a></li></ul></li>
<li><a href="#features">Features</a></li>
<li><a href="#quickstart">Quickstart</a></li>
<li><a href="#contributing">Contributing</a></li>
<li><a href="#built-with">Built With</a></li>
<li><a href="#license">License</a></li>
</ol>
</ul>
</details>



## Introduction
# Introduction

##### efficalc provides an extensible, testable, and powerful framework for building and managing complex calculations.

Expand All @@ -45,42 +45,19 @@
![Efficalc Demo Report](https://github.com/youandvern/efficalc/raw/main/docs_src/_static/efficalc_basic_demo2.png?raw=true)


## Links

- [Read the full documentation](https://youandvern.github.io/efficalc)
- [See more examples](https://github.com/youandvern/efficalc/tree/main/examples)
- [The PyPI distribution](https://pypi.org/project/efficalc/)



## Features


#### Automated report generation
Generate detailed, professional reports automatically, ensuring clarity and precision in communication.

#### Open source
efficalc welcomes community contributions. Request features or contribute directly to enhance its capabilities.

#### Engineering-specific features
Benefit from built-in tools tailored to solving common engineering challenges. [See our section property library in action](https://github.com/youandvern/efficalc/blob/main/examples/advanced/steel_beam_moment_strength.py#L53).
## Examples

#### Reusable
Create calculation templates once and reuse them across multiple designs and projects, saving time and ensuring consistency.
- [Simple Examples](https://github.com/youandvern/efficalc/tree/main/examples/simple)
- [More Advanced Examples](https://github.com/youandvern/efficalc/tree/main/examples/advanced)

#### Testable
Easily test your calculations to reduce errors and improve confidence every design. [Read the testing guide.](https://youandvern.github.io/efficalc/testing.html)
## Documentation and Distribution

#### Integrate with other workflows
Seamlessly integrate with your existing Python-enabled workflows to boost efficiency and connectivity across tools and platforms. [See some examples of this.](https://youandvern.github.io/efficalc/integration.html)
- [Full documentation](https://youandvern.github.io/efficalc)
- [PyPI distribution](https://pypi.org/project/efficalc/)

#### Figures now supported
Easily add figures to your calculation reports for even more clarity. [Read the full documentation for figures.](https://youandvern.github.io/efficalc/figures.html)

#### Control your content
Tailor your calculation reports to include only the most relevant information, making them as concise or detailed as you prefer.

## Quickstart
# Quickstart

### Installation

Expand Down Expand Up @@ -125,11 +102,11 @@ builder.view_report()
![The resulting calculation report](https://github.com/youandvern/efficalc/raw/main/docs_src/_static/pythagorean_default.png)


### Update Input Values
### Updating Input Values

The value proved to the `Input` class in your calculation function is treated as a default value.
The value provided to the `Input` class in your calculation function is treated as a default value.

If you want to change any of your input values, pass in a dictionary of the default overrides as an optional second parameter to the `ReportBuilder`:
When you run your calculation with different input values, pass in a dictionary of the default overrides into the optional second parameter of the `ReportBuilder`:


```python
Expand All @@ -138,14 +115,42 @@ builder = ReportBuilder(calculation, new_inputs)
builder.view_report()
```

## Contributing

# Features


#### Automated report generation
Generate detailed, professional reports automatically, ensuring clarity and precision in communication.

#### Open source
efficalc welcomes community contributions. Request features or contribute directly to enhance its capabilities.

#### Engineering-specific features
Benefit from built-in tools tailored to solving common engineering challenges. [See our section property library in action](https://github.com/youandvern/efficalc/blob/main/examples/advanced/steel_beam_moment_strength.py#L53).

#### Reusable
Create calculation templates once and reuse them across multiple designs and projects, saving time and ensuring consistency.

#### Testable
Easily test your calculations to reduce errors and improve confidence every design. [Read the testing guide.](https://youandvern.github.io/efficalc/testing.html)

#### Integrate with other workflows
Seamlessly integrate with your existing Python-enabled workflows to boost efficiency and connectivity across tools and platforms. [See some examples of this.](https://youandvern.github.io/efficalc/integration.html)

#### Figures now supported
Easily add figures to your calculation reports for even more clarity. [Read the full documentation for figures.](https://youandvern.github.io/efficalc/figures.html)

#### Control your content
Tailor your calculation reports to include only the most relevant information, making them as concise or detailed as you prefer.

# Contributing

We welcome contributions of all kinds from the community! Whether it's reporting a bug, requesting a feature, or submitting a pull request, your input and engagement is invaluable to efficalc's development.

- Report issues [here](https://github.com/youandvern/efficalc/issues).
- Submit pull requests [here](https://github.com/youandvern/efficalc/pulls).

## Built With
# Built With

* [latexexpr](https://github.com/kajusK/latexexpr) - [we use a forked version](https://github.com/youandvern/latexexpr_efficalc)
* [pylatexenc](https://github.com/phfaist/pylatexenc)
Expand All @@ -157,7 +162,7 @@ We welcome contributions of all kinds from the community! Whether it's reporting
* [sphinx-copybutton](https://github.com/executablebooks/sphinx-copybutton)
* [sphinxcontrib-video](https://github.com/sphinx-contrib/video)

## License
# License

efficalc is released under the [MIT License](https://github.com/youandvern/efficalc/tree/main/LICENSE).

10 changes: 10 additions & 0 deletions efficalc/sections/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
from .aisc_rectangular import ALL_AISC_RECTANGULAR_NAMES, AiscRectangular
from .aisc_tee import ALL_AISC_TEE_NAMES, AiscTee
from .aisc_wide_flange import ALL_AISC_WIDE_FLANGE_NAMES, AiscWideFlange
from .alum_angle import ALL_ALUMINUM_ANGLE_NAMES, AluminumAngle
from .alum_channel import ALL_ALUMINUM_CHANNEL_NAMES, AluminumChannel
from .alum_circular import ALL_ALUMINUM_CIRCULAR_NAMES, AluminumCircular
from .alum_rectangular import ALL_ALUMINUM_RECTANGULAR_NAMES, AluminumRectangular
from .alum_wide_flange import ALL_ALUMINUM_WIDE_FLANGE_NAMES, AluminumWideFlange
from .section_query import (
get_aisc_angle,
get_aisc_channel,
Expand All @@ -13,4 +18,9 @@
get_aisc_rectangular,
get_aisc_tee,
get_aisc_wide_flange,
get_aluminum_angle,
get_aluminum_channel,
get_aluminum_circular,
get_aluminum_rectangular,
get_aluminum_wide_flange,
)
189 changes: 189 additions & 0 deletions efficalc/sections/alum_angle.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
import dataclasses


@dataclasses.dataclass
class AluminumAngle(object):
"""This is a dataclass containing the properties of an Aluminium Angle section.
:param A: Cross-sectional area (in^2)
:type A: float
:param Ix: Moment of inertia about the x-axis (in^4)
:type Ix: float
:param Iy: Moment of inertia about the y-axis (in^4)
:type Iy: float
:param Iz: Moment of inertia about the z-axis (in^4)
:type Iz: float
:param R1: Fillet radius (in)
:type R1: float
:param R2: Tip radius (in)
:type R2: float
:param Size: The section size name
:type Size: str
:param Sx: Elastic section modulus about the x-axis (in^3)
:type Sx: float
:param Sy: Elastic section modulus about the y-axis (in^3)
:type Sy: float
:param Type: The type of section shape (e.g. American Standard, Aluminum Association, etc.)
:type Type: str
:param W: Nominal weight (lb/ft)
:type W: float
:param alpha: Angle of the z-axis (deg)
:type alpha: float
:param b: Width (in)
:type b: float
:param d: Depth (in)
:type d: float
:param rx: Radius of gyration about the x-axis (in)
:type rx: float
:param ry: Radius of gyration about the y-axis (in)
:type ry: float
:param rz: Radius of gyration about the z-axis (in)
:type rz: float
:param t: Thickness (in)
:type t: float
:param x: Location of the centroid along the x-axis (in)
:type x: float
:param y: Location of the centroid along the y-axis (in)
:type y: float
"""

A: float
Ix: float
Iy: float
Iz: float
R1: float
R2: float
Size: str
Sx: float
Sy: float
Type: str
W: float
alpha: float
b: float
d: float
rx: float
ry: float
rz: float
t: float
x: float
y: float


ALL_ALUMINUM_ANGLE_NAMES = (
"L 1 1/2 x 1 1/2 x 1/8",
"L 1 3/4 x 1 3/4 x 1/8",
"L 1 3/4 x 1 3/4 x 1/4",
"L 1 1/2 x 1 1/2 x 1/4",
"L 2 x 2 x 1/8",
"L 1 3/4 x 1 3/4 x 3/8",
"L 2 x 2 x 3/16",
"L 2 x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 1/2 x 1 1/2 x 1/8",
"L 2 1/2 x 1 1/2 x 3/16",
"L 2 1/2 x 1 1/2 x 1/4",
"L 2 1/2 x 1 1/2 x 5/16",
"L 2 1/2 x 1 1/2 x 3/8",
"L 2 1/2 x 2 x 1/8",
"L 2 1/2 x 2 x 1/4",
"L 2 1/2 x 2 x 3/16",
"L 2 1/2 x 2 x 5/16",
"L 2 1/2 x 2 x 3/8",
"L 3 x 1 1/2 x 1/4",
"L 3 x 2 x 3/16",
"L 3 x 2 x 1/4",
"L 3 x 2 x 5/16",
"L 3 x 2 x 3/8",
"L 3 x 2 x 1/2",
"L 3 x 2 1/2 x 1/4",
"L 3 x 2 1/2 x 5/16",
"L 3 x 2 1/2 x 3/8",
"L 3 1/2 x 3 x 1/4",
"L 3 1/2 x 3 x 5/16",
"L 3 1/2 x 3 x 3/8",
"L 3 1/2 x 3 x 1/2",
"L 4 x 3 x 1/4",
"L 4 x 3 x 3/8",
"L 4 x 3 x 5/16",
"L 4 x 3 1/2 x 5/16",
"L 4 x 3 x 5/8",
"L 4 x 3 x 1/2",
"L 4 x 3 x 7/16",
"L 5 x 3 x 3/8",
"L 4 x 3 1/2 x 3/8",
"5 x 3 1/2 x 5/16",
"L 4 x 3 1/2 x 1/2",
"L 5 x 3 x 1/2",
"L 5 x 3 x 1/4",
"5 x 3 1/2 x 1/2",
"L 5 x 3 x 5/16",
"5 x 3 1/2 x 3/8",
"5 x 3 1/2 x 5/8",
"6 x 3 x 3/8",
"6 x 3 1/2 x 5/16",
"6 x 3 1/2 x 3/8",
"6 x 3 1/2 x 5/8",
"6 x 3 1/2 x 1/2",
"6 x 4 x 3/8",
"6 x 4 x 5/8",
"7 x 4 x 1/2",
"6 x 4 x 7/16",
"6 x 4 x 3/4",
"6 x 4 x 1/2",
"8 x 6 x 5/8",
"8 x 6 x 11/16",
"8 x 6 x 3/4",
)
Loading

0 comments on commit 00ca3f4

Please sign in to comment.