Comments (55)
Hello,
I want to change the model in oofem
please be more specific.
- Material model? existing, brightly new?
- dimensions?
- load?
- ...?
i don't know how to run the software
there are several possible ways:
- as a standalone program
- there is an executable in
demfem/oofem/build
, you can try it to run in shell asdemfem/oofem/build/oofem
, which should print some help info - you have to give it a text input file (see below)
- there is an executable in
- using python
- which basically corresponds to the text file input, but may be parametrized and programmed
oofem is not very friendly to beginners
it is a complex program with complex documentation and complex input, but to make it work with an example script should be ok
I hope you may provide some suggestions about learning the oofem
See:
- manuals
- wiki, containing "How to get started" section
- Courses & Tranings page
- tests, which might be a source of inspiration
cheers
Jan
from dem-fem-coupling.
Thank you Jan,
i want to change the model in the fem part and increase the particle numbers,.And the help info what you talk about are those manuals? like input ,element ? And how to run the software by python ? Maybe by the python binding? What embarrasses me most is that i am not familiar with the Linux systerm.
from dem-fem-coupling.
i want to change the model in the fem part
yes, this is clear from the first post :-) but please be more specific, as it can have many meanings..
- geometry?
- boundary conditions?
- material model?
- ... ?
the help info what you talk about are those manuals? like input ,element ?
yes, those links after "See:"
how to run the software by python ?
simply python script.py
, where script.py
is the script with your simulation, e.g. demfem/oofem/source/bindings/python/test2.py
What embarrasses me most is that i am not familiar with the Linux systerm.
yes, coming to Linux takes some time to feel comfortable..
cheers
Jan
from dem-fem-coupling.
Thank you Jan,
At this initial stage, i want to change the geometry of the model, and after I mastered these two softwares, i may use the you coupling module to simulate the water inrush in tunnel construction. And after i run the test, how can i see the animation of the simulation? By oofeg? or using Paraview?
from dem-fem-coupling.
i want to change the geometry of the model
then you have to modify the nodes and elements in the *_oofem.py
part.
One option is to load the mesh from en externally prepared file (created by a meshing program).
In the examples, the meshes are very simple, prepared "manually" in the script, but for more complicated geometries, the externally created mesh is probably the preferable way.
how can i see the animation of the simulation? By oofeg? or using Paraview?
I suggest paraview. Both oofem and yade support vtk output, paraview is a powerful tool with many users so one can find helps on the internet.
In the examples, pvpython
(paraview python) is used to create the output images.
Jan
from dem-fem-coupling.
Dear Jan,
I read the 'Running the code 'part of the oofeminput manual, it said that 'the program can be executed by typing oofem [option [parameter]] ...', but when i type 'oofem -v' or 'oofem -filename'
, It didn't work.
Does there exist a exe like yade that i can run the software dirctly in oofem. And i can run the vol1 coupling example, does it means that i had installed the oofem already, that i need not to install oofem again.
By the way, thank you Jan sincerely, i know the problem that i ask may be very elementary, and you still answer me patientfully, that really inspire me.
from dem-fem-coupling.
It didn't work.
please be more specific. (e.g. paste here an error if you get some)
e.g. oofem
has to be in the path (where Linux can find it), or you have to type full exe name, in this case .../oofem/build/oofem
, where ...
is where you have compiled oofem using make
command
i can run the vol1 coupling example, does it means that i had installed the oofem already
yes.
i know the problem that i ask may be very elementary, and you still answer me patientfully, that really inspire me.
"elementary" is very relative :-) I was in the same situation and remember the difficulties
Jan
from dem-fem-coupling.
Dear Jan,
every time i input 'oofem -f ' in the teminal, it returned 'oofem: Command not found '. I try the command in the path:
/home/weicc/下载/dem-fem-coupling-master/installation/_build/oofem/builde or source or source-orig
but still return the error 'Command not found'.
from dem-fem-coupling.
/home/weicc/下载/dem-fem-coupling-master/installation/_build/oofem/builde
it should be .../oofem/build/oofem
from dem-fem-coupling.
....i tried, but still return the error 'oofem: command not find'
/home/weicc/下载/dem-fem-coupling-master/installation/_build/oofem
from dem-fem-coupling.
so step by step :-)
what is the output of
ls /home/weicc/下载/dem-fem-coupling-master/installation/_build/oofem
?
from dem-fem-coupling.
it return 'build oofem.zip source source-orig'
from dem-fem-coupling.
ok, if you type
/home/weicc/下载/dem-fem-coupling-master/installation/_build/oofem/build/oofem
to the console, what happens?
from dem-fem-coupling.
it output options:
Options:
-v prints oofem version
-f (string) input file name
-r (int) restarts analysis from given step
-ar (int) restarts adaptive analysis from given step
-l (int) sets treshold for log messages (Errors=0, Warnings=1,
Relevant=2, Info=3, Debug=4)
-rn turns on renumbering
-qo (string) redirects the standard output stream to given file
-qe (string) redirects the standard error stream to given file
-c creates context file for each solution step
from dem-fem-coupling.
that's it :-) now you can add -f fileName
, e.g. the example file
Jan
from dem-fem-coupling.
that failed Jan, i first print the command 'cd home/weicc/下载/dem-fem-coupling-master/installation/_build/oofem/build' ,
then i tried the command 'oofem -f patch100.out' and 'oofem -f beam2d_1.in' or 'oofem -v'.
but the output is still the 'oofem: command not find'.
I enter it father file '.../oofem', and tried the same command but still the same error.
from dem-fem-coupling.
then ./oofem -f ...
instead of oofem -f ...
oofem
is a "global" command (which does not exist and is not found)./oofem
meansoofem
in current directory
or /home/weicc/下载/dem-fem-coupling-master/installation/_build/oofem/build/oofem -f ...
from dem-fem-coupling.
oh! it work, it is successful when i print ./oofem -v , and when i tried run the test files like 'patch100.out' or 'beam2d_1.in', it return :
Error: (/home/weicc/下载/dem-fem-coupling-master/installation/_build/oofem/source/src/oofemlib/oofemtxtdatareader.C:49)
In OOFEMTXTDataReader:
Can't open input stream (beam2d_1.in)
Does it means that i need copy the file to the 'build file'?
from dem-fem-coupling.
Does it means that i need copy the file to the 'build file'?
it is one option. Preferable way is to save the file to some reasonable directory (e.g. home/weicc/tests/oofem
or something like that) and run the examples from that directory, meaning using
/home/weicc/下载/dem-fem-coupling-master/installation/_build/oofem/build/oofem -f ...
not to write the full path every time, one option is to create a $HOME/bin
, add it to PATH environment variable and create a symbolic link:
mkdir -p $HOME/bin
echo 'export PATH=$HOME/bin:$PATH' > $HOME/.bashrc
ln -s /home/weicc/下载/dem-fem-coupling-master/installation/_build/oofem/build/oofem $HOME/bin/oofem
from dem-fem-coupling.
Thank you so much Jan,
By your command i successful run the software, i will try my best to master the oofem and yade. But it may meet some problems during this process, and i may disturb you from time to time. I hope it would not influence you daily life and work, very sorry to you. Thank you Jan.
Best regards.
from dem-fem-coupling.
Dear Jan,
i want to install oofeg for post-processing, because now it a little hard for me to use VTK to deal with the oofem simulation, does the oofeg existed in oofem software as one part module or i need download from the official website?Or the oofeg is just existing Windows system?
from dem-fem-coupling.
I haven't used oofeg, because it is way harder to use then paraview :-)
see wiki page. Oofem has to be compiled with some special flags to enable oofeg, see installation instructions if you are interested.
But i strongly suggest to use paraview
from dem-fem-coupling.
echo 'export PATH=$HOME/bin:$PATH' > $HOME/.bashrc
sorry, this one should have been
echo 'export PATH=$HOME/bin:$PATH' >> $HOME/.bashrc
otherwise it rewrites .bashrc
file completely. If you have done it, consider its restore by
cp /etc/skel/.bashrc $HOME/.bashrc
from dem-fem-coupling.
thanks Jan,
i correct that mistake, and i will forget oofeg and try to get use to paraview. Sorry Jan, I acted a little anxious about the software, because i have only one year to finish the ralative simulation that i need, I will graduate with a master's degree next year. But it is totally a new filed to me.
thank you
from dem-fem-coupling.
Dear Jan,
now i get a little familiar with yade and oofem, and i try to change the model of the coupling examples, like extend the element of the model, but after i change the code, and print 'make all', it return the error:
python -m cProfile -o /tmp/vol1.pro vol1.py
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/lib/python2.7/cProfile.py", line 200, in
main()
File "/usr/lib/python2.7/cProfile.py", line 193, in main
runctx(code, globs, None, options.outfile, options.sort)
File "/usr/lib/python2.7/cProfile.py", line 49, in runctx
prof = prof.runctx(statement, globals, locals)
File "/usr/lib/python2.7/cProfile.py", line 140, in runctx
exec cmd in globals, locals
File "vol1.py", line 8, in
import liboofem
ImportError: No module named liboofem
Makefile:41: recipe for target 'example' failed
make: *** [example] Error 1
how can i finish the error?
thank you Jan.
from dem-fem-coupling.
Could be related to the deletion of .bashrc
file. Try make all
in installation
directory
from dem-fem-coupling.
Jan,
you suggestion seems like to re-install the module again?
from dem-fem-coupling.
you can try make install
first
from dem-fem-coupling.
i try the make all ,and can i stop it after it finish the oofem part?
from dem-fem-coupling.
you can stop it, but run make install
afterwards
from dem-fem-coupling.
Jan,
after i run the make install,it return:
Now everything should be compiled and prepared for use.
Try out some examples :-)
There is no need to run this script any more
If you want to run examples directly in this terminal, execute the
following command:
export PYTHONPATH=$PYTHONPATH:/home/weicc/下载/dem-fem-coupling-master/installation/_build/install:
and i then use the make all commend in multi1 but still show the error:
python -m cProfile -o /tmp/multi1.pro multi1.py
/home/weicc/下载/dem-fem-coupling-master/installation/_build/yade/install/lib/x86_64-linux-gnu/yade/py/yade/system.py:9: RuntimeWarning: to-Python converter for std::vector<int, std::allocator > already registered; second conversion method ignored.
from yade._customConverters import *
/home/weicc/下载/dem-fem-coupling-master/installation/_build/yade/install/lib/x86_64-linux-gnu/yade/py/yade/system.py:9: RuntimeWarning: to-Python converter for std::vector<double, std::allocator > already registered; second conversion method ignored.
from yade._customConverters import *
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/lib/python2.7/cProfile.py", line 200, in
main()
File "/usr/lib/python2.7/cProfile.py", line 193, in main
runctx(code, globs, None, options.outfile, options.sort)
File "/usr/lib/python2.7/cProfile.py", line 49, in runctx
prof = prof.runctx(statement, globals, locals)
File "/usr/lib/python2.7/cProfile.py", line 140, in runctx
exec cmd in globals, locals
File "multi1.py", line 20, in
fem = OofemInterface(femName,liboofem)
File "/home/weicc/下载/dem-fem-coupling-master/installation/_build/install/demfemcoupling.py", line 121, in init
m = import(self.fileName)
File "multi1_oofem.py", line 63
liboofem.element("lspace", , domain, nodes=(13 ,14,15,16,17,18,19,20), mat=4, crosssect=4)
^
SyntaxError: invalid syntax
Makefile:41: recipe for target 'example' failed
make: *** [example] Error 1
from dem-fem-coupling.
liboofem.element("lspace", , domain, nodes=(13 ,14,15,16,17,18,19,20), mat=4, crosssect=4)
^
SyntaxError: invalid syntax
it means that line is invalid syntax for Python (two commas and nothing/just space between them I guess).
from dem-fem-coupling.
ok, thank you Jan , i know the problem may be where i change the model , i will change the syntax of the commend.Thank you Jan
from dem-fem-coupling.
Dear Jan
i get confuse of you code about the ' bc' . I don't understand the meaning of the coords of the 'bc'
liboofem.node( 1, domain, coords=(0,0,3), bc=(1,1,2))
and the difference between nodes' bc coords.
from dem-fem-coupling.
i know bc is the meaning of boundary condition. But i don't understand the meaning of
bc=(1,1,2)
thank you Jan
from dem-fem-coupling.
Dear Jan
i get confuse of you code about the ' bc' . I don't understand the meaning of the coords of the 'bc'
liboofem.node( 1, domain, coords=(0,0,3), bc=(1,1,2))
and the difference between nodes' bc coords.
'bc' means boundary condition :) 0 means free; 1means fixed. 2 means translation and rotation fixed?
from dem-fem-coupling.
Thank you Dez2018,
the code is from the multiscale coupling; oofem part , and all the upper node's bc is 1 ,1, 2, and the middle 8 nodes' s bc are 1,1,0 ,all these node's translation of z coordinate are no limited. I don't understand the difference of it.
from dem-fem-coupling.
0 means free of translation and rotation. 1 means fixed of translation. I think the code may fixed all movement of the upper nodes at the Z direction as the boundary condition. :)
from dem-fem-coupling.
师姐,你有中文邮箱吗?我能发邮件给你,请教下相关的问题吗?英文不太好。。。 @Dez2018
from dem-fem-coupling.
师姐,你有中文邮箱吗?我能发邮件给你,请教下相关的问题吗?英文不太好。。。 @Dez2018
Ha ha, I'm a boy. This is the picture of my girlfriend. My QQ number is 852321355.
:)哈哈 我是男生,这是我女朋友的头像。我的QQ是 852321355 可以交流
from dem-fem-coupling.
for "ordinary nodes", bc array corresponds to x, y, z boundary condition.
- 0 ... free DOF
- number ... the i-th boundary condition is used
in the cases mentiones:
bc=(1,1,2)
means:- fixed x and y translation (as boundary condition 1 has
prescribedValue=0
) - some prescribed translation in z direction (as boundary condition 2 has
prescribedValue=0.1
)
- fixed x and y translation (as boundary condition 1 has
bc=(1,1,0)
means:- fixed x and y translation (as boundary condition 1 has
prescribedValue=0
) - free translation in z direction
- fixed x and y translation (as boundary condition 1 has
Also have a look at manual
cheers
Jan
from dem-fem-coupling.
Thank you Jan,
i have looked the input manual,but a little misunderstand about it. And when i want to use the vtkxml module to get the data of simulation , but it return the error:
Error: (/home/weicc/下载/dem-fem-coupling-master/installation/_build/oofem/source/src/oofemlib/domain.C:487)
Input error on line 7: "Missing Keyword", field keyword "domain"
In function Domain::instanciateYourself
Record:"vtkxml tstep_all domain_all primvars 1 vars 1 2 3 4 cellvars 1 46"
i use the text example in sm part of oofem , named beam2d_1.in, this is part of it's code :
beam2d_1.out
Homework www sm40 no. 1
#only momentum influence to the displacements is taken into account
#beamShearCoeff is artificially enlarged.
StaticStructural nsteps 3 nmodules 1
errorcheck
vtkxml tstep_all domain_all primvars 1 vars 1 2 cellvars 1 46
domain 2dBeam
OutputManager tstep_all dofman_all element_all
ndofman 6 nelem 5 ncrosssect 1 nmat 1 nbc 6 nic 0 nltf 3 nset 7
and can i directly open the output file in paraview to finish the post-processing .
from dem-fem-coupling.
Do you use a text input file or a python script?
from dem-fem-coupling.
i use the text input file.
from dem-fem-coupling.
you have added a new module (VTKExportModule), you have to update nmodules
value.
This worked for me (with cellvars and primvars I got some errors):
...
StaticStructural nsteps 3 nmodules 2
errorcheck
vtkxml tstep_all domain_all vars 1 2
...
from dem-fem-coupling.
Thank you Jan,
I tried it again,and successed. And the output file can be read in paraview directly. And i wonder that if i want to simulate a huge engneering scale problem, and the element number is also very large , should i input all nodes information, maybe 10000 nodes? Or there is a way to fast modeling?
from dem-fem-coupling.
In the input text file, you have to include all nodes and elements.
Of course, you can use some preprocessing / conversion, e.g. Unv2oofem convertor (I have no experience with it) or some "one purpose" script creating the input file (this is how I used to do it)
cheers
Jan
from dem-fem-coupling.
Dear Jan,
i wonder that can i directly run the python script in paraview to finish the oofem part model's visualization, for example : i try to run the multi_oofem.py in paraview's tool- python shell. I am sorry for that it may be very easy to write the relate code in python file to solve the problem , i still not master the python language very will. That is also the reason that i use the oofem input file rather than the python file.
from dem-fem-coupling.
multi_oofem.py
is a script dedicated for oofem part of the simulation.
For paraview, there is multi1_pv.py
. I think it should be possible to run it directly in paraview (haven't tried, let me know :-)
from dem-fem-coupling.
Dear Jan,
when i tried the example, it appear the error again,
No module named liboofem
and i tried the make install command. It shows that 'Now everything should be compiled and prepared for use.'
What should i do to solve the problem?
from dem-fem-coupling.
make all
should definitely solve this, with the cost of time consuming compilation.
or try to search the liboofem.so
file and add the directory where it is to PYTHONPATH
(this is what make install does
)
from dem-fem-coupling.
Dear Jan,
sorry to bother you again ,this time the problem may not be related to this project. Recently i am tring the FEMxDEM coupling code in yade's examples which was written by Guoning. But when i tried to run the example: biaxialSmooth.py, it showed the error:
Press Enter to continue...
Traceback (most recent call last):
File "/home/weicc/下载/dem-fem-coupling-master/installation/_build/yade/install/bin/yade", line 241, in runScript
execfile(script,globals())
File "./biaxialSmooth.py", line 44, in
prob = MultiScale(domain=mydomain,ng=numg,np=nump,random=False,rtol=1e-2,usePert=False,pert=-2.e-5,verbose=True)
File "/home/weicc/下载/dem-fem-coupling-master/installation/_build/yade/install/lib/x86_64-linux-gnu/yade/py/yade/FEMxDEM/msFEM2D.py", line 85, in init
self.__scenes=self.__pool.map(initLoad,range(ng))
File "/usr/lib/python2.7/multiprocessing/pool.py", line 253, in map
return self.map_async(func, iterable, chunksize).get()
File "/usr/lib/python2.7/multiprocessing/pool.py", line 572, in get
raise self._value
PicklingError: Can't pickle <type 'function'>: attribute lookup builtin.function failed
i know it may be not vary well to consult you in here. I have asked a question in yade's forum, but nobody answer , and i saw you answered the relative question once:https:
//answers.launchpad.net/yade/+question/670527,
so i come here to bother you again. I apologize to you for my behavior.
from dem-fem-coupling.
Hello,
sorry, yes, this is not a good place to ask as I have no experience with the FEMxDEM yade module. Also the question you mentioned is not really related to your current problem..
I have link to similar problem to the Yade question
from dem-fem-coupling.
Dear Jan,
as shown in the multi1 example,the nREVs=16 ,each element has 8 gauss points,and create 2 DEM models, and if i want to increase the number of DEM model, can i directly change the number of gauss point ,and nREV? For example , set nREVs=32.
from dem-fem-coupling.
Yes,
you can set nREVs=32
.
You have to adjust getIPs
and getRVEs
functions in the main script accordingly.
Please open a new issue for a new issue.
from dem-fem-coupling.
Related Issues (20)
- surf1 example: dynamic module does not define init function (initlibyade) HOT 8
- Surfexample: getKeyByName and raise RuntimeError1 HOT 1
- Not finding demfemcoupling module HOT 4
- installation problem HOT 20
- ImportError: import liboofem undefined symbol: gc HOT 2
- version error coused ImportError, mainly about the dynamic module HOT 1
- error: Input error on line 0: "Bad format"., field keyword "f(t)" HOT 4
- ImportError: No module named Xlib.display HOT 4
- try to change the model from own research HOT 7
- how to get the strain of random region in FEM part HOT 3
- Installation problems of fem-dem coupling HOT 2
- Is it possible to turn the FEM element to DEM partical? HOT 5
- Installation problems of fem-dem coupling
- Installation problems of fem-dem coupling HOT 6
- Running problem HOT 19
- Contact coupling is only possible with polyhedrons? HOT 3
- weight of vertices HOT 1
- oofem site is down and fails the installation HOT 1
- surf1 example HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dem-fem-coupling.