Operator "max Temperature" in Material Properties

Numerical methods and mathematical models of Elmer
Post Reply
saxonfahrer
Posts: 38
Joined: 27 Jan 2011, 13:47

Operator "max Temperature" in Material Properties

Post by saxonfahrer »

Dear All,

i like to manipulate the material property "heat conductivity" in depency of the maximum Temperatur in my transient 2D model.
Therefore i wrote the following expression into the "heat conductivity" section.

Code: Select all

Variable Temperature; Real MATC "if (tx>=(max(tx)-0.05)) 1e10 else 0.01"
My aim: For all cells/nodes with a Temperature between maximum temperature (of the complete part) and 50mK lower then max Temp, the heat conductivity should be extremly high (i want to have equal temperature in this in this area after simulation). For all cells/nodes with an intial temperature lower then (T_max-0.05) the heat conductivity should be very low (so the heat can only be conducted in the time step a very short range).

But it does not work so far.

My question: can i use the expression "max(tx)" to determine the maximum temperature of the complete part?


Thank you very much
Best regards,
saxonfahrer


Background (but not important):
i want to mimick a squeeze out of glue between to plates by use of a thermal simulation (energy = glue volume, temperature = glue layer thickness).
For first attempt i like to use a 3-way geomtry like attached. There is a special behavior for this squeez out: the layer thickness decreases uniformaly because it is restricted by the two plates.
Therefore i have to manipulate the material property "thermal conductivity" in a special way: The thermal conductivity have to be "near infinity" for the "glue" and it has to be low for the "not covered" area.
Now the "operator "Maximum of Temperature" comes into play. I need to find out the max Temperatur in my Model in time step x and then adapt the material property "heat conducivity" for every time step.
saxonfahrer
Posts: 38
Joined: 27 Jan 2011, 13:47

Re: Operator "max Temperature" in Material Properties

Post by saxonfahrer »

Probable first mistake is may be found: The MATC Manual says that the maximum element of an matrix is called by max(max(Variable).
So may be the expression has to be :

Code: Select all

Variable Temperature; Real MATC "if (tx>=(max(max(tx))-0.05)) 1e10 else 0.01"
Unfortunatley, it still does not work.

So: the correction is still not correct, or more then one is needed :-)

Regards,
Saxonfahrer
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Operator "max Temperature" in Material Properties

Post by raback »

Hi

Unfortunately you can't use "max" as you wish. The MATC expression here is a rule that is applied on-the-fly for each node separately. Therefore the "tx" is just the Temperature at the node under consideration. There are no global operations in MATC.

SaveScalars could be used to compute the max and redirect it to a variable. Little cumbersome maybe... Or you could make a simple UDF which at first time of iteration would store the max and use it to evaluate the desired expression.

-Peter
Post Reply