-
-
August 25, 2023 at 8:09 pm
Maralll
SubscriberHello All,
My model is a 2d hollow semisphere. By writing an apdl code in ansys workbench, I defined the elastic modulus changes radially along the thickness of the hemisphere. Now I need to write a code to show me the contour of varaiation of elastic modulus along the thickness in my model. I would aprreciate any help!
Thank You,
Maral
-
August 29, 2023 at 2:21 pm
Ashish Kumar
Forum ModeratorHi,
Please see if the following link helps: variation of young modulus with the change in density of material? (ansys.com)
Regards,
Ashish Kumar
-
August 29, 2023 at 3:21 pm
Maralll
SubscriberThank you for your reply, Ashish.
I'm afraid this link doesn't help because I already applied the variable elastic modulus along the thickness through an APDL command in Ansys WB and I was able to get the results. However, I don't know how to PLOT the contour of variable elastic modulus on the body. When I use Material Plot, it showed me the default material properties (constant elastic modulus) instead of the variable elastic modulus. The code which is written under material, deletes the default material and assigns the variable elastic modulus to the elements (the valuse of elastic modulus varies radially). I need to see the contour plot of the values of the variable elastic modulus on the model.
I would appreciate any help.
Regards,
Maral
-
August 29, 2023 at 4:56 pm
Dave Looman
Ansys EmployeeThere's no direct way. Two generic examples of an indirect way are below.
Method 1:
/post1
*get,ecount,elem,,count
emin=0
*do,iii,1,ecount,1
emin=elnext(emin)
!!! retrieve numerical value of EX for element emin as exval
detab,emin,EX_,exval
*enddo
pletab,EX_
2nd method based on temp-dep EX:
!
set,last
!
*get,ecnt,elem,,count
*get,emax,elem,,num,max
*del,emmm,,nopr
*dim,emmm,'ARRAY',emax
etab,etemp,'BFE','TEMP'
ei=0
*do,i,1,ecnt
ei=elnext(ei)
*get,emno,'ELEM',ei,'ATTR','MAT'
*get,itemp,'ELEM',ei,'ETAB',etemp
*get,emmm(ei),'EX',emno,'TEMP',itemp
*enddo
*vput,emmm(1),'ELEM',1,'ETAB',etemp
eplot
/triad,lbot
/VIEW,1,1,1,1
/ANG,1
/auto,1
!
/SHOW,PNG,,0
/GFILE,1200,
Plet,etemp
/SHOW,CLOSE -
September 6, 2023 at 6:20 pm
Maralll
SubscriberDear Dave,
Thank you for sending me this code.
I tried to apply the second method under solution but the result that I got is a contour plot of variable elastic modulus which the maximum in the outer layer with the value which is obtained from the default value of the elastic modulus (that I had to defined in engineering data). However, I had added the command macro under the geometry to overwrite the default material data and the solution were done based on those new values of material data ( the elastic modulus as a function of radius(. So, I need to show those values of overrided elastic modulus on a contour plot-The values are changing from 0.02 to 0.25 MPa. How can I modify your code to make ansys to get the new material data not the default one? I would appreciate if you could help.
And, here is the code that solve the problem with the elastic modulus as a linear function of radius.
MPDELE, elastic,all
TBDELE,elastic,all
csys,1
esel, all
cm,remainingelem,elem
matid=1
*Do,ee,1,100000
*get,nextElem,ELEM,0,nxth
*get,elemxposition,ELEM,nextElem,cent,x
esel,r,cent,x,elemxposition
cm,elementXgroup,elem
*SET,x_pos,elemxposition
E_X=0.46*x_pos-2.74
Tb,elastic,matid,,2,Isot
Tbdata,1,E_X,0.49
MPCHG,matID,all
*get,count_control,elem,,count
cmsel,s,remainingelem
cmsel,u,elementXgroup
cm,remainingelem,elem
*get,Element_count,elem,,count
*if,element_count,eq,count_control,exit
matid=matid+1
*enddo
matid=matid+1
*get,nextElem,ELEM,0,nxth
*get,elemxposition,ELEM,nextElem,cent,x
esel,r,cent,x,elemxposition
cm,elementXgroup,elem
*SET,x_pos,elemxposition
E_X=0.46*x_pos-2.74
Tb,elastic,matid,,2,Isot
Tbdata,1,E_X,0.49
MPCHG,matID,all
esel,all
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Invalid Assignment error
- How do I make a chart with multiple material parameters on y-axis?
- *LOCAL COORDINATE SYSTEM ANSYS APDL ? how Ansys transform coordinates system?
- Material library
- PLA Material
- How to add SN curve for new material in Fatigue analysis?
- ANSYS 19.0 with Additive Manufacturing Extension
- properties of balsa wood
- Looking for Spring steel (55Si7) library material
- Ansys material damage
-
7584
-
4434
-
2951
-
1422
-
1322
© 2023 Copyright ANSYS, Inc. All rights reserved.