Page 195 - Using ANSYS for Finite Element Analysis Dynamic, Probabilistic, Design and Heat Transfer Analysis
P. 195

182  •   using ansys for finite eLement anaLysis
                5.2.4.3  Retrieve Results Parametrically


                This  is where  we  retrieve  results  data  and  assign them  to  parameters.
                These parameters usually represent SVs and the objective function. The
                *GET command  (Utility  Menu> Parameters>  Get Scalar  Data),  which
                assigns ANSYS calculated values to parameters, is used to retrieve the
                data. POST1 is typically used for this step, especially if the data are to be
                stored, summed, or otherwise manipulated.
                    In our beam example, the weight of the beam is the objective func-
                tion (to be minimized). Since weight is directly proportional to volume,
                and assuming uniform density, minimizing the total volume of the beam
                is the same as minimizing its weight. Therefore, we can use volume as
                the objective function. The SVs for this example are the total stress and
                deflection. The parameters for these data may be defined as follows:
                    /POST1
                    SET,...
                    NSORT,U,Y ! Sorts nodes based on UY deflection
                      *GET,DMAX,SORT,,MAX ! Parameter DMAX = maximum
                    deflection
                    !
                    ! Derived data for line elements are accessed
                through ETABLE:
                    ETABLE,VOLU,VOLU ! VOLU = volume of each element
                      ETABLE,SMAX_I,NMISC,1 ! SMAX_I = max. stress at
                    end I of each element
                      ETABLE,SMAX_J,NMISC,3 ! SMAX_J = max. stress at
                    end J of each element
                    !
                    SSUM ! Sums the data in each column of the ele-
                ment table
                      *GET,VOLUME,SSUM,,ITEM,VOLU ! Parameter VOLUME
                    = total volume
                      ESORT,ETAB,SMAX_I,,1 ! Sorts elements based on
                    absolute value of SMAX_I
                      *GET,SMAXI,SORT,,MAX ! Parameter SMAXI = max.
                    value of SMAX_I
                      ESORT,ETAB,SMAX_J,,1 ! Sorts elements based on
                    absolute value of SMAX_J
                      *GET,SMAXJ,SORT,,MAX ! Parameter SMAXJ = max.
                    value of SMAX_J
                      SMAX=SMAXI>SMAXJ ! Parameter SMAX = greater of
                    SMAXI and SMAXJ
   190   191   192   193   194   195   196   197   198   199   200