← Back to team overview

yade-users team mailing list archive

Re: [Question #285260]: contact stiffness change y time

 

Question #285260 on Yade changed:
https://answers.launchpad.net/yade/+question/285260

Jan Stránský proposed the following answer:
Hi Behzad,

in Ip2 functor, in function Ip2::go, you alwas have something like

interaction->phys = shared_ptr<SomePhys>(new SomePhys());

At this point, you have access to O.time, so you can easily set (SomePhys
class has to have timeOfCreation attribute)

interaction->phys->timeOfCreation = O.time; // O.time will not work, but
some c++ equivalent

In Law2, you can again access O.time and phys.timeOfCreation, so you can do
whatever with these two values..

Is this what you mean (from your description I am still not sure :-)?

cheers
Jan


2016-02-16 16:42 GMT+01:00 behzad <question285260@xxxxxxxxxxxxxxxxxxxxx>:

> Question #285260 on Yade changed:
> https://answers.launchpad.net/yade/+question/285260
>
> behzad posted a new comment:
> Jan,
>
>
> time of the contact = contactTime = duration of contact.
>
> let's say O.time= t1 when the contact is created. Then what I mean is to
> implement the following equation :
>
> phys->kn= kn1*deltaT
>
> There is condition, if the bodies are approaching each other:
>
> deltaT=t1-O.time
>
> I know deltaT becomes negative, the main equation will be more complex,
> this is only an example.
>
>
> and if the bodies are getting away each other:
>
> deltaT=O.time-t1
>
>
> Regards,
> Behzad
>
> --
> 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@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.