×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

piecewise polynomial function

piecewise polynomial function

piecewise polynomial function

(OP)
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
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources