[Yade-users] [Question #691048]: nameerror
New question #691048 on Yade: https://answers.launchpad.net/yade/+question/691048 Hello,all I am using Ubuntu 16.04LTS, and Yade 20200519-3889~fb69be8~xenial1 using python version: 3.5.2. When I execute the following code, it will continuously prompt a same error. Thank you very much for your help. - utils.readParamsFromTable(damping=.2) from yade.params import table NewtonIntegrator(damping=table.damping), O.engines+=[PyRunner(iterPeriod=1000,command='checkUnbalancedForce()')] def checkUnbalancedForce(): if utils.unbalancedForce<0.05: utils.saveDataTxt(O.tags['d.id']+'.data.bz2') import sys sys.exit(0) O.run() - NameError Traceback(most recent call last) /usr/bin/yadedaily in () NameError: name'checkUnbalancedForce' is not defined -- NameError Traceback(most recent call last) /usr/bin/yadedaily in () NameError: name'checkUnbalancedForce' is not defined -- NameError Traceback(most recent call last) /usr/bin/yadedaily in () NameError: name'checkUnbalancedForce' is not 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 #690925]: corrupted double-linked list
Question #690925 on Yade changed: https://answers.launchpad.net/yade/+question/690925 Status: Answered => Open mrhappy is still having a problem: Thank you all for your suggestions. My computer specs are as follows: Architecture:x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 16 On-line CPU(s) list: 0-15 Thread(s) per core: 2 Core(s) per socket: 8 Socket(s): 1 NUMA node(s):1 Vendor ID: AuthenticAMD CPU family: 23 Model: 113 Model name: AMD Ryzen 7 3800X 8-Core Processor Stepping:0 CPU MHz: 2195.457 CPU max MHz: 3900. CPU min MHz: 2200. BogoMIPS:7785.27 Virtualization: AMD-V L1d cache: 32K L1i cache: 32K L2 cache:512K L3 cache:16384K NUMA node0 CPU(s): 0-15 RAM32897728 kB I installed yade-2020.01a via the following commands: GO TO BUILD DIRECTORY cmake -DCMAKE_INSTALL_PREFIX=/home/nabid/Documents/myYade/install /home/nabid/Documents/myYade/trunk cmake -DCMAKE_INSTALL_PREFIX=../install ../trunk cmake -DENABLE_USEFUL_ERRORS=OFF ../trunk cmake -ENABLE_USEFUL_ERRORS=OFF ../trunk make make install make check I run the script via the command line ./yade-2020.01a Model20.py and then I press play. The output of catchsegv is: corrupted double-linked list Aborted (core dumped) Thank you for your help -- 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 #691026]: Loading the stored the position of plank, but it wrong
Question #691026 on Yade changed: https://answers.launchpad.net/yade/+question/691026 yang yi posted a new comment: To Jan Stránský (honzik) : Thank you very much. I attach the script as follow. There are two scripts: (1) the simulation to produce the position of 5 windows (2) display the process. script (1) Simulation script: #!/usr/bin/env python # encoding: utf-8 from __future__ import print_function import sys sys.path.append('~/PycharmProjects/Yade20191229/') # from yadeImport import * import math import numpy as np import os from yade.gridpfacet import * o = Omega() o.dt = 1e-12 outputDir = 'Output' checkCounter = 0 numWinds = 5 WinAction = np.zeros((5,1), dtype=int) ## === Environment ## widthSpace = 6.8 ## width is the distance from the front coal wall to the back widthHydr = 1.5 lengthSpace = widthHydr * numWinds ## length is the width of 5 windows highHydr = 3.8 CheckThick = 1 highDummy = 3 colorWind = (0, 1, 1) angleShield = 50 * 3.1415926 / 180 angleSwingPositive = 15 * 3.1415926 / 180 angleSwingNegtive = 40 * 3.1415926 / 180 lengthShield = 3 lengthTail = 2 windUpperBoundary = 0.9 windLowerBoundary = 0.5019 stateUpperBoundary = highHydr stateLowerBoundary = windLowerBoundary positionWind = [] windPosition = np.zeros(5) shield_y_0 = lengthTail * math.cos(angleShield - angleSwingPositive) shield_y_1 = shield_y_0 + lengthShield * math.cos(angleShield) shield_z_0 = highHydr - lengthShield * math.sin(angleShield) shield_z_1 = highHydr # wind_y_0 = lengthTail * (math.cos(angleShield - angleSwingPositive) - math.cos(angleShield)) wind_y_1 = shield_y_0 wind_z_0 = highHydr - (lengthShield + lengthTail) * math.sin(angleShield) wind_z_1 = highHydr - lengthShield * math.sin(angleShield) HyMat = O.materials.append(FrictMat(frictionAngle=0.1, density=3000, young=2e9)) myGraviaty = -1200 def HydraulicSupport(): for i in range(0, numWinds): temp = [ Vector3(widthHydr * i, wind_y_0, wind_z_0), Vector3(widthHydr * (i + 1), wind_y_0, wind_z_0), Vector3(widthHydr * (i + 1), wind_y_1, wind_z_1), Vector3(widthHydr * i, wind_y_1, wind_z_1) ] positionWind.append(temp) Wind1 = pack.sweptPolylines2gtsSurface([positionWind[0]], capStart=True, capEnd=True) Wind2 = pack.sweptPolylines2gtsSurface([positionWind[1]], capStart=True, capEnd=True) Wind3 = pack.sweptPolylines2gtsSurface([positionWind[2]], capStart=True, capEnd=True) Wind4 = pack.sweptPolylines2gtsSurface([positionWind[3]], capStart=True, capEnd=True) Wind5 = pack.sweptPolylines2gtsSurface([positionWind[4]], capStart=True, capEnd=True) IDWind1 = O.bodies.append(pack.gtsSurface2Facets(Wind1, color=colorWind)) IDWind2 = O.bodies.append(pack.gtsSurface2Facets(Wind2, color=colorWind)) IDWind3 = O.bodies.append(pack.gtsSurface2Facets(Wind3, color=colorWind)) IDWind4 = O.bodies.append(pack.gtsSurface2Facets(Wind4, color=colorWind)) IDWind5 = O.bodies.append(pack.gtsSurface2Facets(Wind5, color=colorWind)) IDWind = [IDWind1, IDWind2, IDWind3, IDWind4, IDWind5] WindList = IDWind1 + IDWind2 + IDWind3 + IDWind4 + IDWind5 return IDWind, WindList ##---## def WindowsAction(IDWind): global WinAction, windPosition, saveCounter, nEpisode RotationW = [RotationW1, RotationW2, RotationW3, RotationW4, RotationW5] for nW in range(0, numWinds): RotationW[nW].angularVelocity = -0.01 SaveProcessLocation(nEpisode, saveCounter) saveCounter += 1 def SaveProcessLocation(Episode, iter): outputDir = "Output/location/" if not os.path.exists(outputDir): os.makedirs(outputDir) Position = [] for i in WindList: print(o.bodies[i].state.pos) temp = [i, o.bodies[i].state.pos] Position.append(temp) location_name = outputDir + 'wind_' + str(Episode)+ '_' + str(iter) np.save(location_name, Position) def WindowsControl(): global saveCounter,nEpisode nEpisode += 1 saveCounter = 0 nEpisode = 0 saveCounter = 0 IDWind, WindList = HydraulicSupport() O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Wall_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom(), Ig2_Wall_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys(), Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(xSectionWeibullScaleParameter=0.5, xSectionWeibullShapeParameter=0.5, weibullCutOffMin=0, weibullCutOffMax=10)], [Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(recordCracks=False, recordMoments=False,label='interactionLaw'), Law2_ScGeom_FrictPhys_CundallStrack()] ), GlobalStiffnessTimeStepper(), NewtonIntegrator(gravity=(0, 0, myGraviaty), damping=0.5, label='down'), RotationEngine(rotationAxis=
Re: [Yade-users] [Question #690803]: bndCondIsPressure
Question #690803 on Yade changed: https://answers.launchpad.net/yade/+question/690803 Status: Answered => Solved Guilherme das Neves Seguro confirmed that the question is solved: Thanks Luc Scholtès, 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 #691021]: en averaging for Law2_ScGeom_ViscElPhys_Basic, bug or incorrect documentation?
Question #691021 on Yade changed: https://answers.launchpad.net/yade/+question/691021 Bruno Chareyre proposed the following answer: I think the equation therein have been modified a lot since Serguei Dorofenko, it is just not reflected in file authors. It is sometimes difficult to answer "why is it averaged this way"? "how to average" can be simply solutionless, then we pick a formula... If there is rational for another averaging that's good to hear. B -- 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 #683708]: Elastic potential energy of polyhedra
Question #683708 on Yade changed: https://answers.launchpad.net/yade/+question/683708 Status: Open => Expired Launchpad Janitor expired the question: This question was expired because it remained in the 'Open' state without activity for the last 15 days. -- 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 #691021]: en averaging for Law2_ScGeom_ViscElPhys_Basic, bug or incorrect documentation?
Question #691021 on Yade changed: https://answers.launchpad.net/yade/+question/691021 Status: Open => Answered Robert Caulk proposed the following answer: > It looks to me like the code actually does en = (en1+en2)/2 >For example, if I test two materials... Your empirical method seems to be confirmed by the source code ;) [1] >The behavior in the documentation does not make physical sense to me. >I looked around to see if I could find any articles of someone suggesting one >averaging method or the other, but I could not find any. I think I agree with your rationale but as I mentioned before, I am not up to date on that literature. The source code does reference an article "Pournin2001"[2]. However, I skimmed that article and it only defines kn, cn, kt, ct, while it doesn't seem to explicitly discuss the en for a contact (or maybe you have a bit more time to read deeper into it?). Another, option is to email directly the original author, Sergei Dorofeenko , to confirm the suspected documentation mistake. [1]https://gitlab.com/yade- dev/trunk/-/blob/master/pkg/dem/ViscoelasticPM.cpp#L219 [2]L. Pournin, Th. M. Liebling, A. Mocellin (2001), Molecular-dynamics force models for better control of energy dissipation in numerical simulations of dense granular media. Phys. Rev. E (65), pages 011302. DOI 10.1103/PhysRevE.65.011302 -- 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 #691026]: Loading the stored the position of plank, but it wrong
Question #691026 on Yade changed: https://answers.launchpad.net/yade/+question/691026 Status: Open => Answered Jan Stránský proposed the following answer: Hello, please try to provide a MWE [1], where: - M stands for minimal. Do you have the same problem with one plank? then please provide a script with just one plank.. - W stands for working. I have tried your code with IndentationError: unexpected indent on line 8 > So I storage the position of them, and hope display the rotation process of > them, but the reload location is wrong. > So if reload the location ... the rotation angle does not look right. store also the rotation (I have not found it in the script) > the rotation angle does not look right. as suggested before, use a numerical evidence rather than visual evidence (e.g. print rotation / vertices before loading and after loading) cheers Jan [1] https://www.yade-dem.org/wiki/Howtoask -- 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