Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to convert 4-node shell to 8-node shells

Status
Not open for further replies.

OnlineFEASolver

Mechanical
Apr 9, 2007
32
I have written a brute force script to convert S4 elements
in an Abaqus input deck to S8 ( For CalculiX to use ). The
problem is my script takes upto 20 minutes for a simple
20,000 shell element model.
My pseudo-code is:

First read nodal coordinates for all shells

Next automatically create a midside node for each element

Then for each element loop through all the elements to see
if it shares any closely spaced nodes ( based on distance
calculation between its nodes and every other node in the
model ).
So this last loop takes forever. I wonder if there is more
efficient way to do what I need?

Principal - General FEA Consulting Services
 
Replies continue below

Recommended for you

You could cut down the number of steps by only looking at the distance from other mid-side nodes, rather than every node in the model. It might have been easier to either create the original model using mid-side nodes or used the pre-processor of Calculix, which is based upon an old pre-processor called FAM, I believe.

corus
 
i don't know Abaqus, but most codes will add the mid-side nodes for you. maybe you need to specify the node number, and the program will figure out its position (since it knows the two corner node positions).

I'd've thought that most "front ends" would do this conversion for you. Femap will convert 4-noded quads to 8-noded with a few clicks of a mouse.
 
I don't believe CalculiX is able to convert S4 to S8 or
even read in S4. Is there any other open source
pre-processor you would recommend that can read in an
Abaqus formatted input deck?




Principal - General FEA Consulting Services
 
Did you consider using a compiled programming language ?

If I had to write a similar code I would rely on using the connectivy information.

For example:

#1. iterate over all elements

let's say you have elem #j (type S4) with the connectivity [10 , 15 , 20, 6 ] (global node numbers with known coordinates).

all you have to do is to insert 4 new nodes at the end of existing connectivity list, let's say n1, n2, n3 , n4 such that n1 is between node 10 and 15 , n2 is between node 15 and 20, n3 between node 20 and 6 and n4 between 6 and 10.

Assign temporary global node labels for all the new nodes (n1,n2,n3,n4) and store them in a separate list together with the label of the element(say list K) .

#2. iterate over the list of the newly created nodes (list K) and check and replace duplicate nodes (within a tolerance). As you eliminate the duplicate nodes also modify the connectivity of the elements containing the duplicate nodes.

Good luck!




 
Do you only want to merge mid side nodes to mid side nodes?
In that case one obvious simplification would be to only consider connected elements in the original deck. That is make a first pass to define the connectivity of each element and then just loop through all the mid side nodes of each of those elements.

Or do you just want to merge all coincident nodes? That's always going to be a bit tedious, but a basic loop of 20000 iterations looking at all the subsequent

I'm a bit surprised a brute force approach takes that long, on such a small model. Are you writing stuff to disk all the time?







Cheers

Greg Locock

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
I think looping through just those elements that are
connected would work. But how do I go about creating my
element connectivity array from an Abaqus input deck? That
may be equally time consuming as I would have
to check each elements nodes with every other element in
the model, no?

Principal - General FEA Consulting Services
 
The maths to build a connectivity array is not very complex and the time to execute it is very rapid as all the work can be done using integer routines. Once the connectivity has been established, inserting the mid-side nodes is relatively trivial.

On the other hand the routine written by the OP involves a lot of very time consuming real (non-integer) operations, and hence the long run times.
 
Yes, having had a think, I suspect that writing the connectivity may be more time consuming than the brute force approach, which incidentally took about 10 minutes in interpreted QBASIC. I think both the coincident node check via brute force, and writing the connectivity, are n^2 problems.






Cheers

Greg Locock

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
following on from greg's suggestions ...

it's easy to add a mid-side to every element side (without worrying about connectivity right now).

it's also pretty easy to interrogate these for co-incident nodes and then renumbering the element connectivity to remove the coincident nodes (if N1234 and N2345 are co-incident, then replace N2345 with N1234 in the element definitions and, maybe, delete N2345 form the node listing). This step is greatly simplified if you know that there can only be two co-incident nodes, because of connectivity of the model there are never more than two element sharing a side.

mind you this will mess with the element bandwidth, if Abaqus doesn't renumber internally.
 
"But how do I go about creating my
element connectivity array from an Abaqus input deck?"
For each element
For each node
search all other elements for a match
next
next




Cheers

Greg Locock

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
Thanks for the replies. I figured out a solution which now
runs in a few seconds:

When I loop through elements to create the mid-sized the
node I store the edge id associated with that node. So
before creating a new node , I use Perl's 'defined'
function to see if that edge id is already defined.
If it is then the mid-sized node is the node associated
with that edge id.

The edge id I create on the fly by concatenating the two
nodes that define the edge into a string like node1-node2 .
If node 1 is greater than node-2 I reverse the order so
that the edge id is the same for any order of two nodes..

Principal - General FEA Consulting Services
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor