No project description provided
Project description
MatEngine
MatEngine is a Python library designed for the engineering and scientific community focused on materials science. When fully developed, it will facilitates material discovery through microstructural generator and characterization through simulation.
Features:
- Material Generation: Tools to generate material structures at various scales
- random field generation
- plurigaussian simulation
NB: MatEngine is currently in development, and as such, the feature list will continue to be updated
Quick Start
Below is an example of how to generate a discrete two-phase structure with plurigaussian simulation
from matengine.generation.generators import random_field, create_covariance_model
from matengine.generation.decisiontree import decision_tree, ellipse
from matengine.generation.plurigaussian import plurigaussian_simulation
from matengine.utils.plotting import array_to_vtk
dim = [50,50]
ls=5
var=1
kernel = 'gau'
seed1 = 123
seed2 = 1234
mdl = create_covariance_model(kernel, dim, var, ls)
z1 = random_field(mdl, dim, seed=seed1)
z2 = random_field(mdl, dim, seed=seed2)
fields = [z1, z2]
Config = {
'root': {
'type': 'decision',
'func': ellipse,
'args': {
'key1': 'Z1',
'key2': 'Z2',
'cx': 0,
'cy': 0,
'sx': 2.6,
'sy': 0.3
},
'yes_branch': 'phase1',
'no_branch': 'phase0'
},
'phase0': {
'type': 'leaf',
'action': 0
},
'phase1': {
'type': 'leaf',
'action': 1
},
}
tree_config = Config
tree = decision_tree()
tree.build_tree(tree_config)
L, P = plurigaussian_simulation(dim, tree, fields, ldim=500)
array_to_vtk(L, 'L')
array_to_vtk(P, 'P')
Documentation
Coming soon ...
License
MatEngine is made available under the MIT License, allowing for liberal reuse and modification for both academic and commercial purposes.
Contact
For support, feedback, or inquiries, please contact via email: rickettse1@cardiff.ac.uk
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
Built Distribution
Hashes for matengine-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb6cd8ce9b9d831d0b34f5bf7335de2de81708f0738ff65aac124437afee1c67 |
|
MD5 | 7cc28e0a067a27b6b0431a7870ce9199 |
|
BLAKE2b-256 | d0d800f1de0cfc14f69370810f044a5eaa03ad96b7e9ffcfec167e65a98a7f35 |