Welding analysis with DFLUX

Hi All,

I am trying to model welding process in transient thermal analysis. I tried with sample dflux.f downloaded from web site. The heat source is not moving but it is heating the complete weld path at the same time. Can anyone give a sample deck file and an input file to try at my end? As I am new to coding, can anyone help me how to write dflux.f file for a sample problem?

Best regards,

1 Like

Are you using this tool ?


1 Like

Yes, I am using this tool only. I am following the instructions shared in pdf file as well. But, the heat is being applied on the complete weld path. I did the following in a sample setup.

  1. Added this in the INP file. Weld_elems include all the elements of the weld from start to end.
    Weld_elems, BFNU, 1

  2. Uncoupled thermal structural step is modelled as below.
    *Step, Inc=10000
    *Uncoupled temperature-displacement
    0.1, 10, 1E-05, 1

  3. In dflux.f, I have referred to the first and last node numbers and two reference node numbers.

  4. Compiled CCX and final ccx executable is copied to /usr/local/bin/

  5. In the output file, I can see the “length of weld trajectory: 70.117255599999993”

I can share the input files for your reference. Please let me know.

I think a moving heat source requires a separate *DFLUX card for each element face, and each one has either a unique *AMPLITUDE card or a different value for its TIME DELAY parameter, so that it’s applied at the correct time. Can you check your .inp file to see if it has these features? If it’s all one big *DFLUX card, it won’t move.

1 Like

Not necessarily, the DFLUX subroutine (used here) defines the variation of heat flux in both space and time and should be sufficient to simulate moving heat source.

1 Like

@Calc_em Oh, it’s a user subroutine, sorry, I didn’t notice all that. I guess the problem is probably in that code somewhere?

We managed to build moving loads (ccx) and heat sources (internal solver) using Heaviside functions in Mecway without introducing subroutines.
As Victor says it requires an individual load and *AMPLITUDE to activate it at the right moment.
It’s like all the elements have their load assigned “a priori” but it is only activated when the two shifted Heaviside’s passes on top of the element.


1 Like

@Disla , I also simulated by defining the amplitude for each element and it worked as given below.

*Cflux, Amplitude=Node1, Add
N1, 11, 100000

*Amplitude, Name=Tabular-1, Time=Total time
0, 0, 5, 0, 25, 1, 30, 1,
35, 0, 75, 0, 80, 1, 85, 1,
90, 0, 100, 0
*Amplitude, Name=Node1
0, 0, 5, 1, 10, 1, 15, 0,
500, 0
*Amplitude, Name=Node2
0, 0, 15, 0, 20, 1, 25, 1,
30, 0, 500, 0

Here, I did not use dflux.f.

But, my interest is to use dlux.f and avoid individual element or node definitions. If I am not wrong, we can do the moving heat source using the dflux file as referred by @Calc_em . Here we can avoid individual element definitions.

@Calc_em, can you please post an inp file and corresponding dflux file for my reference? alternatively, If you give me your mail ID, I will send my deck files
temp weld
for your verification.

1 Like

@Disla , I tried it in Mecway, the heaviside function is very cool. But it is not supported in CCX. I am looking for a similar thing in CalculiX.
Mecway result

I’ve never used this tool in CalculiX and I have no experience with its subroutines. Unfortunately, it seems that the .inp file is not available for download from that project. Only a subroutine file is provided. I can take a look at your .inp file but if the problem is with the subroutine then I probably won’t be able to help.

I use similar functionality and perform welding and additive manufacturing simulations in Abaqus but there everything is built in and there’s no need to use subroutines directly.

@Calc_em, yes, we can do it in Abaqus with much ease. But, my project requires me to perform it in CalculiX. The input file is not given on the site, which is the reason for all the confusion. I will send you the deck file for your reference. Please review it and let me know if it can be made to simulate a moving heat source. Thank you.

1 Like

@Brahmendra I am trying to use this routine as well, do you have any update on this topic, some advises, thanks.

@Brahmendra Have you compiled CCX with DFLUX rutine for Windows? Would be nice to have this version of CCX available for downloading