compas-dev / compas_fea

COMPAS interface to common Finite Element Analysis software.
https://compas.dev/compas_fea
MIT License
36 stars 18 forks source link

Error Messages with example: mesh strip #120

Closed Beberger closed 2 years ago

Beberger commented 2 years ago

Hello everyone,

I am using COMPAS FEA for my Master's Thesis and an error message occurs when I am running the example "mesh strip" in Rhino. Has somebody an idea where the errors come from?

best regrads Ben

The Error code is:

`Message: Traceback (most recent call last): File "D:\Programme_Masterthesis\Anaconda3\lib\site-packages\compas\rpc\dispatcher.py", line 89, in _dispatch module = importlib.import_module(modulename) File "D:\Programme_Masterthesis\Anaconda3\lib\importlib__init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 961, in _find_and_load_unlocked File "", line 219, in _call_with_frames_removed File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "D:\Programme_Masterthesis\compas_fea-main\src\compas_fea\utilities__init.py", line 44, in from .functions import ( File "D:\Programme_Masterthesis\compas_fea-main\src\compas_fea\utilities\functions.py", line 5, in from compas.datastructures import Mesh File "D:\Programme_Masterthesis\Anaconda3\lib\site-packages\compas\datastructures__init.py", line 203, in from .network import # noqa: F401 E402 F403 File "D:\Programme_Masterthesis\Anaconda3\lib\site-packages\compas\datastructures\network__init__.py", line 5, in from .core import # noqa: F401 F403 File "D:\Programme_Masterthesis\Anaconda3\lib\site-packages\compas\datastructures\network\core__init.py", line 8, in from .network import BaseNetwork # noqa: F401 File "D:\Programme_Masterthesis\Anaconda3\lib\site-packages\compas\datastructures\network\core\network.py", line 8, in from compas.files import OBJ File "D:\Programme_Masterthesis\Anaconda3\lib\site-packages\compas\files__init__.py", line 124, in from .gltf import # noqa: F401 F403 File "D:\Programme_Masterthesis\Anaconda3\lib\site-packages\compas\files\gltf__init.py", line 5, in from .gltf import GLTF File "D:\Programme_Masterthesis\Anaconda3\lib\site-packages\compas\files\gltf\gltf.py", line 8, in from compas.files.gltf.gltf_parser import GLTFParser File "D:\Programme_Masterthesis\Anaconda3\lib\site-packages\compas\files\gltf\gltf_parser.py", line 14, in from compas.files.gltf.gltf_content import GLTFContent File "D:\Programme_Masterthesis\Anaconda3\lib\site-packages\compas\files\gltf\gltf_content.py", line 6, in from compas.files.gltf.gltf_node import GLTFNode File "D:\Programme_Masterthesis\Anaconda3\lib\site-packages\compas\files\gltf\gltf_node.py", line 10, in from compas.geometry import identity_matrix File "D:\Programme_Masterthesis\Anaconda3\lib\site-packages\compas\geometry\init__.py", line 401, in from .bbox import # noqa: F401 F403 File "D:\Programme_Masterthesis\Anaconda3\lib\site-packages\compas\geometry\bbox\init__.py", line 10, in from .bbox_numpy import * # noqa: F401 F403 File "D:\Programme_Masterthesis\Anaconda3\lib\site-packages\compas\geometry\bbox\bbox_numpy.py", line 24, in from compas.numerical import pca_numpy File "D:\Programme_Masterthesis\Anaconda3\lib\site-packages\compas\numerical\init.py", line 96, in from .linalg import * # noqa: F401 F403 File "D:\Programme_Masterthesis\Anaconda3\lib\site-packages\compas\numerical\linalg.py", line 28, in from scipy.sparse.linalg import factorized File "D:\Programme_Masterthesis\Anaconda3\lib\site-packages\scipy\sparse\linalg\init__.py", line 114, in from .eigen import * File "D:\Programme_Masterthesis\Anaconda3\lib\site-packages\scipy\sparse\linalg\eigen\init__.py", line 9, in from .arpack import * File "D:\Programme_Masterthesis\Anaconda3\lib\site-packages\scipy\sparse\linalg\eigen\arpack\init__.py", line 20, in from .arpack import * File "D:\Programme_Masterthesis\Anaconda3\lib\site-packages\scipy\sparse\linalg\eigen\arpack\arpack.py", line 42, in from . import _arpack ImportError: DLL load failed while importing _arpack: Die angegebene Prozedur wurde nicht gefunden.

Traceback: line 345, in _proxy, "D:\Programme_Masterthesis\compas-main\src\compas\rpc\proxy.py" line 926, in plot_data, "D:\Programme_Masterthesis\compas_fea-main\src\compas_fea\cad\rhino.py" line 69, in , "D:\Programme_Masterthesis\compas_fea-main\examples\mesh_strip_rhino.py"`

The script I enter is:

` from compas_fea.cad import rhino from compas_fea.structure import ElasticIsotropic from compas_fea.structure import ElementProperties as Properties from compas_fea.structure import GeneralDisplacement from compas_fea.structure import GeneralStep from compas_fea.structure import GravityLoad from compas_fea.structure import PinnedDisplacement from compas_fea.structure import RollerDisplacementX from compas_fea.structure import ShellSection from compas_fea.structure import Structure

Author(s): Andrew Liew (github.com/andrewliew)

Structure

mdl = Structure(name='mesh_strip', path='C:/Temp/')

Elements

rhino.add_nodes_elements_from_layers(mdl, mesh_type='ShellElement', layers='elset_mesh')

Sets

rhino.add_sets_from_layers(mdl, layers=['nset_left', 'nset_right', 'nset_middle'])

Materials

mdl.add(ElasticIsotropic(name='mat_elastic', E=75*10**9, v=0.3, p=2700))

Sections

mdl.add(ShellSection(name='sec_plate', t=0.001))

Properties

mdl.add(Properties(name='ep_plate', material='mat_elastic', section='sec_plate', elset='elset_mesh'))

Displacements

mdl.add([ PinnedDisplacement(name='disp_left', nodes='nset_left'), RollerDisplacementX(name='disp_right', nodes='nset_right'), GeneralDisplacement(name='disp_middle', nodes='nset_middle', z=0.200), ])

Loads

mdl.add(GravityLoad(name='load_gravity', elements='elset_mesh'))

Steps

mdl.add([ GeneralStep(name='step_bc', displacements=['disp_left', 'disp_right'], nlgeom=False), GeneralStep(name='step_loads', loads=['load_gravity'], displacements=['disp_middle'], nlgeom=False), ]) mdl.steps_order = ['step_bc', 'step_loads']

Summary

mdl.summary()

Run

mdl.analyse_and_extract(software='abaqus', fields=['u'])

rhino.plot_data(mdl, step='step_loads', field='um')

rhino.plot_data(mdl, step='step_loads', field='smises')

`

tomvanmele commented 2 years ago

seems that RPC is unable to load some of the libraries needed by numpy. there can be many reasons for this depending on how compas_fea was installed.

from the error message i get the impression that compas_fea is installed in the base environment of Anaconda. is that correct?

could you tell me how the package was installed?

Beberger commented 2 years ago

Thank you for the fast answer. compas seems to be installed in the base... image

I downloaded the zip of compas fea and unziped it, in the extended system properties I created a new environment variable to the path of src: image

When I check compas fea shoud be installed: image

when I run the script, a .inp file is created in the C/Temp path... image

tomvanmele commented 2 years ago

this is not the way the package should be installed, but that is not your fault, because i noticed that the installation instructions are horribly outdated. the good news is that the problem is therefore easily fixed and will go away with a proper install.

i will update the instructions and ping you here as soon as they are available...

Beberger commented 2 years ago

ok, thank you.

tomvanmele commented 2 years ago

new instructions are available here https://compas.dev/compas_fea/latest/gettingstarted/installation.html

let me know if you need more help to get this to work...

Beberger commented 2 years ago

Thank you. I was able to install it and it works now.