Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations LittleInch on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

piecewise polynomial function

Status
Not open for further replies.

hugocern

Materials
Joined
Feb 10, 2012
Messages
1
Location
CH
Hello everyone,

I would like to describe the heat capacity of copper using a piecewise polynomial function.
I have 4 ranges of temperatures and then 4 different polynomial functions.
I use four times MPTGEN and MP commands to inform about the 4 ranges of temperature and the 5 coefficients of the polynoms for these 4 ranges.
The problem is that ansys re-compute the heat capacity for the previous range of temperature each time I use a new range of temperature...
How can I do to keep in memory the first polynom, the second, etc...?

Here is my code

cuivre = 3 !(OFHC)
ET,cuivre,PLANE55
!---------
Tinia= 0
Tfinia= 10
deltaT= 0.5
MPTGEN,,(Tfinia - Tinia)/deltaT , Tinia, deltaT
C4a=-3.4375E-06
C3a= 0.00080692
C2a=-0.000237723
C1a= 0.011383929
C0a=-0.000285714
MP, C, cuivre, C0a, C1a, C2a, C3a, C4a
!---------
Tinib= 10
Tfinib= 40
deltaT= 0.5
MPTGEN, 21,(Tfinib - Tinib)/deltaT , Tinib, deltaT
C4b=-3.40402E-05
C3b= 0.003337054
C2b=-0.050892857
C1b= 0.387276786
C0b=-0.920758929
MP, C, cuivre, C0b, C1b, C2b, C3b, C4b
MPPLOT,C,3
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top