I want to use temperature-based material properties in a 2D analysis. If the temperature distribution is known to vary along a direction (for instance linear temperature distribution along y-axis), is it possible to apply this temperature field with CalculiX?
If it’s a static analysis, you can use the *TEMPERATURE keyword but it has to be specified per node or read from .frd file with results of a previous (thermal) analysis.
The utemp.f subroutine can also be used with the *TEMPERATURE keyword in purely mechanical analyses. But subroutines are usually used as a last resort. It’s often possible to avoid them with some more or less tedious workarounds. Here you could obtain such a temperature field in a heat transfer analysis or partition the model and apply spatially varying temperatures manually.
@Calc_em and @jbr thank you for the suggestions. Unfortunately, I am not familiar with utemp.f. Since this is an f file, would one need to recompile CalculiX? Or you can just write the file and submit it along within the .inp file. With *TEMPERATURE keyword, I understand that it is possible to define a single temperature value for a node, or a node set. In my case, however, I want to apply a temperature to each node based on one of its coordinates, its y-coordinate for instance.
As a possible workaround using *TEMPERATURE keyword: I can export all nodes and their coordinates to a file (nodes.msh). With a Python code, I can grab each node’s ID, and its y coordinate from this file (nodes.msh) and write another file containing the temperatures:
temperatures.txt
1, 25
2,26
.
.
.
300, 473
But I am not sure if can I use this file in the .inp file like *TEMPERATURE,FILE=temperatures.txt.
I can try and see.
If you have any further suggestions, I would be more than happy to have them. Thank you again.
To use a user subroutine, replace the dummy routine in the CalculiX distribution by yours (e.g. dflux.f from the distribution by the dflux.f you wrote yourself) and recompile.
The FILE parameter is for reading from .frd file from a previous analysis. But you can just paste the generated data (node number, temperature at a node) in lines under this keyword.
Thank you @Calc_em . I believe I can do this. For larger models, though, this would make the .inp somewhat unreadable I guess maybe, *INCLUDE keyword can be useful in this case, for clarity.
Sure, you can always use the *INCLUDE keyword in such cases. I prefer to have everything in one place and just fold the large portions with many lines when reading the file but many people use includes. Especially when working with preprocessors like GraphiX.
Thank you @Calc_em, for the prompt insight! I think I implicitly assumed initial temp. wouldn’t be needed since I am not interested in thermal stresses (for this case, but later I will most likely need this). I added room temp. as initial cond. and it works.
CalculiX requires initial temperature definition whenever temperatures are involved so in steady-state and transient heat transfer and coupled temperature-displacement analyses but also when temperatures are applied in a static step. It doesn’t just assume T_0=0 like Abaqus.