← Back to team overview

yade-users team mailing list archive

Re: Energy dissipation + radius of fictious "box" sphere is now =r (not 2*r)

 

>         e=O.engines[x]//or using labels
>         e.elasticEnergy()
> 
> Using InteractionDispatchers the right syntax is 
> O.engines[x].lawDispatcher.functors[0].elasticEnergy()
> (*for people interested in)
Hi Chia, sorry, I should've replied. It will be easier with labels:

O.engines=[
	...
	InteractionDispatchers([Ig2_..()],[Ip2..()],
		[Law2_...(...,label='someNameYouChoose')]
	)
]

# label creates variable of that name, works for both functors and engines

someNameYouChoose.elasticEnergy()

In facet they were created for cases like this (see e.g.
examples/concrete/uniax.py where it is used for setting the interaction
radius).

Cheers, Vaclav

	





References