Using external file data for heat source

Thread index  |  Previous thread  |  Next thread  |  Start a new discussion

RSS FeedRSS feed   |   Email notificationsTurn on email notifications   |   5 Replies   Last post: January 3, 2013 3:05pm UTC
Alon Rozen

Alon Rozen

December 17, 2012 3:10pm UTC

Using external file data for heat source

Hi all,

I am trying to solve a model for heat transfer in solids using external data as heat source input.
The geometric model is simple and composed of 3 separated bodies attached together by a 'union' operation and form a continuity.
As a heat source I am trying to use an external file which contain the heat production, in units of W/cm^3, in certain points within the geometry. The file looks like this:

% x y z Power
1 1 1 10.2
1 2 3 20.2
...
5 4 7 15.3

To read it, under Global Parameters, I defined an interpolation function where I choose interpolation 'linear' and extrapolation 'specific value' (set to zero). I imported the function and I can see a nice plot of it in the graphics window. .
Then, in the 'Heat transfer in solids' physics inside 'heat Source' I am trying to use this function.
I choose 'User defined' under 'General source' and write the function name (the one I created from the file in the 'Global Parameters'). Comsol marks the function name in orange and claim that 'the variable is unknown'.

What am I missing? How can I use this function as heat source?

Any help will be appreciated,
Alon

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Ivar Kjelberg

Ivar Kjelberg

December 17, 2012 3:55pm UTC in response to Alon Rozen

Re: Using external file data for heat source

Hi

You should rather use the Model Definition Function Interpolation, and enable the File import - spreadsheet tick ON Use space coordinates as arguments to get the full mapping, the latter exist only in the model function, not in the global, as these are normally geometry independent (=Global).

Thne orange is unit errors, if you do not define your arguments in COMSOL interpolation function as W/cm^2 then you need to multiply the numerical value by the appropriate unit value 1[W/cm^2]

Check it out on a simple example with and without units

space coordinates are in meters by default

--
Good luck
Ivar

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Zhifang Wang

Zhifang Wang

December 25, 2012 1:28pm UTC in response to Ivar Kjelberg

Re: Using external file data for heat source

a heated plate, how to use it can get a correct result during cooling process

appreciate you answer

thank you

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Zhifang Wang

Zhifang Wang

December 25, 2012 1:28pm UTC in response to Ivar Kjelberg

Re: Using external file data for heat source

a heated plate, how to use it can get a correct result during cooling process

appreciate you answer

thank you

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Ivar Kjelberg

Ivar Kjelberg

December 25, 2012 2:52pm UTC in response to Zhifang Wang

Re: Using external file data for heat source

Hi

what about solving a stationary case for the heating, and then follow by a time dependent study using the stationary case as initial conditions. In the latest version, you can also turn on or off BC by solver settings, and or use a Parameter t=0[s] as "switch" to change certain BC values (defined as Parameter for the stationary case, then the time series redefines it and run t over you defined range set

--
Good luck
Ivar

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Alon Rozen

Alon Rozen

January 3, 2013 3:05pm UTC in response to Ivar Kjelberg

Re: Using external file data for heat source

Thanks Ivar :)

Indeed I had a problem of units but not with the heat - I needed to say that it is a function of x,y,z. Only when I added these coordinates the data could be read.

Thanks again,
Alon

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse


Rules and guidelines