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

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?

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).

Thank you so much! I will have a try.

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.

Hi vicmw,

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.

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.

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.