loop over element nodes with conditions
Posted: Sun Jun 07, 2015 4:35 pm
Hello,
I have a loop over the elements to get nodes conditions. For example, I have a face condition over a line and I get it from the .bas file with this:
Now, I would like to get the single information on the nodes that have that condition, in order to have a non constant force field (depending for example on the position).
Can I write a loop over *GlobalNodes (or *localnodes) and recall them in the loop as in the following?
Also, is the use of NodesCoord in this case correct with globalnode or localnode? And how can I extract the counter in the loop?
Thank you very much!
I have a loop over the elements to get nodes conditions. For example, I have a face condition over a line and I get it from the .bas file with this:
Code: Select all
*Set Cond Face-Load *elems *CanRepeat
*loop elems *OnlyInCond
ELEM=*elemsnum() NODES=*globalnodes
*if(QUADRAT==1)
GLOBAL: FX=*cond(2) FY=*cond(3) /
FX=*cond(2) FY=*cond(3) /
FX=*cond(2) FY=*cond(3)
*else
GLOBAL: FX=*cond(2) FY=*cond(3) /
FX=*cond(2) FY=*cond(3)
*endif
*end
Can I write a loop over *GlobalNodes (or *localnodes) and recall them in the loop as in the following?
Code: Select all
*loop globalnodes
FX=*Operation(cond(2)*NodesCoord(globalnode,1)) FY=*Operation(cond(3)*NodesCoord(globalnode,2))
*end globalnodes
Thank you very much!