← Back to team overview

yade-users team mailing list archive

Re: [Question #226804]: Applying Forces on Facets with ForceEngine

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hello Eugen,

.norm() is a method to get norm of a vector (i.e. length of the vector). It
has nothing to do with facet normal..

a = Vector3(a,b,c)
a.norm() = sqrt(a.dot(a)) = sqrt(a*a+b*b+c*c)

what is actually what you got

cheers
Jan


2013/4/16 Eugen Kubowsky <question226804@xxxxxxxxxxxxxxxxxxxxx>

> New question #226804 on Yade:
> https://answers.launchpad.net/yade/+question/226804
>
> Hi guys,
> I'm playing around with forces in Yade.
> Suppose that there are two facets (Bodies 18 and 19) that make up a
> rectangular. I use ForceEngines to apply given force on these facets. The
> force vector for facet 18 shows in x-direction, force vector for facet 19
> shows in y-direction - have a look at the ForceEngines:
>         ForceEngine(ids=[18],force=(10,0,0)),
>         ForceEngine(ids=[19],force=(0,10,0))
> You see normal vectors of these two facets here:
>
> Yade []: O.bodies[18].shape.normal
>  ->  []: Vector3(0.92387953251128696,0.38268343236508945,0)
> Yade []: O.bodies[19].shape.normal
>  ->  []: Vector3(0.92387953251128696,0.38268343236508945,-0)
>
> The problem is, that I don't understand, why calling forces.norm() gives
> 10 for both facets. In my eyes the projected force on the normal vector of
> facet 18 ( I suppose that this is done by O.forces.f(18).norm()) should be
> higher than the value for facet 19.
> here are the code fragments:
>
> Yade []: O.forces.f(18)
>  ->  []: Vector3(10,0,0)
> Yade []: O.forces.f(18).norm()
>  ->  []: 10.0
>
> Yade []: O.forces.f(19)
>  ->  []: Vector3(0,10,0)
> Yade []: O.forces.f(19).norm()
>  ->  []: 10.0
>
> On the other side if I apply a force that in x and y direction using e.g.
> ForceEngine(ids=[19],force=(15,10,0)) I'll get:
> Yade []: O.forces.f(19)
>  ->  []: Vector3(15,10,0)
> Yade []: O.forces.f(19).norm()
>  ->  []: 18.027756377319946
>  which is quite the result I expected.
>
> --
> 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     : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.