How to apply boundary of seismic acceleration

Asked by Henry

Hi, All,
   I want to use the Yade to simulate the failure process of the slope under earthquake conditions. However, I can't find the function for the application of the seismic acceleration?
 Is there anyone who has used this function? Thanks a lot!
  Henry!

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello Henry,

I personally don't know about any implemented function for your situation.
However, you can write your own python code :-) something like:

class AccelerogramApplier:
  def __init__(self,bodies,accelerogram):
     self.accelerogram = accelerogram
     self.bodies = bodies
  def getAccel(self):

for t,a in self.acceleration:
        if O.time > t: break

  def applyAccel(self):
     a = self.getAceleration()
     for b in self.bodies:
        O.forces.addF(b.id,a*b.state.mass)
accelerogram = [(0.0,0.0),(0.4,2.0),(0.8,3.2),(1.2,0.9),(1.6,-0.4),...] #
time-acceleration pairs, the format may be any other , possibly loaded from
file

2013/6/5 Henry <email address hidden>

> New question #230216 on Yade:
> https://answers.launchpad.net/yade/+question/230216
>
> Hi, All,
> I want to use the Yade to simulate the failure process of the slope
> under earthquake conditions. However, I can't find the function for the
> application of the seismic acceleration?
> Is there anyone who has used this function? Thanks a lot!
> Henry!
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Jan Stránský (honzik) said :
#2

Hello Henry,

I personally don't know about any implemented function for your situation.
However, you can write your own python code :-) something like:

class AccelerogramApplier:
  def __init__(self,bodies,accelerogram):
     self.accelerogram = accelerogram
     self.bodies = bodies
     for b in self.bodies:
       b.state.fixedDOFs = 'xyzXYZ' # fix all the bodies
  def getDeltaVel(self): # computes current acceleration and computes
velocity increment
    ac = self.accelerogam
    assert O.time < ac[-1][0]
    for i,(t,a) in enumerate(ac):
      if O.time > t: break
    t0,t1 = ac[i][0],ac[i+1][0]
    a0,a1 = ax[i][1],ac[i+1][1]
    a = a0 + (O.time-t0)*(a1-a0)/(t0-t1)
    dv = a*O.dt
    return dv
  def applyAccel(self):
     dv = self.getDeltaVel()
     for b in self.bodies:
        b.state.vel += dv # add velocity increment to bodies

accelerogram = [(0.0,0.0),(0.4,2.0),(0.8,3.2),(1.2,0.9),(1.6,-0.4),...] #
time-acceleration pairs, the format may be any other, possibly loaded from
file
bodiesToAllpyAccel = [...] # somelsit of bodies for acceleration to be
applied
aaplier
= AccelerogramApplier(accelerogram,bodiesToAllpyAccelbodiesToAllpyAccel)

O.engines = [
  ...
  PyRunner(iterperiod=1,command="applier.applyAccel()"), # in this quick
answer, I think this PyRunner should be before NewtonIntegrator, but I
don't have enough time to think about it carefully :-)
  ...
  NewtonIntegrator(...),
  ...
]

I don't know your problem, so I can't tell if this apprach is sufficient
for you or not, but at least it can give you some hints :-) If this type of
code is what you want and your python code works fine, you/we can
reimplement it as C++ engine.
cheers
Jan

PS: I am sorry for my previous (incomplete) answer, it was sent by mistake,
just ignore it

2013/6/5 Jan Stránský <email address hidden>

> Hello Henry,
>
> I personally don't know about any implemented function for your situation.
> However, you can write your own python code :-) something like:
>
> class AccelerogramApplier:
> def __init__(self,bodies,accelerogram):
> self.accelerogram = accelerogram
> self.bodies = bodies
> def getAccel(self):
>
> for t,a in self.acceleration:
> if O.time > t: break
>
> def applyAccel(self):
> a = self.getAceleration()
> for b in self.bodies:
> O.forces.addF(b.id,a*b.state.mass)
> accelerogram = [(0.0,0.0),(0.4,2.0),(0.8,3.2),(1.2,0.9),(1.6,-0.4),...] #
> time-acceleration pairs, the format may be any other , possibly loaded from
> file
>
>
>
> 2013/6/5 Henry <email address hidden>
>
>> New question #230216 on Yade:
>> https://answers.launchpad.net/yade/+question/230216
>>
>> Hi, All,
>> I want to use the Yade to simulate the failure process of the slope
>> under earthquake conditions. However, I can't find the function for the
>> application of the seismic acceleration?
>> Is there anyone who has used this function? Thanks a lot!
>> Henry!
>>
>> --
>> You received this question notification because you are a member of
>> yade-users, which is an answer contact for Yade.
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~yade-users
>> Post to : <email address hidden>
>> Unsubscribe : https://launchpad.net/~yade-users
>> More help : https://help.launchpad.net/ListHelp
>>
>
>

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#3

>application of the seismic acceleration?

Would playing with gravity (x-component) be enough?
The problem statement is a bit short, but I can at least confirm Jan's answer: there is no predefined function for this specific operation.

Revision history for this message
Henry (wenjiexu) said :
#4

Many thanks to Jan and Bruno.
I want to simulate the failure process of a slope under the influence of the earthquake.
And I want to apply the seismic acceleration on the sphere at the boundary of the model.
Thanks a lot!

Can you help with this problem?

Provide an answer of your own, or ask Henry for more information if necessary.

To post a message you must log in.