MPCHG with APDL in Workbench

So far I have only worked in ANSYS WB - APDL is new territory for me and I would like to avoid switching to ANSYS Classic.

   I would like to depict the following:

   I have a material (insulation material) that is subjected to thermal transient loads. Material 1 should be used while the cross-section is heating. At some point, the external thermal stress decreases. Due to the inertia of the insulation material, some areas heat up even further when the external temperature begins to decrease, while the edge areas of the cross section cool down. I would like to start by looking at only one cycle, i.e. Warm up and cool down within one simulation.

   I would like to change the material in WB via an APDL command with MPCHG. It should be checked at every time step for each individual element whether it is heating up or cooling down. When it cools down, the material change from "1" to "2" should take place for the respective element. Every element in the body checks this for itself.

   What I've done so far in ANSYS WB:

   In the “Technical data” in WB, I have only defined two materials and named them “1” and “2”.

   Then I go into the model:

   In the equation solver (/ Solu) in the structure tree I have inserted

 

numsb=200 ! number of steps

esel,s,mat,,1 ! I want to select my material „1“.

*get,n_max,node,,num,max ! I want to select all nodes.

*dim,n_temp_old,,n_anz ! Define arrays

*dim,n_temp_new,,n_anz

*dim,dif,,n_anz

*vfill,n_temp_alt,data,0 ! old temperature is = 0 at the beginning

alls

solve ! First calculation

*do,i,1,numsb ! Loop over the calculation steps

esel,s,mat,,??? ! Select material that i want to check, where do I have to define the material. Does the access work on „technical data“?

nsle ! Select nodes of the material

*voper,dif,n_temp_old,sub,n_temp_new ! create temperature difference

cm,temp,node ! none nodes should be selected

*do,i,1,n_max

*if,dif(i),lt,0 ! if difference is negatice

nsel,a,,,i ! then the node is additional selected

*endif

*enddo

esln,,1 ! If all nodes are selected the element changes its material

mpchg,2 ! change to material “2”

cm,n_chg%i%,node ! for every step a new component is created

cm,e_chg%i%,elem

*vfun,n_temp_old,copy,n_temp_new ! new temperature becomes the old temperature for the next calculation step

solve ! calculation of the current step

*enddo

cmwrite,komponenten,cm ! this is supposed to be able to import the resulting components after the calculation as "Named Selection" in Mechanical - but how?

fini

The commands take place exclusively with an equation solver. Otherwise I have no APDL commands or changes to the settings in the preprocessor or postprocessor.
When I perform the calculation with the APDL commands, no error messages appear. But it makes no difference whether I suppress the orders or not. I always get the same results.
 
regards
Benna


Sign In or Register to comment.