Ejemplo n.º 1
0
def geometry():
    from pyformex.examples.WireStent import DoubleHelixStent
    global wire_diameter

    # create a Doublehelix stent with fixed geometry
    stent_diameter = 10.
    stent_length = 150.
    wire_diameter = 0.2
    number_wires = 6
    pitch_angle = 30.

    # during testing
    stent_length = 10.
    stent = DoubleHelixStent(stent_diameter,
                             stent_length,
                             wire_diameter,
                             number_wires,
                             pitch_angle,
                             nb=1).getFormex()
    return stent
############################################
# Create geometry
from pyformex.examples.WireStent import DoubleHelixStent
import datetime

# create a Doublehelix stent
stent_diameter = 10.
stent_length = 150.
wire_diameter = 0.2
number_wires = 6
pitch_angle = 30.

# during testing
stent_length = 10.
stent = DoubleHelixStent(stent_diameter,stent_length,
                         wire_diameter,number_wires,pitch_angle,nb=1).getFormex()

if pf.options.gui:
    # draw it
    reset()
    clear()
    draw(stent,view='iso')


    
############################################
# Perform Analysis

# Create output file
if not checkWorkdir():
    print "Could not open a file for writing. I have to stop here"
############################################
# Create geometry
from pyformex.examples.WireStent import DoubleHelixStent
import datetime

# create a Doublehelix stent
stent_diameter = 10.
stent_length = 150.
wire_diameter = 0.2
number_wires = 6
pitch_angle = 30.

# during testing
stent_length = 10.
stent = DoubleHelixStent(stent_diameter,stent_length,
                         wire_diameter,number_wires,pitch_angle,nb=1).all()

if GD.options.gui:
    # draw it
    reset()
    clear()
    draw(stent,view='iso')


    
############################################
# Perform Analysis

nel = stent.nelems()
print "Number of elements: %s" % nel
print "Original number of nodes: %s" % stent.nnodes()