## General Mechanical

#### Help with solving warning: The selected element set contains mixed materials

• Koen_Franse
Subscriber
Hi all,nI'm solving an APDL input file by running the dos-command in Matlab, in which I want to export the total Von Mises strain of all nodes to a txt file. I'm doing this in the script you find below. The export of the node coordinates, displacement and Von Mises stress works fine. However, for the strain exports I get the following warning: *** WARNING ***             CP =    1.203  TIME= 15:36:24n The selected element set contains mixed materials.            n This could invalidate error estimation.  nnThis warning disappears when leaving out the strain exports. The strain values are exported correctly, however it increases the total wall time of the script significantly. Without the strain export it completes within a few seconds, but including the strain export makes the wall time above 2 minutes. Does anybody know how to solve this problem? I couldn't find a topic anywhere that already discussed this warning.nnScript for txt export:nn/post1n*get, _nsteps, active,,solu,ncmlsn! set,last,last ! Set to last time stepn*get,_nrNodes,NODE,0,count ! Get the total number of nodesnnfname = STRCAT(jobname,"_node_step')n! Loop over all load stepsn*do,step,1,_nsteps,1n  set,step,lastn  *dim,_data,table,_nrNodes,13 ! Initialize a table to store the datan  *vget,NODELIST,NODE,ALL,NLISTnn  ! Loop over all nodes to extract datan  *do,n,1,_nrNodes,1n   *get,_data(n,1),NODE,NODELIST(n),LOC,Xn   *get,_data(n,2),NODE,NODELIST(n),LOC,Yn   *get,_data(n,3),NODE,NODELIST(n),LOC,Zn   *get,_data(n,4),NODE,NODELIST(n),U,SUMn   *get,_data(n,5),NODE,NODELIST(n),U,Xn   *get,_data(n,6),NODE,NODELIST(n),U,Yn   *get,_data(n,7),NODE,NODELIST(n),S,EQVn   *get,_data(n,,NODE,NODELIST(n),S,Xn   *get,_data(n,9),NODE,NODELIST(n),S,Yn   *get,_data(n,10),NODE,NODELIST(n),EPTO,EQVn   *get,_data(n,11),NODE,NODELIST(n),EPTO,Xn   *get,_data(n,12),NODE,NODELIST(n),EPTO,Yn   *get,_data(n,13),NODE,NODELIST(n),EPTO,XYn  *end donn  *cfopen,STRCAT(fname,CHRVAL(step)),txtn  *vwrite,"% node_num","% loc_x","% loc_y","% loc_z","% U_tot","% U_x","% U_y","% S_VM","% S_x","% S_y","% e_eqv","% e_x","% e_y","% e_xy'n  %14s %14s %14s %14s %14s %14s %14s %14s %14s %14s %14s %14s %14s %14sn  *vwrite,NODELIST(1),_data(1,1),_data(1,2),_data(1,3),_data(1,4),_data(1,5),_data(1,6),_data(1,7),_data(1,,_data(1,9),_data(1,10),_data(1,11),_data(1,12),_data(1,13)n %15.6g %15.6g %15.6g %15.6g %15.6g %15.6g %15.6g %15.6g %15.6g %15.6g %15.6g %15.6g %15.6g %15.6gn  *cfclosen*end don
• Daniel Shaw
Ansys Employee
That warning message just identifies that you are requesting averaged nodal values at a node(s) that is shared by elements with different materials. There are some situations, where you might not want to use averaged values on nodes shared by elements of different materials (e.g. fatigue evaluations.n
• Koen_Franse
Subscriber
Thanks for the answer, that explains at least what causes the warning. However, this warning (or probably the averaging that's behind it) still causes the wall time of the simulation to increase considerably. Since I have to run a lot of these small simulations this is not desirable for me. Do you have any suggestion to prevent this, for example by not using averaged values on these nodes?n
• Daniel Shaw
Ansys Employee
Issuing that Warning message should not significantly affect the runtime. If you do not want to export the averaged nodal results, then export the unaveraged element results. You should export the desired quantity. Either the averaged nodal results or the unaveraged element results.n