Skip to main content

A script for solving vector mechanics Ferdinand P. Beer proposed exercises.

Project description

A script for solving vector mechanics Ferdinand P. Beer proposed exercises
pip3 install beersolver && beersolver

🤔 Overview

Here are proposed solutions for the exercises listed on the end of the third chapter of the book "Vector Mechanics for Engineers 9° Edition, Ferdinand P.Beer"

The general recommendation for the script was that it needed at least two types of input and at least 2 types of output.

Information about the solved exercises:

🔨 Installation

Automatic

Issue

pip3 install search-that-hash

then:

beersolver

To run.

Manual Installation

Create folder for the virtual env

mkdir beersolver

Create virtual env

python3 -m venv beersolver

Activate it:

  • Linux
source beersolver/bin/activate
  • Windows
call beersolver/bin/activate.bat

Install all the necessary packages:

pip3 install -r requirements.txt

Run beersolver to test it:

beersolver

📖 Documentation (How to use tutorial)

OBS.: Throughout this documentation whenever beersolver is referenced it means python3 beersolver.py for those who didn't install it or beersolver to the ones who installed it with setuptools.

Configuration File

To easily run you may just start by creating a skeleton config:

beersolver exercise-three-c-6 -g 

This will create a template with all parameters needed to solve called example.ini as the one below.

[positions]
position_a_x = 0.0
position_a_y = 96.0
position_a_z = 4.0
position_e_x = 90.0
position_e_y = 52.0
position_e_z = 0.0
position_c_x = 120.0
position_c_y = 36.0
position_c_z = 100.0

[lambdas]
lambda_ab_x = 0.7777777777777778
lambda_ab_y = -0.4444444444444444
lambda_ab_z = 0.4444444444444444
lambda_cd_x = -0.7777777777777778
lambda_cd_y = 0.4444444444444444
lambda_cd_z = -0.4444444444444444

[range]
upper_range = 36.0
lower_range = 9.0
step = 1.0

With this created you can now just issue the command and see the result:

beersolver exercise-three-c-6 -i example.ini

This now generates the response on the command prompt. You can change the values from example.ini to change the exercise parameters.

Inline

To solve the exercise using inline mode you may insert all the arguments as parameters, or you wait for the prompt. The program detects if is there any missing argument.

Supplying parameters:

beersolver  exercise-three-c-6 --position_a 0.0 96.0 4.0 --position_e 90.0 52.0 0.0 --position_c 120.0 36.0 100.0 --lambda_ab 7/9 -4/9 4/9 --lambda_cd -7/9 4/9 -4/9 --upper_range
 36 --lower_range 9 --step 1.0 

Waiting for the prompting:

beersolver  exercise-three-c-6

A[x]: 0.0
A[y]: 96.0
A[z]: 4.0
E[x]: 90.0
E[y]: 52.0
E[z]: 0.0
C[x]: 120.0
C[y]: 36.0
C[z]: 100.
Lambda_ab[x]: 7/9
Lambda_ab[y]: -4/9
Lambda_ab[z]: 4/9
Lambda_cd[x]: -7/9
Lambda_cd[y]: 4/9
Lambda_cd[z]: -4/9
upper_range: 36
lower_range: 9
step: 1.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

beersolver-0.1.1.tar.gz (20.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

beersolver-0.1.1-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

Details for the file beersolver-0.1.1.tar.gz.

File metadata

  • Download URL: beersolver-0.1.1.tar.gz
  • Upload date:
  • Size: 20.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for beersolver-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e7abdd208261794681bbec61ac14fa4118f438fbb770c0ae654269c4f65db381
MD5 76f0f077e5b45afd95c5555ecfc10e77
BLAKE2b-256 a1e21f78362ab05bfa51a4cdfe156af216d5b3809c52d02881631b45e7f16a4c

See more details on using hashes here.

File details

Details for the file beersolver-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: beersolver-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 21.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for beersolver-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 91102769328f7e8688dd61a840c0d91fb7bf82840ac3354b74ae7e984c70787f
MD5 018382c9e18dd1936ad277bcbbbe3fb1
BLAKE2b-256 851115e8a4afaa9e7c0106241c21299cc715112519cd781cda386eb92021ed0b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page