I need to vary Young's modulus with spatial variables (x and y) linear isotropic material. How can I do this?
Please find the attached example, in which Young's moduli are defined as an array. An area is then created and meshed. Nodes are selected based on their locations, and Young's modulus values are assigned to the elements at those locations. Alternatively, you could *GET the element centroid locations and then assign materials based on those as well. For variation in X and Y, a 2D array would be necessary. fini /clear /prep7 count=1 !ARBITRARY COUNTER *dim,a1,array,11 !11X1 ARRAY *do,youngs,1,11,1 !DO LOOP a1(youngs)=youngs !YOU WOULD ENTER YOUR YOUNG'S MODULI HERE *enddo rectng,0,5,0,5 !5x5 AREA et,1,shell181 !SHELL 181 ELEMENT mshape,0,2d !MESHING CONTROLS mshkey,1 esize,,10 amesh,all *do,locationy,0,5,0.5 !LOOP FROM 0 TO 5 IN 0.5 INCREMENTS nsel,s,loc,y,locationy !SELECT NODES AT THE CURRENT LOCATION esln,s !SELECT ELEMENTS ATTACHED TO NODES mp,ex,count,a1(count) !ASSIGN YOUNG'S MODULUS FROM DEFINED ARRAY emodif,all,mat,count !MODIFY ELEMENT ATTRIBUTES TO CURRENT MATERIAL count=count+1 !INCREMENT COUNTER allsel,all *enddo allsel,all eplot /PNUM,MAT,1 !PLOT ELEMENTS SHOWING MATERIAL NUMBERS /replot |
||
|