# Problem using the dflux.f function

**URL:** <https://calculix.discourse.group/t/problem-using-the-dflux-f-function/2756>\
**Category:** Advanced features\
**Created:** [June 4, 2025, 7:52pm UTC](https://calculix.discourse.group/t/problem-using-the-dflux-f-function/2756 "2025-06-04T19:52:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![maloama](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@maloama](https://calculix.discourse.group/u/maloama)\
**Post date:** [June 4, 2025, 7:52pm UTC](https://calculix.discourse.group/t/problem-using-the-dflux-f-function/2756/1 "2025-06-04T19:52:55Z")

</div>

Hello, i want to simulate a temperature dependent heat flux on a surface.  
For testing I’ve created a custom dflux function in dflux.f with updated body:  
flux(1)=(100)

Using Calculix with the following input file from PrePoMax with dflux keyword I cannot see that my function is being used, right now the given dflux parameter from the input file is being used and my custom constant dflux.f function has no impact:

\*\* Loads +++++++++++++++++++++++++++++++++++++++++++++++++++  
\*\*  
\*Cflux, op=New  
\*Dflux, op=New  
\*\* Name: Surface\_Flux-1  
\*Dflux  
Internal\_Selection-1\_Surface\_Flux-1, S, 0  
\*\*  
\*\* Defined fields +++++

How do i need to call my custom dflux.f function or is the function itself wrong?  
thanks for the help

---

<div class="post-metadata">

**Author:** ![ceanwang](https://avatars.discourse-cdn.com/v4/letter/c/4da419/32.png) [@ceanwang](https://calculix.discourse.group/u/ceanwang)\
**Post date:** [June 4, 2025, 9:20pm UTC](https://calculix.discourse.group/t/problem-using-the-dflux-f-function/2756/2 "2025-06-04T21:20:25Z")

</div>

Have you recompiled ccx?

---

<div class="post-metadata">

**Author:** ![maloama](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@maloama](https://calculix.discourse.group/u/maloama)\
**Post date:** [June 5, 2025, 1:39pm UTC](https://calculix.discourse.group/t/problem-using-the-dflux-f-function/2756/3 "2025-06-05T13:39:59Z")

</div>

Yes, although i am only 90% sure i did that correctly. Is there any way to check? I replaced the dflux.f file with mine and recompiled.

---

<div class="post-metadata">

**Author:** ![ceanwang](https://avatars.discourse-cdn.com/v4/letter/c/4da419/32.png) [@ceanwang](https://calculix.discourse.group/u/ceanwang)\
**Post date:** [June 6, 2025, 6:22am UTC](https://calculix.discourse.group/t/problem-using-the-dflux-f-function/2756/4 "2025-06-06T06:22:38Z")

</div>

Delete the exe first.

---

<div class="post-metadata">

**Author:** ![jbr](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@jbr](https://calculix.discourse.group/u/jbr)\
**Post date:** [June 7, 2025, 8:26pm UTC](https://calculix.discourse.group/t/problem-using-the-dflux-f-function/2756/5 "2025-06-07T20:26:47Z")

</div>

And all the object files as well. Also, do a print to screen in the dflux.f subroutine, to make sure is being accessed.
