Modeling temperature dependent material properties

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Modeling temperature dependent material properties

ALVEON
Hey guys,

I am new to FEATool trying to evaluate its features before purchasing a commercial license. I tried to adapt the following test case to the best of my abilities from the Tutorial

"Resistive Heating in a Tungsten Filament"

I am trying to set up a model simulating the thermal behavior of a ceramic PTC heating element.

The basic model works, but I did not have success yet in respecting the temperature dependent behavior of the electrical resistance in PTC ceramics, which is highly un-linear around a certain temperature, the so called Curie-temperature.

Ideally this should be built through a table of measured values and interpolation, but for now I tried to work with logical expressions.

For the conductivity value in the "Conductivity Media DC" equation I tried to enter the following:

(T<473)*100 + (T>=473)*(T<475)*10 + (T>=475)*1

Expected behavior:
T<473K -> 100 S/m
T between 473K and 475K -> 10 S/m
T>475K -> 1 S7m

I also entered the entire expression in the source term "Q" of the "Heat Transfer" equation, but judging from the error I receive, I didn't even get that far.

"Could not evaluate the expression "(((aSubExpr(:,1)<473).*100)".
Please check and make sure that it is a valid expression."

test.fea
Reply | Threaded
Open this post in threaded view
|

Re: Modeling temperature dependent material properties

Precise Simulation
Administrator
This post was updated on .
Thank you for reporting, the error seems to be due to an issue with the expression parsing, in this particular case something with the blank spaces. If you remove **all** blank spaces from the "ht:Q" coefficient it will run (but not converge in this particular case), and/or adding it as a named model "Coefficient/Expression" (instead of entering it directly into the equation edit fields.

This issue will be fixed in the next update/release (as it should not be sensitive to whitespace).
Reply | Threaded
Open this post in threaded view
|

Re: Modeling temperature dependent material properties

ALVEON
Thank you very much for looking into this and for your correction. I have implemented it and as you said, it is running but the results are not satisfactory (yet). This might be due to the fact, that in the suggested form the constant is very discontinuous.

I tried to find some information on how to implement this using a lookup table. Could you be so kind and point me in the right direction? I have not been able to find an example or the likes in the documentation.
Reply | Threaded
Open this post in threaded view
|

Re: Modeling temperature dependent material properties

Precise Simulation
Administrator
Quite hard to say why the results might differ from expected. Regarding lookup table, another user has implemented this for electromagnetic effects using a custom user-defined function as detailed here (but the process would essentially be the same for heat transfer):

http://forum.featool.com/Error-using-variable-coefficient-in-FENICS-tp1865p1880.html

https://www.featool.com/doc/physics#phys_coef_user
Reply | Threaded
Open this post in threaded view
|

Re: Modeling temperature dependent material properties

ALVEON
Thank you very much. I read both posts carefully and I might have a quite nooby question:

How do I implement this in general? I understand the code and the functions from matlab (I have worked with matlab before), but how do I integrate this with the FEATOOL Gui? Do I have to place "myfun(x,y,t,T)" under Model Constants and Expressions or how does this work?

Apologies if this is a very basic question, I tried my best to find an answer in the documentation but it seems to be...to basic I guess?
Reply | Threaded
Open this post in threaded view
|

Re: Modeling temperature dependent material properties

Precise Simulation
Administrator
The custom and user-defined function section of the documentation has been updated with a few more details https://www.featool.com/doc/physics#phys_coef_user

Basically you can write the name of a custom function in any equation, boundary, and/or postprocessing expression edit field and the toolbox will try:

(1) to find the function definition on the Matlab paths (execute the command ">> path" in Matlab to see valid search paths that the function definition m-file can be placed in, or use "addpath" to add a new folder to the searchpaths).

(2) call, evaluate, and use the results as a coefficient

A caveat, that custom user-defined functions currently only works if your are running FEATool as a Matlab toolbox (it won't work running as a stand-alone app due to the Mathworks licensing restrictions). In the future it is planned to allow for custom Python functions to execute independently (irrespective of FEATool version, toolbox or stand-alone app).
Reply | Threaded
Open this post in threaded view
|

Re: Modeling temperature dependent material properties

ALVEON
Thank you for clarifying this. Unfortunately, I am currently running the stand alone version and will not be able to try this, but I will keep it in mind and hope that your comments on this might help other people to implement this.

To close this, I have built a small excel sheet which generates the linear interpolation equation for every data interval and assembles it into a long, looong function using logical expression to activate each linear equation for its respective interval. Cumbersome, but it works so far.

Thanks again for your input on this, it is highly appreciated.