# How to define heating power according to temperature at a position

**URL:** <https://calculix.discourse.group/t/how-to-define-heating-power-according-to-temperature-at-a-position/1662>\
**Category:** Uncategorized\
**Created:** [May 17, 2023, 9:00am UTC](https://calculix.discourse.group/t/how-to-define-heating-power-according-to-temperature-at-a-position/1662 "2023-05-17T09:00:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![hogglife](https://avatars.discourse-cdn.com/v4/letter/h/6de8d8/32.png) [@hogglife](https://calculix.discourse.group/u/hogglife)\
**Post date:** [May 17, 2023, 9:00am UTC](https://calculix.discourse.group/t/how-to-define-heating-power-according-to-temperature-at-a-position/1662/1 "2023-05-17T09:00:50Z")

</div>

Hello all,

I am new to Calculix. I want to define heating power on a body which varies according to temperature at a position in this body or another adjacent body. Google does not give usable result. Is this possible in Calculix?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Calc\_em](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@Calc\_em](https://calculix.discourse.group/u/Calc_em)\
**Post date:** [May 17, 2023, 9:35am UTC](https://calculix.discourse.group/t/how-to-define-heating-power-according-to-temperature-at-a-position/1662/2 "2023-05-17T09:35:19Z")

</div>

For that you would have to write a cflux.f (for concentrated heat flux) or dflux.f (for distributed heat flux) subroutine. Check their descriptions in CalculiX User’s Manual (chapter 8. User subroutines).

---

<div class="post-metadata">

**Author:** ![hogglife](https://avatars.discourse-cdn.com/v4/letter/h/6de8d8/32.png) [@hogglife](https://calculix.discourse.group/u/hogglife)\
**Post date:** [May 17, 2023, 9:48am UTC](https://calculix.discourse.group/t/how-to-define-heating-power-according-to-temperature-at-a-position/1662/3 "2023-05-17T09:48:19Z")

</div>

Thank you so much! I will have a try.

---

<div class="post-metadata">

**Author:** ![vicmw](https://avatars.discourse-cdn.com/v4/letter/v/6de8d8/32.png) [@vicmw](https://calculix.discourse.group/u/vicmw)\
**Post date:** [May 18, 2023, 10:24pm UTC](https://calculix.discourse.group/t/how-to-define-heating-power-according-to-temperature-at-a-position/1662/4 "2023-05-18T22:24:34Z")

</div>

What’s the physics behind it?

If it’s heat transfer from an adjacent object, you could use conduction through a thermal resistance (\*GAP CONDUCTANCE) or simply connect the meshes in the normal way.

If it’s something like a chemical reaction where the heat generation rate depends on temperature and also changes the temperature in a feedback loop, then you’d probably have to write a custom dflux.f as Calc\_em suggested.

---

<div class="post-metadata">

**Author:** ![hogglife](https://avatars.discourse-cdn.com/v4/letter/h/6de8d8/32.png) [@hogglife](https://calculix.discourse.group/u/hogglife)\
**Post date:** [May 19, 2023, 3:07am UTC](https://calculix.discourse.group/t/how-to-define-heating-power-according-to-temperature-at-a-position/1662/5 "2023-05-19T03:07:20Z")

</div>

Hi vicmw,

Thank you for your attention!  
In my case a heating coil is embeded in a plate. I want to let the heating power of heating coil vary automatically according to temperature at a monitored point inside the plate. With extra heat transfer boundary conditions applied on plate, it is expected stable status will be reached and the temperature at the monitored point in the plate will be stable at a prescribed value.

---

<div class="post-metadata">

**Author:** ![vicmw](https://avatars.discourse-cdn.com/v4/letter/v/6de8d8/32.png) [@vicmw](https://calculix.discourse.group/u/vicmw)\
**Post date:** [May 19, 2023, 4:14am UTC](https://calculix.discourse.group/t/how-to-define-heating-power-according-to-temperature-at-a-position/1662/6 "2023-05-19T04:14:55Z")

</div>

Yea, that looks like you’d have to use dflux.f (or cflux.f). That function has access to the temperature at all nodes so it can read the value from the location of the sensor.

---

<div class="post-metadata">

**Author:** ![hogglife](https://avatars.discourse-cdn.com/v4/letter/h/6de8d8/32.png) [@hogglife](https://calculix.discourse.group/u/hogglife)\
**Post date:** [May 19, 2023, 8:00am UTC](https://calculix.discourse.group/t/how-to-define-heating-power-according-to-temperature-at-a-position/1662/7 "2023-05-19T08:00:23Z")

</div>

If I give the element set for the heating coil under \*DFLUX, e.g.

\*_DFLUX_  
_COIL, BFNU_

Can I still get temperature at a position of plate (i.e. a body which is different with the element set provided under \*DFLUX)?

By the way, is the user subroutine of CalculiX similar with ABAQUS? I find the manual of CalculiX seems limited on explanation on user subroutine and maybe I can try to learn writing user subroutine from ABAQUS.
