Code Monkey home page Code Monkey logo

icams / kanapy Goto Github PK

View Code? Open in Web Editor NEW
26.0 26.0 8.0 305.36 MB

Kanapy is a python package for generating three-dimensional synthetic polycrystals based on characteristic microstructural features.

Home Page: https://icams.github.io/Kanapy/

License: GNU Affero General Public License v3.0

TeX 0.33% C 0.45% Shell 0.01% Python 3.81% JavaScript 0.14% CSS 0.09% MATLAB 30.17% M 0.03% Mercury 0.01% OpenEdge ABL 0.01% HTML 64.65% XSLT 0.27% Makefile 0.01% Objective-C 0.01% Jupyter Notebook 0.03%
microstructure-generator

kanapy's People

Contributors

ahartmaier avatar arfon avatar bilawal51 avatar biswas1984 avatar golsatolooeieshlaghi avatar grld avatar jan-janssen avatar mrgprasad avatar ronakshoghi avatar srmnitc avatar toloogt2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

kanapy's Issues

Temporary files

Temporary files/directories should only be created in cwd, not in package directories as src, libs, etc. as these might have limited access for users in some installations.

ModuleNotFoundError: No module named 'kanapy.base'

I followed the installation instructions and have a conda environment with Kanapy installed.

When I run: kanapy runTests I get an error.

ModuleNotFoundError: No module named 'kanapy.base'

I am on Windows 11, with Python 3.8.13.

Thanks!

Particle dynamics

Particles get trapped in corners for non-periodic boundary conditions.

Progress bar

Progress bar does not display well in Spyder or Juypter notebooks. Are there options to cure this?

Correlation Problems in Matlab2021b

After running:

kanapy setupTexture

I encountered some problems:
`Is MATLAB installed in this system (yes/no): yes
Searching your system for MATLAB ...
Found MATLAB in /home/shen/polyspace/R2021b/bin/matlab, continue (yes/no): yes
Error using quit
Unrecognized function or variable 'Settings'.

Error using quit
Unrecognized function or variable 'Settings'.

/home/shen/.conda/envs/knpy/lib/python3.8/site-packages/setuptools/dist.py:519: InformationOnly: Normalizing '2021b.0' to '2021b0'
self.metadata.version = self._normalize_version(
/home/shen/.conda/envs/knpy/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

    ********************************************************************************
    Please avoid running ``setup.py`` directly.
    Instead, use pypa/build, pypa/installer, pypa/build or
    other standards-based tools.

    See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
    ********************************************************************************

!!
self.initialize_options()
/home/shen/.conda/envs/knpy/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:66: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!

    ********************************************************************************
    Please avoid running ``setup.py`` and ``easy_install``.
    Instead, use pypa/build, pypa/installer, pypa/build or
    other standards-based tools.

    See https://github.com/pypa/setuptools/issues/917 for details.
    ********************************************************************************

!!
self.initialize_options()
/home/shen/.conda/envs/knpy/lib/python3.8/site-packages/setuptools/command/sdist.py:119: SetuptoolsDeprecationWarning: build_py command does not inherit from setuptools' build_py.
!!

    ********************************************************************************
    Custom 'build_py' does not implement 'get_data_files_without_manifest'.
    Please extend command classes from setuptools instead of distutils.

    See https://peps.python.org/pep-0632/ for details.
    ********************************************************************************

!!
self._add_data_files(self._safe_data_files(build_py))
zip_safe flag not set; analyzing archive contents...
matlab.pycache.init.cpython-38: module references file
matlab.pycache.init.cpython-38: module references path
matlab.engine.pycache.init.cpython-38: module references file
Unrecognized function or variable 'startup'.

Traceback (most recent call last):
File "init_engine.py", line 11, in
eng.startup(nargout=0)
File "/home/shen/.conda/envs/knpy/lib/python3.8/site-packages/matlabengineforpython-2021b0-py3.8.egg/matlab/engine/matlabengine.py", line 70, in call
return FutureResult(self._engine(), future, nargs, _stdout,
File "/home/shen/.conda/envs/knpy/lib/python3.8/site-packages/matlabengineforpython-2021b0-py3.8.egg/matlab/engine/futureresult.py", line 67, in result
return self.__future.result(timeout)
File "/home/shen/.conda/envs/knpy/lib/python3.8/site-packages/matlabengineforpython-2021b0-py3.8.egg/matlab/engine/fevalfuture.py", line 82, in result
self._result = pythonengine.getFEvalResult(self._future,self._nargout, None, out=self._out, err=self._err)
matlab.engine.MatlabExecutionError: Unrecognized function or variable 'startup'.
`

ODF reconstruction with orientation assignment

Hi,

Would it be possible to share volume and share surface area CSV files required by orientation assignment tab? These files were unfortunately not automatically generated by geometry tab. I tried the function 'knpy.input_output.extract_volume_sharedGBarea' as suggested in documentation, but this function doesn't seem to exist in the recent release. Has this been moved to a different location?

Thanks!

Software license?

The setup.py file says MIT license but the LICENSE file includes the AGPL-3.0 License.

How to identify the phase of a grain in 2 phase microstructure

Hello,

Not quite an issue, but I didn't find a discussion board, hence posting it here.
I used the 2 phase packing example and was able to generate the microstructure. In the abaqus output, it created element sets for each grain. But how do I identify which phase the grain belongs to? What kind of function do I have to user?
Also, would it be possible to export a VTK RECTILINEAR GRID which could be visualized in ParaView?

Thanks!

Installation issue

Following previously closed issue (Software installation issue #9) I also encountered installation issue whilst following the installation guide. I verified that I have both g++ and cmake installed.

image

I even tried to manually cmake (using command: cmake -S .. -B. -G "MinGW Makefiles"):
image

Then I tried to make the file but got errors from pybind11:
image

There might be some compatibility issues with new versions libraries (I'm no expert) as in the "libs" folder of the build using that method, I don't have the eigen being copied.

Also the version that is being installed seems to be kanapy 4.0.1 when i use the command pip install kanapy@git+https://github.com/ICAMS/Kanapy

Is there something I missed as I never had that much trouble installing a python module.

Thank you in advance for your help.

SetupTexture

when i try matlab R2017b and run "kanapy setupTexture", some errors occur:

Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/home/shen/MATLAB/R2017b/extern/engines/python/setup.py", line 13, in
raise EnvironmentError('MATLAB Engine for Python supports Python version'
OSError: MATLAB Engine for Python supports Python version 2.7, 3.4, 3.5 and 3.6 but your version of Python is 3.8
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Traceback (most recent call last):
File "init_engine.py", line 9, in
import matlab.engine
ModuleNotFoundError: No module named 'matlab'

Originally posted by @sasasuta in #21 (comment)

Software installation issue

Error message after running any 'kanapy' command: ModuleNotFoundError: No module named 'kanapy.base'
Same error when kanapy is installed (following the Readme.md) in both Windows 64-bit operating system and Linux (Ubuntu).

(knpy) akshatha@akshatha-VirtualBox:~/Desktop/kanapy$ kanapy -h
Traceback (most recent call last):
  File "/home/akshatha/miniconda3/envs/knpy/bin/kanapy", line 33, in <module>
    sys.exit(load_entry_point('kanapy', 'console_scripts', 'kanapy')())
  File "/home/akshatha/miniconda3/envs/knpy/bin/kanapy", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/home/akshatha/miniconda3/envs/knpy/lib/python3.8/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/home/akshatha/miniconda3/envs/knpy/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 843, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/akshatha/Desktop/kanapy/src/kanapy/__init__.py", line 6, in <module>
    from kanapy.api import Microstructure
  File "/home/akshatha/Desktop/kanapy/src/kanapy/api.py", line 23, in <module>
    from kanapy.input_output import particleStatGenerator, RVEcreator,\
  File "/home/akshatha/Desktop/kanapy/src/kanapy/input_output.py", line 13, in <module>
    from kanapy.entities import Ellipsoid, Cuboid
  File "/home/akshatha/Desktop/kanapy/src/kanapy/entities.py", line 6, in <module>
    from kanapy.collision_detect_react import collision_routine
  File "/home/akshatha/Desktop/kanapy/src/kanapy/collision_detect_react.py", line 3, in <module>
    import kanapy.base as kbase
ModuleNotFoundError: No module named 'kanapy.base'

Test routines

Test for packingRoutine fails due to mock function with return parameters.

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.