Exemplo n.º 1
0
    l = x[-1] - x[0]
    R = 10.
    phi = x / l * pi
    r = R + y
    x,y = - r * cos( phi ), r * sin( phi ) 
    return c_[ x,y ]

# Discretization
domain = FEGrid( coord_max = (length,height,0.), 
                       shape   = (10,5),
#                       shape   = (5,2),
                       fets_eval = fets_eval,
                       geo_transform = arch_2d )

#
right_dofs, right_dof_r = domain.get_right_dofs()
right_dof = right_dofs[0,0]
print 'right_dof',right_dof                         
tstepper = TS( sdomain = domain,
     bcond_list =  [ BCDofGroup( var='u', value = 0., dims = [0,1],
                              get_dof_method = domain.get_left_dofs ),
                     BCDofGroup( var='u', value = 0.01125, dims = [0],
                              get_dof_method = domain.get_right_dofs ) ],
     rtrace_list =  [
                 RTraceGraph(name = 'Fi,right over u_right (iteration)' ,
                             var_y = 'F_int', idx_y = right_dof,
                             var_x = 'U_k', idx_x = right_dof,
                             record_on = 'update'),
              RTraceDomainListField(name = 'Displacement' ,
              var = 'u', idx = 0,
              record_on = 'update',
Exemplo n.º 2
0
# OSOLET: Use individual domains instead for notched specimen. 
# For a notched beam deactivate the center element at the bottom of the beam:
# domain.deactivate( (shape[0]/2,0) )
# Note: For the center element an odd numer is necessary for n_elem[0].
#       For the center loading at top an even numkber is necessary.
       

#-------------------------
# ts: 
#-------------------------

#right_dofs = domain[0, 0, 0, 0].dofs[0,0,0]
#print 'right_dofs', right_dofs


right_dofs, right_dofs_points = domain.get_right_dofs()
print 'right_dofs', right_dofs

right_bottom_dofs, right_bottom_dofs_points = domain.get_bottom_right_dofs()
print 'right_bottom_dofs', right_bottom_dofs

tstepper = TS( dof_resultants = True,
               sdomain = domain,
     bcond_list =  [ # loading at the right hand side: 
                     BCDofGroup( var='u', value = 1.0, dims = [0],
                              get_dof_method = domain.get_right_dofs ),

                     # supports at the left hand side:
                     BCDofGroup( var='u', value = 0., dims = [0],
                              get_dof_method = domain.get_left_dofs ),
                     BCDofGroup( var='u', value = 0., dims = [0,1],