[problem] Loop into pold block to excite multiple elements 回答済み

Hi,

 

I`m trying to apply the same load function to 3 consecutive elements. With the code below I can produce the expected result. 

 

plod

pdef ptx func

symb element = 1

symb element2 = 2

symb element3 = 3

 

matr dir1 etx$element out

symb iend = 2 * $element + 1

symb ibeg = $iend - 1

sdef ptx dir1 $i$ibeg $i$iend $j3 $j3

matr dir2 etx$element2 out

symb iend = 2 * $element2 + 1

symb ibeg = $iend - 1

sdef ptx dir2 $i$ibeg $i$iend $j3 $j3

matr dir3 etx$element3 out

symb iend = 2 * $element3 + 1

symb ibeg = $iend - 1

sdef ptx dir3 $i$ibeg $i$iend $j3 $j3

end

 

 

 

I`ve tried to write it in a loop as follows:

 

do loopI I 1 $multielements 1

symb element = $I 

matr dir$element etx$element out

symb iend = 2 * $element + 1

symb ibeg = $iend - 1

sdef ptx dir$element $i$ibeg $i$iend $j3 $j3

end$ loopI

end

 

And the simulation shows an excitation along the 3 elements instead of the 3 individual elements:

I think the  “dir$element” wasn`t creating a new name for the direction but I`m not sure. Can someone help me to understand what is wrong if my loop ?

 

Best regards,

Ray

1件のコメント

  • 正式なコメント

    Hi Ray,

     

    Multiple use of sdef under one plod command will add all of the nodes in each sdef command to the same load. If you add plod into your loop so it is rewritten for each element it should work.

     

    Best Regards,

    Chloe.

    コメントアクション パーマリンク

サインインしてコメントを残してください。

お探しのものを見つけられませんでしたか?

新規投稿