!******************************************************************************* ! ! UEDLOAD_PRESS_164.MAC ! --------------------- ! ! Description ! ----------- ! This macro defines a pressure load on a selected set of nodes for the ! SOLID164 element using the EDLOAD command. It is the ANSYS/LS-DYNA equivalent ! of the ANSYS SF command. ! ! Revision History ! ---------------- ! 25/09/03 LC Initial release. ! ! Usage ! ----- ! (1) Select the set of nodes to which the pressure is to be applied. ! (2) Invoke this macro using the following command syntax: ! ! UEDLOAD_PRESS_164,N,'TIME_VALUES','PRESSURE_VALUES' ! ! where: N is a number identifying the pressure load being ! applied. ! TIME_VALUES is the name of the array containing the time ! values. ! PRESSURE_VALUES is the name of the array containing the ! pressure values. ! ! Note that the array names must be enclosed within apostrophes. ! ! Output ! ------ ! The macro creates up to 6 components. Each component contains the loaded ! elements grouped according to the face number that has to be loaded. The ! naming convention for the components is: ! ! PRESSi_LKEYj_ELEMS ! ! where: i is the loading reference number (N above). ! j is the face number (or load key) to be loaded. ! !******************************************************************************* cm,selected_elems_,elem esln esel,r,ename,,164 *get,noelems_,elem,,count *get,maxelno_,elem,,num,max *dim,lkey_,array,maxelno_ *if,noelems_,eq,0,then *msg,warn There are no SOLID164 elements attached to the selected set of nodes.& No pressure loads have been defined. *else *do,i_,1,noelems_,1 *get,curelem_,elem,,num,max lkey_(curelem_)=nmface(curelem_) esel,u,elem,,curelem_ *enddo *do,i_,1,6,1 esel,none *do,j_,1,maxelno_,1 *if,lkey_(j_),eq,i_,then esel,a,elem,,j_ *endif *enddo *get,noelems_,elem,,count *if,noelems_,gt,0,then cm,press%arg1%_lkey%i_%_elems,elem edload,add,press,i_,press%arg1%_lkey%i_%_elems,arg2,arg3 *endif *enddo *endif cmsel,s,selected_elems_ cmdele,selected_elems_ *del,,prm_