Note: Hey! If you found this useful, leave a star so I know all of this was of use to someone! Thanks!
So I decided to publish this old script of mine for weld simulation in APDL using Goldak heat source. This is a very bare-bones implementation, largely untested, but as far as I can remember it did the job. I have to note that I have a far more advanced version of a welding script with a lot of features but, well, it's a mess, an unholy abomination of spaghetti code nobody but I can make a sense of (tho I still struggle since it's been a while since I touched it). So it would be counter-productive to publish it, it would only confuse people, not helping with anything. This simple script is not intended as a ready solution but rather an example to build upon for your own purpose, it doesn't have all the features, all the little optimizations I figured out to squeeze out that extra millisecond of perfomance, but I hope it might help you get started. The model itself was verified with result from an article and gave me a pretty good agreement with it. If you have any questions - just open a new issue, I'll try to respond.
ldread
command to read thermal data directly from rth
file since i don't remember making it work in Workbench nativelyldread
for mechanical solution you must divide your cooling times into smaller segments, you can't just import the last step - it will give incorrect solution since the process is non-lineardb
file each step for debug purposes (SAVE
command) even if you work in Workbenchtable
to apply loads, generally it's more efficienttable
in apdl you can set each value as it's an array with 0-th elements (useful to setup axis)table
(where axis coordinates are stored) you will always get 0 (this bug caused me so much trouble before i figured it out)*create
, *ulib
and *use
commands which let you create marco files on the fly /delete
since apdl won't overwrite old files/go
and /com
are useful for debug purposes and to track the solution processIt is extremely unlikely I will update this anytime in the future since it's just an old script I used to figure out how to do stuff. Nevertheless, if someone for some reason wants to contribute - you're welcome to do so, but don't expect me to verify anything, I'm not doing jobs in this field of study anymore and I'm very short on time nowadays.