XC, opensource structural engineering FEM code

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: XC, opensource structural engineering FEM code

Post by bernd »

hardeeprai wrote: Mon Nov 12, 2018 10:35 pm
bernd wrote: Sun Oct 28, 2018 4:24 pm
ebrahim raeyat wrote: Fri Oct 26, 2018 7:18 pm do you think it is valuable for working on it Seriously?
From what I have seen so far. Surely yes!
Even with license issues of OpenSees?
AFAIK this is not a problem at all. We even could use a closed source solver. We do not use the solver as a library. Means we do not integrat one line of solver code. We just run the binary of the solver. Means AFAIK it does not matters which licence the solver has.
User avatar
ebrahim raeyat
Posts: 621
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: XC, opensource structural engineering FEM code

Post by ebrahim raeyat »

bernd wrote: Tue Nov 13, 2018 7:19 am AFAIK this is not a problem at all. We even could use a closed source solver. We do not use the solver as a library. Means we do not integrat one line of solver code. We just run the binary of the solver. Means AFAIK it does not matters which licence the solver has.
surely. we can tell the user that legaly preparates that solver and this is up to the user of software, but for opensees it's not problem. we can develop own pre and post processor for example in GPL lincence.
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: XC, opensource structural engineering FEM code

Post by Jee-Bee »

ebrahim raeyat wrote: Tue Nov 13, 2018 9:07 am surely. we can tell the user that legaly preparates that solver and this is up to the user of software, but for opensees it's not problem. we can develop own pre and post processor for example in GPL lincence.
FreeCAD use LGPL whisch is not compatible with GPL...
User avatar
ebrahim raeyat
Posts: 621
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: XC, opensource structural engineering FEM code

Post by ebrahim raeyat »

I wanted to install xc on ubuntu 18. I followed the instruction for install on ubuntu.

1- first i install dependency. this is export of command:

Code: Select all

Building wheels for collected packages: mayavi, apptools, pyface, traits, traitsui, configobj
Running setup.py bdist_wheel for mayavi ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-aeokca9e/mayavi/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/tmpkp9vpu24pip-wheel- --python-tag cp36:

  Numpy is required to build Mayavi correctly, please install it first.

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-aeokca9e/mayavi/setup.py", line 401, in <module>
raise RuntimeError(msg)
RuntimeError:
Numpy is required to build Mayavi correctly, please install it first.

Failed building wheel for mayavi
Running setup.py clean for mayavi
Running setup.py bdist_wheel for apptools ... done
Stored in directory: /root/.cache/pip/wheels/f9/9e/2a/981bab2267d8f7fa546568cd79440e6b61b4fc570ee071080e
Running setup.py bdist_wheel for pyface ... done
Stored in directory: /root/.cache/pip/wheels/37/52/af/aee83db49e028aa51a59588df09caf10efeec7b1b8ad02f62a
Running setup.py bdist_wheel for traits ... done
Stored in directory: /root/.cache/pip/wheels/f7/47/a7/7b13ce060f1c7f1d01260a0f253407f251ff2b0e8de3c20156
Running setup.py bdist_wheel for traitsui ... done
Stored in directory: /root/.cache/pip/wheels/1f/e4/16/861bd3f165b0f373f6a508ca6e866a73b5fc27f77cbaf71314
Running setup.py bdist_wheel for configobj ... done
Stored in directory: /root/.cache/pip/wheels/f1/e4/16/4981ca97c2d65106b49861e0b35e2660695be7219a2d351ee0
Successfully built apptools pyface traits traitsui configobj
Failed to build mayavi
Installing collected packages: configobj, traits, pyface, traitsui, apptools, envisage, numpy, pygments, vtk, mayavi
Running setup.py install for mayavi ... done
Successfully installed apptools-4.4.0 configobj-5.0.6 envisage-4.7.0 mayavi-4.6.2 numpy-1.16.0 pyface-6.0.0 pygments-2.3.1 traits-4.6.0 traitsui-6.0.0 vtk-8.1.2
it seems it installed all required packages.

2- then i entered this command for installation of xc_basic:

Code: Select all

ebi@lenovo:~/xcfem$  bash xc_code_install.sh
CMake Error: The source directory "/home/ebi/xcfem/build_xc/xc_basic/src" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
make: *** No targets specified and no makefile found.  Stop.
ebi@lenovo:~/xcfem$
i think it's related to xc_basic that developers decide to merge it on xc.

thanks a lot
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: XC, opensource structural engineering FEM code

Post by bernd »

ebrahim raeyat wrote: Thu Jan 24, 2019 6:16 am I wanted to install xc on ubuntu 18. I followed the instruction for install on ubuntu.
This one ? https://github.com/xcfem/xc/blob/master ... l.linux.md

it seams Numpy is missing, which is needed to build Mayavi
User avatar
ebrahim raeyat
Posts: 621
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: XC, opensource structural engineering FEM code

Post by ebrahim raeyat »

bernd wrote: Thu Jan 24, 2019 6:35 am This one ? https://github.com/xcfem/xc/blob/master ... l.linux.md

it seams Numpy is missing, which is needed to build Mayavi
thanks. I used your script for installation. it remove xc_basic that seems have been merged into xc repository.
I run that script line by line and had been arrived to this line:

Code: Select all

cd build-xc_utils
cmake ../xc_utils/src
and export:

Code: Select all

CMake version is greater than 2.8.4
-- project dir: /home/ebi/xcfem/build_xc/xc_utils/src/..
-- include dir: /home/ebi/xcfem/build_xc
-- lib dir: /home/ebi/xcfem/build_xc/xc_utils/lib
-- ************* find packages begins ****************
-- The imported target "vtkRenderingPythonTkWidgets" references the file
   "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.3/VTKTargets.cmake"
but not all the files it references.

-- The imported target "vtk" references the file
   "/usr/bin/vtk"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.3/VTKTargets.cmake"
but not all the files it references.

-- GNUGTS include dir: /usr/include
-- GNUGTS libraries: /usr/lib/x86_64-linux-gnu/libgts.so
-- Found CImg: 
-- Found plotter.h: /usr/include
-- Found plotter lib: /usr/lib/x86_64-linux-gnu/libplotter.so
-- Boost version: 1.65.1
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   python
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   system
--   regex
--   filesystem
--   thread
--   math_c99
--   math_c99f
--   math_c99l
--   math_tr1
--   math_tr1f
--   math_tr1l
--   chrono
--   date_time
--   atomic
-- Found GMP: /usr/lib/x86_64-linux-gnu/libgmp.so
-- SQLite3 library found.
-- Looking for execinfo
-- Looking for execinfo headers - found
-- ************* find packages ends ****************
-- /usr/lib/x86_64-linux-gnu/libboost_system.so/usr/lib/x86_64-linux-gnu/libboost_regex.so/usr/lib/x86_64-linux-gnu/libboost_filesystem.so/usr/lib/x86_64-linux-gnu/libboost_thread.so/usr/lib/x86_64-linux-gnu/libboost_math_c99.so/usr/lib/x86_64-linux-gnu/libboost_math_c99f.so/usr/lib/x86_64-linux-gnu/libboost_math_c99l.so/usr/lib/x86_64-linux-gnu/libboost_math_tr1.so/usr/lib/x86_64-linux-gnu/libboost_math_tr1f.so/usr/lib/x86_64-linux-gnu/libboost_math_tr1l.so/usr/lib/x86_64-linux-gnu/libboost_chrono.so/usr/lib/x86_64-linux-gnu/libboost_date_time.so/usr/lib/x86_64-linux-gnu/libboost_atomic.so/usr/lib/x86_64-linux-gnu/libpthread.so
-- Build type: Release
-- USING CXXFLAGS = '-g -O2 -fdebug-prefix-map=/build/cgal-ZyilPF/cgal-4.11=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -frounding-math -O3 -DNDEBUG'
-- USING EXEFLAGS = '-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed '
-- Targetting Unix Makefiles
-- Using /usr/bin/c++ compiler.
-- Requested component: Core
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   thread
--   system
--   chrono
--   date_time
--   atomic
-- Requested component: MPFR
-- Requested component: GMPXX
-- Requested component: GMP
-- cgal file: /usr//lib/x86_64-linux-gnu/cmake/CGAL/UseCGAL.cmake
-- /usr/lib/x86_64-linux-gnu/libboost_system.so/usr/lib/x86_64-linux-gnu/libboost_regex.so/usr/lib/x86_64-linux-gnu/libboost_filesystem.so/usr/lib/x86_64-linux-gnu/libboost_thread.so/usr/lib/x86_64-linux-gnu/libboost_math_c99.so/usr/lib/x86_64-linux-gnu/libboost_math_c99f.so/usr/lib/x86_64-linux-gnu/libboost_math_c99l.so/usr/lib/x86_64-linux-gnu/libboost_math_tr1.so/usr/lib/x86_64-linux-gnu/libboost_math_tr1f.so/usr/lib/x86_64-linux-gnu/libboost_math_tr1l.so/usr/lib/x86_64-linux-gnu/libboost_chrono.so/usr/lib/x86_64-linux-gnu/libboost_date_time.so/usr/lib/x86_64-linux-gnu/libboost_atomic.so/usr/lib/x86_64-linux-gnu/libpthread.so
-- Configuring done
CMake Warning at CMakeLists.txt:154 (ADD_LIBRARY):
  Cannot generate a safe runtime search path for target xc_base because files
  in some directories may conflict with libraries in implicit directories:

    runtime library [libsqlite3.so.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/ebi/miniconda2/lib

  Some of these libraries may not be found correctly.


CMake Warning at CMakeLists.txt:155 (ADD_LIBRARY):
  Cannot generate a safe runtime search path for target loadCombinations
  because files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libsqlite3.so.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/ebi/miniconda2/lib

  Some of these libraries may not be found correctly.


CMake Warning at CMakeLists.txt:156 (ADD_LIBRARY):
  Cannot generate a safe runtime search path for target geom because files in
  some directories may conflict with libraries in implicit directories:

    runtime library [libsqlite3.so.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/ebi/miniconda2/lib

  Some of these libraries may not be found correctly.


CMake Warning at CMakeLists.txt:157 (ADD_LIBRARY):
  Cannot generate a safe runtime search path for target xcGnuGts because
  files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libsqlite3.so.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/ebi/miniconda2/lib

  Some of these libraries may not be found correctly.


-- Generating done
-- Build files have been written to: /home/ebi/xcfem/build_xc/build-xc_utils
my default python path is:

Code: Select all

$ which python
/home/ebi/miniconda2/bin/python
I think problem is that xc uses python2, although my default python is python2:

Code: Select all

ebi@lenovo:~/xcfem/build_xc/xc_utils/python_modules$ $(which python)
Python 2.7.15 | packaged by conda-forge | (default, Jul 27 2018, 10:26:36) 
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 
But when I run this code i give error for print function:

Code: Select all

ebi@lenovo:~/xcfem/build_xc/xc_utils/python_modules$ sudo sh local_install.sh
[sudo] password for ebi: 
  File "setup.py", line 45
    print pth_to_libs
                    ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(pth_to_libs)?
and for this command:

Code: Select all

ebi@lenovo:~/xcfem/build_xc/xc/python_modules$ sudo sh local_install.sh
[sudo] password for ebi: 
/usr/local/lib/python3/dist-packages
running install
running build
running build_py
running install_lib
byte-compiling /usr/local/lib/python3.6/dist-packages/misc/shell_testing_bench.py to shell_testing_bench.cpython-36.pyc
  File "/usr/local/lib/python3.6/dist-packages/misc/shell_testing_bench.py", line 18
    print "nuevosZeroLengthShell; excedido el número del elementos, aumente el valor de offset\n"
                                                                                                ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("nuevosZeroLengthShell)?
I don't know how can tell the xc that use python2. Thanks.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: XC, opensource structural engineering FEM code

Post by bernd »

it seams you have not installed all required packages ... Try this commands ... https://github.com/xcfem/xc/blob/master ... _bionic.sh before you gone start with xc_utils
User avatar
ebrahim raeyat
Posts: 621
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: XC, opensource structural engineering FEM code

Post by ebrahim raeyat »

Thanks @bernd. finally i installed xc on ubuntu. I want to know:
1- Is there any GUI in progress for xc?
2- Is it better for start, to explore examples or may be a better way?
3- Is xc installable on windows machine? no at present, but possible for future?

thanks a lot.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: XC, opensource structural engineering FEM code

Post by bernd »

no GUI at all. Any input is done in Python. This is what we could use FreeCAD for.

try the unit tests ... https://github.com/xcfem/xc/blob/master ... sh#L64-L69 or try the examples of ana ... https://github.com/anaiortega/XCmodels or very simple ones here https://github.com/xcfem/xc_examples
User avatar
ebrahim raeyat
Posts: 621
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: XC, opensource structural engineering FEM code

Post by ebrahim raeyat »

bernd wrote: Sun Jan 27, 2019 11:22 am no GUI at all. Any input is done in Python. This is what we could use FreeCAD for.

try the unit tests ... https://github.com/xcfem/xc/blob/master ... sh#L64-L69 or try the examples of ana ... https://github.com/anaiortega/XCmodels or very simple ones here https://github.com/xcfem/xc_examples
I am ready for 3-4 years or more work on this project! but one question:
is there any roadmap for Gui? is there any sample from another software in your mind?
i think ETABS is a good sample for this work.
Post Reply