Can this be done with FEMAP API?
Can this be done with FEMAP API?
(OP)
It's been a long time since I've really used FEA software (hence all the questions...), and my only real experience has been with Ansys (10 years ago) and FeMAP/Nastran (currently, but at least 5 years ago prior to this).
I seem to remember Ansys being able to select nodes, elements etc., based on proximity to an already selected node/element.
Is there a way to do a similar process with the FEMAP API?
Here's the logic flow:
1. Select a 2D element (start at a given #).
2. Select all nodes attached to that element.
3. Select all the nodes within .00x distance of those nodes.
4. Select second element with those proximate nodes as corners.
5. Assign first element as top and second element as bottom and build a 3D hex (brick) element.
6. Repeat for the whole model.
I'm just starting to learn the API, and have never really done object oriented programming before, so I'm trying to find tutorials and whatever info I can to help learn. Thanks.
I seem to remember Ansys being able to select nodes, elements etc., based on proximity to an already selected node/element.
Is there a way to do a similar process with the FEMAP API?
Here's the logic flow:
1. Select a 2D element (start at a given #).
2. Select all nodes attached to that element.
3. Select all the nodes within .00x distance of those nodes.
4. Select second element with those proximate nodes as corners.
5. Assign first element as top and second element as bottom and build a 3D hex (brick) element.
6. Repeat for the whole model.
I'm just starting to learn the API, and have never really done object oriented programming before, so I'm trying to find tutorials and whatever info I can to help learn. Thanks.





RE: Can this be done with FEMAP API?
Yes that sounds feasable. You'll be using set objects
Here's one way this could work:
1) select initial set of elements on which your process will be repeated
2) for each el in that initial set, add all nodes in a 2nd set (something like set.addarray(3 or 4,el.vnode) )
3) "Select all the nodes within .00x distance of those nodes" this actually is the tricky part, because there are many ways of doing this programmatically.
3.1) you can do this using node.getclosest method, however if your typical edge size is actually smaller than the distance between your 2 levels of 2D els, this'll probably not work
3.2) you can use set.addcoordinate method. if you use this in an "isotropic" way, i.e. if you search in all directions with the same tolerance, than you moght as well be using getclosest. if you don't search in isotropic way, than your api might not be generic. If I understand what you're doing, you could combine the 2D element normal and use it to search in its direction (perhaps set.addarounvector). But that's a bit more complicated...
Anyway do this for all el nodes
4) now it's just a matter of building the brick properly, which is up to you by defining the nodes in the correct order. DOn't forget to change the el's topology and type otherwise FEMAP won't like it. Some minor glitches are automatically fixed by FEMAP, for ex if your element is twisted FEMAP can auto fix it at creation. el.put method
Hope this helps!
RE: Can this be done with FEMAP API?
RE: Can this be done with FEMAP API?
Since all the elements have a moderate aspect ratio (length and width vs thickness), the search by distance should work (elements are ~.15 inches l x w, and ~.008 thick). Thanks again.