Beispiel #1
0
    def test_uniform_loading(self):

        support_slices = [
            [
                (0, slice(None), slice(None), 0, slice(None),
                 slice(None)),  # yz plane  0
                (0, 0, slice(None), 0, 0, slice(None)),  #  z-axis   1
                (0, 0, 0, 0, 0, 0)  #  origin   2
            ],
            [
                (0, 0, 0, 0, 0, 0),  #  origin   0
                (slice(None), 0, slice(None), slice(None), 0,
                 slice(None)),  # xz plane  1
                (slice(None), 0, 0, slice(None), 0, 0),  #  x-axis   2
            ],
            [
                (0, slice(None), 0, 0, slice(None), 0),  #  y-axis   0
                (0, 0, 0, 0, 0, 0),  #  origin   1
                (slice(None), slice(None), 0, slice(None), slice(None),
                 0),  # xz plane  2
            ],
        ]
        support_dirs = [[0], [1], [2]]

        loading_slices = [
            (-1, slice(None), slice(None), -1, slice(None),
             slice(None)),  # loading in x dir
            (slice(None), -1, slice(None), slice(None), -1,
             slice(None)),  # loading in y dir
            (slice(None), slice(None), -1, slice(None), slice(None), -1
             )  # loading in z dir
        ]

        load_dirs = [0, 1, 2]
        load = 0.01
        vars = ['eps_app']
        for support_slice, loading_slice in zip(support_slices,
                                                loading_slices):

            for load_dir in load_dirs:
                tl, u3D, fields3D, integs, g = simgrid(
                    self.fets_eval3D, (3, 3, 3), (1, 1, 1), support_slice,
                    support_dirs, loading_slice, load_dir, load, 1, vars)

                tl, u2D5, fields2D5, integs, g = simgrid(
                    self.fets_eval2D5, (3, 3, 3), (1, 1, 1), support_slice,
                    support_dirs, loading_slice, load_dir, load, 1, vars)

                for u1_, u2_ in zip(u3D.flatten(), u2D5.flatten()):
                    self.assertAlmostEqual(u1_, u2_)
Beispiel #2
0
    def assert_2D_symmetry_clamped_cube(self, load_dirs, load = 0.001 ):
        '''Assert that the symmetry is given for the applied loadings.
        '''

        self.fets_eval  = FETS2D58H(mats_eval  = self.mats_eval)

        support_slices = [
                      [ 
                       (0   ,slice(None),slice(None),0   ,slice(None),slice(None)), #                             yz plane  0
                      ],
                      [ 
                       (slice(None),0   ,slice(None),slice(None),0   ,slice(None)), # xz plane  1
                      ],
                      ]
        support_dirs = [[0,1,2]]
        
        loading_slices = [
                      (-1, slice(None),slice(None),-1 ,slice(None),slice(None)),  # loading in x dir
                      (slice(None),-1 ,slice(None),slice(None),-1 ,slice(None)),  # loading in y dir
                        ]

        vars = [] 

        r = [ simgrid( self.fets_eval,  (1,1,1), (1,1,1),
                         support_slice, support_dirs,
                         loading_slice, load_dir, 
                         load, 1, vars )
                for support_slice, loading_slice, load_dir in zip( support_slices,
                                                                   loading_slices, 
                                                                   load_dirs ) ]

        u = array( [ r[i][1][-3:] for i in range(2) ] )
        for idx1, idx2 in self.sym_assert_pattern: 
            self.assertAlmostEqual( u[idx1], u[idx2] )
    def _get__results_2d( self ):

        fets_eval = FETS2Drotsym( prototype_fets = FETS2D4Q(),
                                  mats_eval  = self.mats )        

        support_slice = [
                          (0   ,slice(None),0   ,slice(None)), #  y-axis   1
                          (0   ,     0,    0   ,0   )  #  origin   2
                          ]
        support_dirs = [[0],[1]]
    
        loading_slice = (-1  ,slice(None),-1  ,slice(None))  # loading in x dir

        # Get the radius for a circle with the surface equal to 1
        # A = Pi * r^2 --> r = sqrt( A / Pi )
        R = sqrt( 1. / Pi )
        tl, u1, fields, integs, xydata = simgrid( fets_eval, (1,R), (1,1), 
                              support_slice, support_dirs,
                              loading_slice, 
                              0, 
                              self.u_max, 
                              self.n_steps,
                              vars  = ['fracture_energy'],
                              ivars = ['fracture_energy'] )

        return integs[0][0], xydata        
Beispiel #4
0
    def assert_2D_symmetry_clamped_cube(self, load_dirs, load = 0.001 ):
        '''Assert that the symmetry is given for the applied loadings.
        '''

        self.fets_eval  = FETS2D58H(mats_eval  = self.mats_eval)

        support_slices = [
                      [ 
                       (0   ,slice(None),slice(None),0   ,slice(None),slice(None)), #                             yz plane  0
                      ],
                      [ 
                       (slice(None),0   ,slice(None),slice(None),0   ,slice(None)), # xz plane  1
                      ],
                      ]
        support_dirs = [[0,1,2]]
        
        loading_slices = [
                      (-1, slice(None),slice(None),-1 ,slice(None),slice(None)),  # loading in x dir
                      (slice(None),-1 ,slice(None),slice(None),-1 ,slice(None)),  # loading in y dir
                        ]

        vars = [] 

        r = [ simgrid( self.fets_eval,  (1,1,1), (1,1,1),
                         support_slice, support_dirs,
                         loading_slice, load_dir, 
                         load, 1, vars )
                for support_slice, loading_slice, load_dir in zip( support_slices,
                                                                   loading_slices, 
                                                                   load_dirs ) ]

        u = array( [ r[i][1][-3:] for i in range(2) ] )
        for idx1, idx2 in self.sym_assert_pattern: 
            self.assertAlmostEqual( u[idx1], u[idx2] )
Beispiel #5
0
    def test_uniform_loading( self ):

        support_slices = [
                          [ ( 0   , slice( None ), slice( None ), 0   , slice( None ), slice( None ) ), # yz plane  0
                            ( 0   , 0   , slice( None ), 0   , 0   , slice( None ) ), #  z-axis   1
                            ( 0   , 0   , 0, 0   , 0   , 0 )  #  origin   2
                          ],
                          [
                            ( 0   , 0   , 0   , 0   , 0   , 0 ), #  origin   0
                            ( slice( None ), 0   , slice( None ), slice( None ), 0   , slice( None ) ), # xz plane  1
                            ( slice( None ), 0   , 0   , slice( None ), 0   , 0 ), #  x-axis   2
                          ],
                          [
                            ( 0   , slice( None ), 0   , 0   , slice( None ), 0 ), #  y-axis   0
                            ( 0   , 0   , 0   , 0   , 0   , 0 ), #  origin   1
                            ( slice( None ), slice( None ), 0   , slice( None ), slice( None ), 0 ), # xz plane  2
                          ],
                          ]
        support_dirs = [[0], [1], [2]]

        loading_slices = [
                          ( -1  , slice( None ), slice( None ), -1  , slice( None ), slice( None ) ), # loading in x dir
                          ( slice( None ), -1  , slice( None ), slice( None ), -1  , slice( None ) ), # loading in y dir
                          ( slice( None ), slice( None ), -1  , slice( None ), slice( None ), -1 )   # loading in z dir
                        ]

        load_dirs = [0, 1, 2]
        load = 0.01
        vars = ['eps_app']
        for support_slice, loading_slice in zip( support_slices, loading_slices ):

            for load_dir in load_dirs:
                tl, u3D, fields3D, integs, g = simgrid( self.fets_eval3D, ( 3, 3, 3 ), ( 1, 1, 1 ),
                                           support_slice, support_dirs,
                                           loading_slice, load_dir,
                                           load, 1, vars )

                tl, u2D5, fields2D5, integs, g = simgrid( self.fets_eval2D5, ( 3, 3, 3 ), ( 1, 1, 1 ),
                                           support_slice, support_dirs,
                                           loading_slice, load_dir,
                                           load, 1, vars )

                for u1_, u2_ in zip( u3D.flatten(), u2D5.flatten() ):
                    self.assertAlmostEqual( u1_, u2_ )
Beispiel #6
0
    def assert_stress_value(
        self,
        sig_expected,
        n_steps=3,
        load=0.0001,
    ):
        '''Assert that the symmetry is given for the applied loadings.
        '''
        self.fets_eval = FETS3D8H(mats_eval=self.mats_eval)
        support_slices = [
            [
                (0, slice(None), slice(None), 0, slice(None),
                 slice(None)),  # yz plane  0
                (0, 0, slice(None), 0, 0, slice(None)),  # z plane  0
                (0, 0, 0, 0, 0, 0),  # z plane  0
            ],
            #                      [
            #                       (0   ,0          ,0          ,0   ,0          ,0          ), # z plane  0
            #                       (slice(None),0   ,slice(None),slice(None),0   ,slice(None)), # xz plane  1
            #                       (slice(None),0   ,0          ,slice(None),0   ,0          ), # z plane  0
            #                      ],
            #                      [
            #                       (0   ,slice(None),0          ,0   ,slice(None),0         ), # z plane  0
            #                       (0   ,0          ,0          ,0   ,0          ,0          ), # z plane  0
            #                       (slice(None),slice(None),0   ,slice(None),slice(None),0   ), # xy plane  1
            #                      ]
        ]
        support_dirs = [[0], [1], [2]]

        loading_slices = [
            (-1, slice(None), slice(None), -1, slice(None),
             slice(None)),  # loading in x dir
            #                      (slice(None),-1 ,slice(None),slice(None),-1 ,slice(None)),  # loading in y dir
            #                      (slice(None),slice(None),-1 ,slice(None),slice(None),-1 ),  # loading in y dir
        ]

        load_dirs = [0]  # ,1,2]

        vars = ['sig_app']

        r = [
            simgrid(self.fets_eval, (1, 1, 1), (1, 1, 1), support_slice,
                    support_dirs, loading_slice, load_dir, load, 1, vars)
            for support_slice, loading_slice, load_dir in zip(
                support_slices, loading_slices, load_dirs)
        ]

        for rr in r:
            sig_end = rr[2][0]
            # all material points must have the same value - uniform loading.
            for sig, sig_exp in zip(sig_end.flatten(), sig_expected):
                self.assertAlmostEqual(sig, sig_exp, 4)
Beispiel #7
0
    def assert_symmetry(self, load_dirs = [0,1] ):
        '''Assert that the symmetry is given for the applied loadings.
        '''
        load = 0.0001

        r = [ simgrid( self.fets_eval,  (1,1), (1,1),
                       support_slice, self.support_dirs,
                       loading_slice, load_dir, 
                       load, 1, vars = [] )
              for support_slice, loading_slice, load_dir 
              in zip( self.support_slices, self.loading_slices, load_dirs ) ]
        
        self.assertAlmostEqual( r[0][1][-1], r[1][1][-2] )
Beispiel #8
0
    def assert_symmetry(self, load_dirs = [0,1] ):
        '''Assert that the symmetry is given for the applied loadings.
        '''
        load = 0.0001

        r = [ simgrid( self.fets_eval,  (1,1), (1,1),
                       support_slice, self.support_dirs,
                       loading_slice, load_dir, 
                       load, 1, vars = [] )
              for support_slice, loading_slice, load_dir 
              in zip( self.support_slices, self.loading_slices, load_dirs ) ]
        
        self.assertAlmostEqual( r[0][1][-1], r[1][1][-2] )
Beispiel #9
0
    def assert_stress_value(self,
                            sig_expected,  
                            n_steps = 3, 
                            load = 0.0001,
                            ):
        '''Assert that the symmetry is given for the applied loadings.
        '''
        self.fets_eval  = FETS3D8H(mats_eval  = self.mats_eval)        
        support_slices = [
                      [ 
                       (0   ,slice(None),slice(None),0   ,slice(None),slice(None)), # yz plane  0
                       (0   ,0          ,slice(None),0   ,0          ,slice(None)), # z plane  0
                       (0   ,0          ,0          ,0   ,0          ,0          ), # z plane  0
                      ],
#                      [ 
#                       (0   ,0          ,0          ,0   ,0          ,0          ), # z plane  0
#                       (slice(None),0   ,slice(None),slice(None),0   ,slice(None)), # xz plane  1
#                       (slice(None),0   ,0          ,slice(None),0   ,0          ), # z plane  0
#                      ],
#                      [ 
#                       (0   ,slice(None),0          ,0   ,slice(None),0         ), # z plane  0
#                       (0   ,0          ,0          ,0   ,0          ,0          ), # z plane  0
#                       (slice(None),slice(None),0   ,slice(None),slice(None),0   ), # xy plane  1
#                      ]
                      ]
        support_dirs = [[0],[1],[2]]
        
        loading_slices = [
                      (-1, slice(None),slice(None),-1 ,slice(None),slice(None)),  # loading in x dir
#                      (slice(None),-1 ,slice(None),slice(None),-1 ,slice(None)),  # loading in y dir
#                      (slice(None),slice(None),-1 ,slice(None),slice(None),-1 ),  # loading in y dir
                        ]

        load_dirs = [0] # ,1,2]

        vars = [ 'sig_app' ]

        r = [ simgrid( self.fets_eval,  (1,1,1), (1,1,1),
                         support_slice, support_dirs,
                         loading_slice, load_dir, 
                         load, 1, vars )
                for support_slice, loading_slice, load_dir in zip( support_slices,
                                                                   loading_slices, 
                                                                   load_dirs ) ]

        for rr in r:
            sig_end = rr[2][0]
            # all material points must have the same value - uniform loading.
            for sig, sig_exp in zip( sig_end.flatten(), sig_expected ):
                self.assertAlmostEqual( sig, sig_exp, 4 )
Beispiel #10
0
    def assert_total_energy_value(
        self,
        value_expected,
        ivar='strain_energy',
        n_steps=3,
        load=1.0,
    ):
        '''Assert that the symmetry is given for the applied loadings.
        '''
        self.fets_eval = FETS3D8H(mats_eval=self.mats_eval)
        support_slices = [
            [
                (0, slice(None), slice(None), 0, slice(None),
                 slice(None)),  # yz plane  0
                #                       (0   ,0          ,slice(None),0   ,0          ,slice(None)), # z plane  0
                #                       (0   ,0          ,0          ,0   ,0          ,0          ), # z plane  0
            ],
            #                      [
            #                       (0   ,0          ,0          ,0   ,0          ,0          ), # z plane  0
            #                       (slice(None),0   ,slice(None),slice(None),0   ,slice(None)), # xz plane  1
            #                       (slice(None),0   ,0          ,slice(None),0   ,0          ), # z plane  0
            #                      ],
            #                      [
            #                       (0   ,slice(None),0          ,0   ,slice(None),0         ), # z plane  0
            #                       (0   ,0          ,0          ,0   ,0          ,0          ), # z plane  0
            #                       (slice(None),slice(None),0   ,slice(None),slice(None),0   ), # xy plane  1
            #                      ]
        ]
        support_dirs = [[0, 1, 2]]  # ,[1],[2]]

        loading_slices = [
            (-1, slice(None), slice(None), -1, slice(None),
             slice(None)),  # loading in x dir
            #                      (slice(None),-1 ,slice(None),slice(None),-1 ,slice(None)),  # loading in y dir
            #                      (slice(None),slice(None),-1 ,slice(None),slice(None),-1 ),  # loading in y dir
        ]

        load_dirs = [0]  # ,1,2]

        ivars = [ivar]
        r = simgrid(self.fets_eval, (1, 1, 1), (1, 1, 1),
                    support_slices[0],
                    support_dirs,
                    loading_slices[0],
                    0,
                    load,
                    n_steps,
                    ivars=ivars)

        self.assertAlmostEqual(r[3][0][0], value_expected)
Beispiel #11
0
    def assert_total_energy_value(self,
                                         value_expected,  
                                         ivar = 'strain_energy',
                                         n_steps = 3, 
                                         load = 1.0,
                            ):
        '''Assert that the symmetry is given for the applied loadings.
        '''
        ivars = [ivar]
        r = simgrid( self.fets_eval,  (1,1), (1,1),
                     self.support_slices[0], self.support_dirs,
                     self.loading_slices[0], 0, 
                     load, n_steps, ivars = ivars )

        self.assertAlmostEqual( r[3][0][0], value_expected )
        
        
Beispiel #12
0
    def assert_stress_value(self,
                            sig_expected,  
                            n_steps = 3, 
                            load = 0.0001,
                            ):
        '''Assert that the symmetry is given for the applied loadings.
        '''
        vars = ['sig_app']

        r = simgrid( self.fets_eval,  (1,1), (1,1),
                       self.support_slices[0], self.support_dirs,
                       self.loading_slices[0], 0, 
                       load, n_steps, vars )

        sig_end = r[2][0]
        for sig, sig_exp in zip( sig_end.flatten(), sig_expected ):
            self.assertAlmostEqual( sig, sig_exp, 5 )
Beispiel #13
0
    def assert_total_energy_value(self,
                                         value_expected,  
                                         ivar = 'strain_energy',
                                         n_steps = 3, 
                                         load = 1.0,
                            ):
        '''Assert that the symmetry is given for the applied loadings.
        '''
        ivars = [ivar]
        r = simgrid( self.fets_eval,  (1,1), (1,1),
                     self.support_slices[0], self.support_dirs,
                     self.loading_slices[0], 0, 
                     load, n_steps, ivars = ivars )

        self.assertAlmostEqual( r[3][0][0], value_expected )
        
        
Beispiel #14
0
    def assert_stress_value(
        self,
        sig_expected,
        n_steps=3,
        load=0.0001,
    ):
        '''Assert that the symmetry is given for the applied loadings.
        '''
        vars = ['sig_app']

        r = simgrid(self.fets_eval, (1, 1), (1, 1), self.support_slices[0],
                    self.support_dirs, self.loading_slices[0], 0, load,
                    n_steps, vars)

        sig_end = r[2][0]
        for sig, sig_exp in zip(sig_end.flatten(), sig_expected):
            self.assertAlmostEqual(sig, sig_exp, 5)
Beispiel #15
0
    def assert_symmetry_on_cube_with_clamped_face(self, load_dirs, load=0.001):
        '''Assert that the symmetry is given for the applied loadings.
        '''

        self.fets_eval = FETS3D8H(mats_eval=self.mats_eval)

        support_slices = [
            [
                (0, slice(None), slice(None), 0, slice(None),
                 slice(None)),  #                             yz plane  0
            ],
            [
                (slice(None), 0, slice(None), slice(None), 0,
                 slice(None)),  # xz plane  1
            ],
            [
                (slice(None), slice(None), 0, slice(None), slice(None),
                 0),  # xy plane  1
            ]
        ]
        support_dirs = [[0, 1, 2]]

        loading_slices = [
            (-1, slice(None), slice(None), -1, slice(None),
             slice(None)),  # loading in x dir
            (slice(None), -1, slice(None), slice(None), -1,
             slice(None)),  # loading in y dir
            (slice(None), slice(None), -1, slice(None), slice(None),
             -1),  # loading in y dir
        ]

        vars = []  # ['u','eps_app','sig_app','fracture_energy']

        r = [
            simgrid(self.fets_eval, (1, 1, 1), (1, 1, 1), support_slice,
                    support_dirs, loading_slice, load_dir, load, 1, vars)
            for support_slice, loading_slice, load_dir in zip(
                support_slices, loading_slices, load_dirs)
        ]

        u = array([r[i][1][-3:] for i in range(3)])

        for idx1, idx2 in self.sym_assert_pattern:
            self.assertAlmostEqual(u[idx1], u[idx2])
Beispiel #16
0
    def assert_total_energy_value(self,  value_expected,  
                                         ivar = 'strain_energy',
                                         n_steps = 3, 
                                         load = 1.0,
                            ):
        '''Assert that the symmetry is given for the applied loadings.
        '''
        self.fets_eval  = FETS3D8H(mats_eval  = self.mats_eval)        
        support_slices = [
                      [ 
                       (0   ,slice(None),slice(None),0   ,slice(None),slice(None)), # yz plane  0
#                       (0   ,0          ,slice(None),0   ,0          ,slice(None)), # z plane  0
#                       (0   ,0          ,0          ,0   ,0          ,0          ), # z plane  0
                      ],
#                      [ 
#                       (0   ,0          ,0          ,0   ,0          ,0          ), # z plane  0
#                       (slice(None),0   ,slice(None),slice(None),0   ,slice(None)), # xz plane  1
#                       (slice(None),0   ,0          ,slice(None),0   ,0          ), # z plane  0
#                      ],
#                      [ 
#                       (0   ,slice(None),0          ,0   ,slice(None),0         ), # z plane  0
#                       (0   ,0          ,0          ,0   ,0          ,0          ), # z plane  0
#                       (slice(None),slice(None),0   ,slice(None),slice(None),0   ), # xy plane  1
#                      ]
                      ]
        support_dirs = [[0,1,2]] # ,[1],[2]]
        
        loading_slices = [
                      (-1, slice(None),slice(None),-1 ,slice(None),slice(None)),  # loading in x dir
#                      (slice(None),-1 ,slice(None),slice(None),-1 ,slice(None)),  # loading in y dir
#                      (slice(None),slice(None),-1 ,slice(None),slice(None),-1 ),  # loading in y dir
                        ]

        load_dirs = [0] # ,1,2]

        ivars = [ivar]
        r = simgrid( self.fets_eval,  (1,1,1), (1,1,1),
                     support_slices[0], support_dirs,
                     loading_slices[0], 0, 
                     load, n_steps, ivars = ivars )

        self.assertAlmostEqual( r[3][0][0], value_expected )
Beispiel #17
0
    def assert_symmetry_on_cube_with_clamped_face(self, load_dirs, load = 0.001 ):
        '''Assert that the symmetry is given for the applied loadings.
        '''

        self.fets_eval  = FETS3D8H(mats_eval  = self.mats_eval)

        support_slices = [
                      [ 
                       (0   ,slice(None),slice(None),0   ,slice(None),slice(None)), #                             yz plane  0
                      ],
                      [ 
                       (slice(None),0   ,slice(None),slice(None),0   ,slice(None)), # xz plane  1
                      ],
                      [ 
                       (slice(None),slice(None),0   ,slice(None),slice(None),0   ), # xy plane  1
                      ]
                      ]
        support_dirs = [[0,1,2]]
        
        loading_slices = [
                      (-1, slice(None),slice(None),-1 ,slice(None),slice(None)),  # loading in x dir
                      (slice(None),-1 ,slice(None),slice(None),-1 ,slice(None)),  # loading in y dir
                      (slice(None),slice(None),-1 ,slice(None),slice(None),-1 ),  # loading in y dir
                        ]

        vars = [] # ['u','eps_app','sig_app','fracture_energy']

        r = [ simgrid( self.fets_eval,  (1,1,1), (1,1,1),
                         support_slice, support_dirs,
                         loading_slice, load_dir, 
                         load, 1, vars )
                for support_slice, loading_slice, load_dir in zip( support_slices,
                                                                   loading_slices, 
                                                                   load_dirs ) ]

        u = array( [ r[i][1][-3:] for i in range(3) ] )
        
        for idx1, idx2 in self.sym_assert_pattern: 
            self.assertAlmostEqual( u[idx1], u[idx2] )
    def _get__results_3d( self ):
        
        fets_eval = FETS3D8H( mats_eval  = self.mats )        

        support_slice =  [ 
                (0   ,slice(None),slice(None),0   ,slice(None),slice(None)), # yz plane  0
                (0   ,0   ,slice(None),0   ,0   ,slice(None)), #  z-axis   1
                (0   ,0   ,   0,0   ,0   ,0   )  #  origin   2
                          ]
        
        support_dirs = [[0],[1],[2]]
        
        loading_slice = (-1  ,slice(None),slice(None),-1  ,slice(None),slice(None))  # loading in x dir

        tl, u1, fields, integs, xydata = simgrid( fets_eval, (1,1,1), (1,1,1), 
                                  support_slice, support_dirs,
                                  loading_slice, 
                                  0, 
                                  self.u_max, 
                                  self.n_steps,
                                  vars  = ['fracture_energy'],
                                  ivars = ['fracture_energy'] )

        return integs[0][0], xydata

support_dirs = [[0],[1],[2]]

loading_slices = [ 
                  (-1  ,-1, -1, -1, -1, -1 ),  # loading in z dir
                ]

load_dirs = [2]
load = - 0.00025 # - 0.01
vars = ['eps_app']
for support_slice, loading_slice in zip( support_slices, loading_slices ): 

    for load_dir in load_dirs:
        tl, u3D, fields3D, integs, g  = simgrid( fets_eval3D, (0.5, 0.5, .03), (5,5,1),
                                   support_slice, support_dirs,
                                   loading_slice, load_dir, 
                                   load, 1, vars, var_type = 'f' )

        tl, u2D5, fields2D5, integs, g = simgrid( fets_eval2D5, (0.5, 0.5, .03), (5,5,1),
                                   support_slice, support_dirs,
                                   loading_slice, load_dir, 
                                   load, 1, vars, var_type = 'f' )
        
        
        print 'u215', u3D[215]
        
        for u1_, u2_ in zip( u3D.flatten(), u2D5.flatten() ):
            if fabs( u1_ - u2_ ) > 1e-10:
                print 'non matching', u1_, u2_