Re: [Yade-users] [Question #679154]: run FEMxDEM examples
Question #679154 on Yade changed: https://answers.launchpad.net/yade/+question/679154 LiTingting posted a new comment: Hello ! I'm trying to run the biaxialSmooth.py now. But there were some problems similar to one problem above by jamespaul(#10). I couldn't know how to solve this problem after reading all comments. Therefore, I want to ask it again and hope you can help me. My detailed question is here: https://answers.launchpad.net/yade/+question/703213 To be brief, after I typed '/home/ltt/My yade/install/bin/yade-2022-08-26.git-d6517c7' ./biaxialSmooth.py in the ternimal, the terminal shown: Running script ./biaxialSmooth.py === For better performance compile python-escript with direct solver method === Press Enter to continue... But this code didn't change for a long time. And the contorller window is stuck. When I try to click some button in this window, It shows "“biaxialSmooth.py” is not responding". I only can click "Force Quit" to kill is process. So I want to ask why it will appear and how to solve this problem? Thank you very much! -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679154]: run FEMxDEM examples
Question #679154 on Yade changed: https://answers.launchpad.net/yade/+question/679154 LiTingting posted a new comment: Hello ! I'm trying to run the biaxialSmooth.py now. But there were some problems similar to one problem above by jamespaul(#10). I couldn't know how to solve this problem after reading all comments. Therefore, I want to ask it again and hope you can help me. My detailed question is here: https://answers.launchpad.net/yade/+question/703213 To be brief, after I typed '/home/ltt/My yade/install/bin/yade-2022-08-26.git-d6517c7' ./biaxialSmooth.py in the ternimal, the terminal shown: Running script ./biaxialSmooth.py === For better performance compile python-escript with direct solver method === Press Enter to continue... But this code didn't change for a long time. And the contorller window is stuck. When I try to click some button in this window, It shows "“biaxialSmooth.py” is not responding". I only can click "Force Quit" to kill is process. So I want to ask why it will appear and how to solve this problem? Thank you very much! -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679154]: run FEMxDEM examples
Question #679154 on Yade changed: https://answers.launchpad.net/yade/+question/679154 jamespaul posted a new comment: Thanks Huanran -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679154]: run FEMxDEM examples
Question #679154 on Yade changed: https://answers.launchpad.net/yade/+question/679154 whr posted a new comment: Based on my understanding, both of them are defined on the function space. So they should be the same. You can try to ask on the escript forum. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679154]: run FEMxDEM examples
Question #679154 on Yade changed: https://answers.launchpad.net/yade/+question/679154 jamespaul posted a new comment: Just the name I gave to this column of data in the CSV file.I exported disp.getFunctionSpace().getX() and shear.getFunctionSpace().getX()) and found they are the same.It's weird. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679154]: run FEMxDEM examples
Question #679154 on Yade changed: https://answers.launchpad.net/yade/+question/679154 whr posted a new comment: The packings are just DEM packings. You can analyze them as you analyze a DEM simulation. I'm not clear about the second one. How are dispx and shearx defined? -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679154]: run FEMxDEM examples
Question #679154 on Yade changed: https://answers.launchpad.net/yade/+question/679154 jamespaul posted a new comment: Thanks Huanran, >They are the RVE packing at the RVE packings at the final state. In the ./packing folder,there are 512 packing_xxx_100.yade.gz. 512 is the number of gauss point(8*16*4).So I think each file saves a gauss point information.I opened them with yade and found that the images were the same.So how do I analyze these data? >Do you know how to get the coordinate value of the gauss point? I used saveDataCSV("./result/disp_%d.csv"%t,disp=disp,shear=shear,e=vR,dispx=disp.getFunctionSpace().getX(),shearx=shear.getFunctionSpace().getX()) But the result of dispx and shearx are the same. Thanks, James -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679154]: run FEMxDEM examples
Question #679154 on Yade changed: https://answers.launchpad.net/yade/+question/679154 Status: Answered => Solved jamespaul confirmed that the question is solved: Thanks Janek Kozicki, that solved my question. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679154]: run FEMxDEM examples
Question #679154 on Yade changed: https://answers.launchpad.net/yade/+question/679154 jamespaul posted a new comment: Thanks Huanran too, I used your method and it works now. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679154]: run FEMxDEM examples
Question #679154 on Yade changed: https://answers.launchpad.net/yade/+question/679154 Janek Kozicki proposed the following answer: Hi, to avoid confusion I have hidden my previous post about deleting *.pyc files. Turns out that it was a misconfiguration on my side, and python always uses *.py file if it is more recent than *.pyc file, as indicated in the python manual [1]. Thanks to Jan for spotting my mistake. Regarding the calculations, this is what I get after I press enter: Running script biaxialSmooth.py === For better performance compile python-escript with direct solver method === Press Enter to continue... Not converged after 0 iteration(s)! Relative error: 1.00e+00 Not converged after 1 iteration(s)! Relative error: 7.789837e-02 Not converged after 2 iteration(s)! Relative error: 2.820422e-02 Convergence reached after 3 iteration(s)! Relative error: 8.350168e-03 Not converged after 0 iteration(s)! Relative error: 1.00e+00 Not converged after 1 iteration(s)! Relative error: 2.794717e-02 Convergence reached after 2 iteration(s)! Relative error: 8.239768e-03 So I assume that the calculations are going smoothly, at least for me. But they are not fast. Try pressing enter and going for lunch ;) I had to wait at least 2 minutes before I saw the first output line about calculation progress. However this is the farthest I have went in trying FEMxDEM examples. I see that it calculates something, and that's it. I don't know if the calculations are correct, where is the result or what to do with this result ;) So if during your FEMxDEM adventure you advance further I suppose that adding some notes about how you got there into the documentation might be useful for others. Thank you for the alternative instructions: 1 sudo apt install python-escript 2 cd /usr/share/doc/yade/examples/FEMxDEM 3 export PYTHONPATH="/usr/lib/python-escript:/usr/lib/x86_64-linux-gnu/yade/py/yade/FEMxDEM" 4 export LD_LIBRARY_PATH=/usr/lib/python-escript/lib 5 ln -s /usr/bin/yade /usr/lib/x86_64-linux-gnu/yade/py/yade/FEMxDEM/yadeimport.py 6 /usr/bin/yade ./biaxialSmooth.py I will add them to the examples into comment section. [1] https://docs.python.org/2/tutorial/modules.html?highlight=pyc #compiled-python-files -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679154]: run FEMxDEM examples
Question #679154 on Yade changed: https://answers.launchpad.net/yade/+question/679154 whr posted a new comment: I suggest you try to install from the source code at following link: https://launchpad.net/escript-finley There is a installation guide 'install.pdf' on the site. And yes. I think you need to modify the corresponding path to locate escript after installation. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679154]: run FEMxDEM examples
Question #679154 on Yade changed: https://answers.launchpad.net/yade/+question/679154 jamespaul posted a new comment: Thanks whr, If I use 'sudo apt install python-escript' to install escript,I can't locate the trusty_options.py. Should I use Debian/Ubuntu Binary Installation or Installing from Source to install it?And if use these methods ,the path should be changed. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679154]: run FEMxDEM examples
Question #679154 on Yade changed: https://answers.launchpad.net/yade/+question/679154 whr posted a new comment: This error is on 'escript' side. It can be solved following the instruction on https://answers.launchpad.net/escript-finley/+question/294604 (copied as below) ## You will need to find the options file you are using to compile. For example (as Meng Qing Xiang suggested above) scons/templates/trusty_options.py Find the line which says: umfpack = And make sure that it says umfpack = True If you can't find the line at all, you can add it to the file. Note that switching this on means that you will need to have umfpack installed. On Debian/Ubuntu systems, I think this will be in the libsuitesparse-dev package. ## -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679154]: run FEMxDEM examples
Question #679154 on Yade changed: https://answers.launchpad.net/yade/+question/679154 jamespaul posted a new comment: Thank you for reminding. I have copied all the scripts from "https://github.com/yade/trunk/tree/master/examples/FEMxDEM"and"https://github.com/yade/trunk/tree/master/py/FEMxDEM; and delete the *.pyc files. It works ,but the error is reported: Running script ./biaxialSmooth.py === For better performance compile python-escript with direct solver method === Press Enter to continue... I pressed Enter,but still no response and only forced quit could close the terminal. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679154]: run FEMxDEM examples
Question #679154 on Yade changed: https://answers.launchpad.net/yade/+question/679154 Janek Kozicki posted a new comment: Oh, and make sure that you delete the *.pyc files. Because python does not use a new *.py file when a *.pyc file is present! -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679154]: run FEMxDEM examples
Question #679154 on Yade changed: https://answers.launchpad.net/yade/+question/679154 Janek Kozicki posted a new comment: Ah! I recognize this error. If I am correct you are using yade 2018.02b, while I have fixed this problem only a month ago. Please look inside your file /usr/lib/x86_64-linux- gnu/yade/py/yade/FEMxDEM/msFEM2D.py, is it different? If yes, then maybe it will be enough if you take the latest version of this file from the link you have found: https://github.com/yade/trunk/blob/master/py/FEMxDEM/msFEM2D.py It is possible that you will have to do the same with other files too. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679154]: run FEMxDEM examples
Question #679154 on Yade changed: https://answers.launchpad.net/yade/+question/679154 jamespaul posted a new comment: Thanks Janek, I changed my command as follows 1 sudo apt install python-escript 2 cd /usr/share/doc/yade/examples/FEMxDEM 3 export PYTHONPATH="/usr/lib/python-escript:/usr/lib/x86_64-linux-gnu/yade/py/yade/FEMxDEM" 4 export LD_LIBRARY_PATH=/usr/lib/python-escript/lib 5 ln -s /usr/bin/yade /usr/lib/x86_64-linux-gnu/yade/py/yade/FEMxDEM/yadeimport.py 6 /usr/bin/yade ./biaxialSmooth.py It works ,but the error is reported Running script ./biaxialSmooth.py Traceback (most recent call last): File "/usr/bin/yade", line 182, in runScript execfile(script,globals()) File "./biaxialSmooth.py", line 22, in prob = MultiScale(domain=mydomain,ng=numg,np=nump,random=False,rtol=1e-2,usePert=False,pert=-2.e-5,verbose=True) File "/usr/lib/x86_64-linux-gnu/yade/py/yade/FEMxDEM/msFEM2D.py", line 67, in __init__ self.__pde.getSolverOptions().setSolverMethod(SolverOptions.DIRECT) ValueError: Cannot use DIRECT solver method, the running escript was not compiled with a direct solver enabled I think my input is correct,but the function here has some problem. https://github.com/yade/trunk/blob/master/py/FEMxDEM/msFEM2D.py#L68 I am curious why the 68th line hasn't an output. Thanks in advance. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679154]: run FEMxDEM examples
Question #679154 on Yade changed: https://answers.launchpad.net/yade/+question/679154 whr posted a new comment: Hi, I think the successors of Ning in HK Bruno mentioned is me. I am using an earlier version and not familiar with the lastest trunk version. But I'm willing to offer help or improve the documentation if you cannot reach Ning. To the lastest question: >run `mv biaxialSmooth.yade.gz 0.yade.gz` is to generate the initial RVE packing. You don't need to run this command since the packing is already saved as "0.yade.gz". The packing is related to biaxialSmooth.py through 'simDEM.py' in which the initial packing '0.yade.gz' is loaded. Huanran -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679154]: run FEMxDEM examples
Question #679154 on Yade changed: https://answers.launchpad.net/yade/+question/679154 jamespaul posted a new comment: >run `mv biaxialSmooth.yade.gz 0.yade.gz` When I run preparerve. py, I get 0. yade. gz. So how can I relate it to biaxialSmooth. py? I don't see the function that imports preparerve.py in biaxialSmooth. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679154]: run FEMxDEM examples
Question #679154 on Yade changed: https://answers.launchpad.net/yade/+question/679154 jamespaul posted a new comment: Thanks Janek for your detailed teaching,but I still have some questions that I didn’t understand. >we can both improve the documentation Since I will spend a lot of time studying coupling, I am willing to cooperate with you if I have the ability. >which yade /usr/bin/yade I installed yade using sudo apt-get install yade. >this symlink is called yadeimport.py and is placed inside py/FEMxDEM directory I typed dpkg -L yade and locate yadeimport.py but still can't find yadeimport.py. >about 6 commands 1 sudo apt install python-escript #it must be right 2 cd /usr/share/doc/yade/examples/FEMxDEM#I think the path is right? Enter examples,not library or interface. 3 export PYTHONPATH="/usr/lib/x86_64-linux-gnu/yade/py/yade/FEMxDEM" #I'm not sure.I use locate FEMxDEM to find the path,somewhat different from your third step. 4 export LD_LIBRARY_PATH=/usr/lib/python-escript/lib #it must be right. 5 ln -s /usr/bin/yade #the second argment is the path of yadeimport.py,I don't know how to get. 6 ln -s /usr/bin/yade ./biaxialSmooth.py #it must be right. Feng -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679154]: run FEMxDEM examples
Question #679154 on Yade changed: https://answers.launchpad.net/yade/+question/679154 Janek Kozicki proposed the following answer: Ah, the path ../../py/FEMxDEM/yadeimport.py is relative to yade source tree. It refers to this directory https://gitlab.com/yade- dev/trunk/tree/master/py/FEMxDEM and in this directory the symlink yadeimport.py must appear. If you use yade installed as a packege, then you will have to find this directory. Command "dpkg -L yade" might help you a bit with this. Perhaps we should just add this symlink to the installed/packaged version of yade? -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679154]: run FEMxDEM examples
Question #679154 on Yade changed: https://answers.launchpad.net/yade/+question/679154 Status: Open => Answered Janek Kozicki proposed the following answer: Hi, I did spend some time trying to get FEMxDEM examples to work. I am not 100% satisfied, perhaps if you are determined enough we can both improve the documentation for this in https://yade-dev.gitlab.io/trunk/FEMxDEM.html However perhaps we will need some help from FEMxDEM original author, hence I am sending this email also to Ning Guo. Bruno mentioned that Ning has successors in HK, I am not sure who are they, but maybe they can help too, if Ning is not available. We just need to find them ;) Regarding your present error: https://gitlab.com/yade- dev/trunk/blob/master/examples/FEMxDEM/biaxialSmooth.py#L10 your command 5. is too short, the first argument is the position of your yade executable. I have written it as '/path/to/yade' If you are not sure where is your yade executabe, you can type command: which yade And then use it in place of '/path/to/yade' in command: ln -s /path/to/yade ../../py/FEMxDEM/yadeimport.py It is because yade must be imported inside a FEMxDEM python script. So this command creates a symbolic link 'ln -s' pointing to original yade exectuable, and this symlink is called yadeimport.py and is placed inside py/FEMxDEM directory (not the examples dir!) So that the FEMxDEM scripts can find it. Regarding yade version, I would suggest the recently released 2019.01a version. But it is very likely that 2018.02b will work too. best regards Janek PS: I will be able to have a closer look on weekend at that. jamespaul said: (by the date of Wed, 13 Mar 2019 07:03:26 -) > Question #679154 on Yade changed: > https://answers.launchpad.net/yade/+question/679154 > > Summary changed to: > run FEMxDEM examples > > Description changed to: > Hi, > > I want to run a FEMxDEM code, > > Learning from 'examples/FEMxDEM/biaxialSmooth.py',i entered the > following 6 commands in the terminal: > > 1 sudo apt install python-escript > 2 cd /usr/share/doc/yade/examples > 3 export PYTHONPATH="/usr/lib/x86_64-linux-gnu/yade/py/yade/FEMxDEM" > 4 export LD_LIBRARY_PATH=/usr/lib/python-escript/lib > 5 ln -s /usr/share/doc/yade/examples/FEMxDEM/prepareRVE.py > > error:ln: invalid option -- '/' > Try 'ln --help' for more information. > > 6 ln -s/usr/share/doc/yade/examples/FEMxDEM/prepareRVE.py > /usr/share/doc/yade/examples/FEMxDEM/biaxialSmooth.py > > error:ln: invalid option -- '/' > Try 'ln --help' for more information. > > >I think the 5th step is wrong,because i haven't 'ln yade-versionNo > yadeimport.py'.How do I generate this file and connect with > biaxialSmooth.py? Via prepareRVE.py? > > >The version of YADE should be at least rev3682 in which Bruno added the > >stringToScene function. > My Yade version: 2018.02b.Is rev3682 a version of yadedaily? > > Thanks in advance, > > James > > -- > You received this question notification because your team yade-users is > an answer contact for Yade. > > ___ > Mailing list: https://launchpad.net/~yade-users > Post to : yade-users@lists.launchpad.net > Unsubscribe : https://launchpad.net/~yade-users > More help : https://help.launchpad.net/ListHelp -- Janek Kozicki http://janek.kozicki.pl/ | You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679154]: run FEMxDEM examples
Question #679154 on Yade changed: https://answers.launchpad.net/yade/+question/679154 Summary changed to: run FEMxDEM examples Description changed to: Hi, I want to run a FEMxDEM code, Learning from 'examples/FEMxDEM/biaxialSmooth.py',i entered the following 6 commands in the terminal: 1 sudo apt install python-escript 2 cd /usr/share/doc/yade/examples 3 export PYTHONPATH="/usr/lib/x86_64-linux-gnu/yade/py/yade/FEMxDEM" 4 export LD_LIBRARY_PATH=/usr/lib/python-escript/lib 5 ln -s /usr/share/doc/yade/examples/FEMxDEM/prepareRVE.py error:ln: invalid option -- '/' Try 'ln --help' for more information. 6 ln -s/usr/share/doc/yade/examples/FEMxDEM/prepareRVE.py /usr/share/doc/yade/examples/FEMxDEM/biaxialSmooth.py error:ln: invalid option -- '/' Try 'ln --help' for more information. >I think the 5th step is wrong,because i haven't 'ln yade-versionNo yadeimport.py'.How do I generate this file and connect with biaxialSmooth.py? Via prepareRVE.py? >The version of YADE should be at least rev3682 in which Bruno added the >stringToScene function. My Yade version: 2018.02b.Is rev3682 a version of yadedaily? Thanks in advance, James -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp