Python library for UNcertainty analysis in liGhtwEight dsiGn with IntervalS and fuzzy numberS
Project description
pyUngewiss
Python librarY for Uncertainty aNalysis in liGhtwEight desiGn with IntervalS and fuzzy numberS
Python-Bibliothek zur Unsicherheitsanalyse im Leichtbau mit Intervallen und unscharfen Zahlen
Libreria Python per l'analisi dell'incertezza nella costruzione leggera con intervalli e numeri sfocati
Installation
Prerequisites
Python 3 and you can install the necessary libraries via PIP:
pip install scipy
pip install numpy
pip install matplotlib
pip install pygmo
pip install cma
Further, for the use of gradient-based optimizers, you will need the package pyOpt.
svn checkout http://svn.pyopt.org/trunk pyopt
cd pyopt
python -m pip install -U .
For details see www.pyopt.org
Note to PyGMO: the PIP installation is currently not working. Therefore PaGMO and then PyGMO must be compiled to use the algorithms in that package.
Install
python -m pip install -U .
PIP
You can also install pyUngewiss via PIP
pip install pyUngewiss
Getting started
See iPython notebooks and Python files under examples.
Set up uncertain function with uncertain parameters and further parameters as input:
def Eigenfrequency1DoF(p, x):
m = p[0]
k = p[1]
omega0 = np.sqrt(k/m)
f0 = omega0/2/np.pi
return(f0)
Then define the uncertain parameters -- here as intervals -- and combine in one list:
m = pu.UncertainNumber([2., 2.5])
k = pu.UncertainNumber([40000, 60000])
pUnc = [m, k]
Initialize the uncertain problem and set parameter options:
Prob = pu.UncertainAnalysis(Eigenfrequence1DoF, pUnc)
Prob.deltax = 1e-3
Prob.epsStop = 1e-3
Calculate:
Prob.calculate()
Print and plot results:
m.printValue()
k.printValue()
plt, _ = pu.plotIntervals([m.Value, k.Value],
labels=["mass $m$ [kg]", "stiffness $k$ [N/mm]"])
plt.show()
Author
E. J. Wehrle
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pyUngewiss-1.1.tar.gz
.
File metadata
- Download URL: pyUngewiss-1.1.tar.gz
- Upload date:
- Size: 289.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.27.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a34c507014bac06e7c6ae65027d5dd250c4e63ca6dcb9995e80c4c11c494b0f4 |
|
MD5 | 19db07c7d58c086ba204381c2b3e72a2 |
|
BLAKE2b-256 | 98226fd3fa130b0a314532f713d4fe05c2112d3f76e9685a1b528645e35b589d |